I am just looking for opinions and experiences on this - my final year University project. Ideally, my project is to create a basic 3D game engine (i.e. FPS) in around 2.5 - 3 months. I say basic as it doesn't have to be amazing, it can be something simple, with basic collision detection and what not.

However - is this possible in the time given, which is around 2.5 - 3 months (spending around 25-30 hours a week on this)?

It was a throw up between a 3D and 2D engine and in the end I decided the 3D engine would get me the most marks due to being more technical and complicated compared to a 2D engine... however it is no good if it is honestly far too much work to complete in the time available, and this is what I am most worried about. I am fine for learning the required maths, but I just think that doing the graphics and building a small 3D world would take up several weeks and not leaving enough time for other game engine features such as lighting, shadows, collision detection, sounds, input etc.

I have numerous books, including one that has a walkthrough of building a basic 3D world in JOGL - I would probably try to convert that to using LWJGL and I have ordered a textbook on OpenGL (OpenGL Superbible) to be delivered tomorrow.

So yeah, a 3D engine is definitely a project that will get me the best grades from my tutor (and although I have had little graphics programming experience, I have four years Java experience) but I am just SO worried it will not be achievable!

Just set boundaries. Work out a very simple game, something you feel you can implement in a rainy afternoon. It'll probably take a week or two. Work from there, incrementally: 'release' something that works every week, after two months you'll know where your project will end up. Keep it simple though, very simply. Don't even try to add terrain, trees or grass to your world, making any of those three look good and fast can easily take 3 months.

Hi, appreciate more people! Σ ♥ = ¾Learn how to award medals... and work your way up the social rankings!

That was actually very useful, I'm about to properly plan my project week by week so I'm going to make sure I keep everything really simple (despite wanting to show off, I suppose just the code required for something simple is still impressive).

Could you recommend any good resources/the best library to use? Obviously I'm looking at LWJGL, but I've also looked at Java3D (which I know is different), JOGL... they all seem relatively the same, are there any major differences/disadvantages to choosing one over the other to use?

the two others are both good choice, and your project success will be in both case more relative to how you build your game/project architecure than the API you use (ideally if you well prepare/built it you should be able to switch from one to another at low cost/time)

You could use libgdx. It provides access to OpenGL through an abstraction layer over LWJGL, JOGL, Android, and others. There is no problem developing a desktop only game with it though. It provides more than either LWJGL or JOGL, which mostly just provide access to OpenGL, input, etc. libgdx has texture loading, sprite batching, VA/VBO helpers, font rendering, texture atlases, particles, etc.

My idea of a game engine is really something that is a very very simple generic game... and that has an API to supply methods to a developer to use this generic game and extend it through the features available (i.e. load in their own textures, content, choose whether or not there should be a timer, leaderboard, which features a game should have etc).

Is my idea roughly right? (It's less focused on graphics and more on the coding of creating a basic game, the ability to create a basic game and add whatever features the developers choose and to provide a very simple way to do that)

With graphics, I didn't really want to "reinvent the wheel" (I am not a graphics student nor have that experience, my tutor didn't actually recommend me learning all of the mathematics required as he thought there would be something available to do that - not that I have a problem learning if required) but focus more on building a "generic" game that can continuously be extended and be simple for a developer to take and develop their own game.

I'd advise you to use a pure OpenGL binding like LWJGL... the major advantage is that you can read endless amounts of tutorials on OpenGL (like NeHe) and basically copy and paste code, messing around, until it works.

When you work with some existing engine (I thought your goal was to create a game engine...? for a tech demo, not a game?) is that you'll never learn the basics. Any time you run into trouble you have to ask the (community of the) maker, bad thing. Stick with pure OpenGL and you'll have vast amounts of resources to dig through. (and irc.freenode.net #lwjgl for instant help on OpenGL and LWJGL)

Hi, appreciate more people! Σ ♥ = ¾Learn how to award medals... and work your way up the social rankings!

Riven: Well that is where I could be a bit confused... or possibly worded my idea a bit wrongly. If I was to create some simple 3d game engine with collision detection (and again basic, to stop say the camera/something walking into an object in the 3d world), to demonstrate it I would have to create a simple game to use it/go along with it, no? (Unless this is what you meant by tech demo).

To give the origins of how this project started about... I was going to do a game however my tutor thought this would not flex my skills enough and for that good grade I should go more "general"... instead of having character X with ability Y in world Z... to be non specific and allow character X to be any character... ability Y to be any ability and to provide that in the form of some sort of engine that a developer could use to implement characters, abilities, worlds of their choosing. And that's how the 3D engine idea came about! (2D was discussed but we decided it would too simple - or so my tutor thinks it would be rather too simple for me - but I think the extra capabilities that I could add with the extra time available would negate that but eh).

The whole idea of 2D being easy is ridiculous. Mona Lisa is 2D too, not to mention TV and the web.

You can make 2D as easy or complex as you make it. You'd expect a teacher to grasp that. Same goes for 3D by the way, it can be absolutely less impressive than a nicely designed, polished and thought through 2D engine.

The only difference is that you are dealing with another spatial dimension, which often means you have to use more geometry, which affects performance, hence you lose yourself in mundane world of frustum culling and level-of-detail. All these things have absolutely nothing to do with the design of a playable, fun game. If you want to have a bit of depth (story wise) in your game, allowing for non-linear gameplay, your game-code will be hard enough, and those 3 months will feel pretty tight.

f you however solely want to impress your teacher (which makes sense, if you're doing it for the grade), make it 3D, add lots of particle-engines and fancy physics that have no purpose, and put a beat under it. It will surely make up for the lack of complexity in the game-code...

Tough choice.

Hi, appreciate more people! Σ ♥ = ¾Learn how to award medals... and work your way up the social rankings!

I think my project right now is definitely not to create a game (I'm not designing a game, not designing any story, or characters, or anything like that) but something to demonstrate my programming skills and that could possibly be extended in the future I guess (so definitely a 3D engine... with as you say particle engines, physics and a "tech demo" to go along with it merely to show off what I have achieved from my engine). Again, whether or not that is possible in 3 months I'm not sure!

I think I've been getting slightly confused with exactly what a game engine is... and my project is in no way supposed to create any playable game I don't think. (I think even creating some sort of basic 3d environment with camera etc would look impressive and still require quite a bit of work on my side, i.e. mathematics, opengl wise).

A game engine is basically the code that handles the rendering, the networking (if any -- please dont...) and the physics (if any). It's like a technical foundation, on which you build the game code.

In a game engine you'd find code that loads textures, does frustum culling, pushes data to the GPU, plays sound effects and streams background music, possible a finite state machine for the AI. It's basically everything in your game that nothing to do with the game.

Hi, appreciate more people! Σ ♥ = ¾Learn how to award medals... and work your way up the social rankings!

Make Circle<->Rectangle work first, then write the Sphere<->Cube version. In the end you probably want Sphere<->Plane, Sphere<->Triangle and Triangle<->Triangle.

Don't try to focus on realistic collision response: it's really, really hard to get right, and you won't get it done in three months along with the rest of your game. Instead, once you noticed you collided with something, either destroy the object, or move back to the last known valid position.

Hi, appreciate more people! Σ ♥ = ¾Learn how to award medals... and work your way up the social rankings!

There is some truth in what Riven is saying, that using a "pure OpenGL binding" will expose you to the low level details so that you are sure to understand how it works. When you choose a higher level technology, you should have a reasonable understanding of how it works, else you will be unable to help yourself when you get into trouble. The reason not to choose a lower level technology is to save time by not writing boilerplate/common code and to allow you to focus on what you are trying to accomplish.

libgdx provides access to OpenGL, so many of the tutorials and sample code can be made to work with little effort. It also has some higher level features you may choose to use that allow you to develop your game more rapidly, such as text rendering, easier management for VA/VBOs, etc.

based on how much basic questions you have, I would in your place try to get an easier task from the teacher. If you start learning now how to handle objects in 3D and how to load them in, do rendering, handle the transformations, set up all kinds of parameters for rendering, maybe how to use shaders, how to do collision detection in 3D and on top of that have the code be extendable. Then in this amount of time you will at most write a basic spaghetti code that can achieve some of these things but it will be very far from the goal which is a game engine and if you then show the spaghetti to the teacher then what is he supposed to do.

For what it's worth, my guess as to the sort of thing you could get done in three months would be:

A world made up of rectangular (in 3D, so cuboid) rooms connected by doorways (portals). If you keep the room geometry simple then you save yourself a lot of problems, not least of which would be how to create the room data. You don't have time to build your own world editor, and writing the code to import data from an existing editor would be a hassle.

To simplify things even further, the player/camera always stays at the same height (no stairs, no sloping floors, no jumping, no falling). That way the engine's logic is all 2D. For collision detection, you just treat the player/camera as a circle in a 2D world. (Tip: Implement a 'map mode' that displays the game world, including the player, from above using an orthographic projection. Very useful for debugging.)

You could probably get the above done in a month or less. Then you can spend the rest of your time adding cool stuff. If the walls (and floors and ceilings) of the rooms start as just plain colours, then the next step would be to texture map them, and then to add other interesting effects as time allows (e.g., bump maps).

And then you can start populating the world with objects, and creatures, and weapons upgrades, and so on, and so on.

dishmoth: That sounds an interesting/fantastic idea! And one I am definitely considering when planning my project this weekend.

I think it is clear that in the time given with my abilities in 3D graphics (and my tutor is aware that I have no experience really of 3D graphics as they don't do it on the course anymore!) that I am going to have to go with something slightly basic as a target, and merely extend - and I doubt I would get anywhere near a full game engine, however the 3D graphics stuff should show off my skills and ability to research/learn etc.

indexunknown: Understand your point totally... I have literally no experience with Java gaming but the whole point of this project is to learn new things and use whatever skills I have learn't so far in Java and apply them to new things now. I am a first degree student, hence the big project suggestion, and this does mean more research is required in my project (and certainly would be done if I was learning 3D graphics).

However as I said I think I will take what I have learn't from everyone's suggestions here - I know what a game engine should do... I know what is basically possible in the 3 months available when using 3D graphics and starting from scratch and I know that a full game engine in 3D will not be completed in 3 months... but more a "sub-section". (Infact though, my tutor said aiming for a "subsection" of a "prototype" would be fine really!).

I'll make my plans on what I think is possible, and I'll give them to my tutor on Wednesday and basically say... "OK, if you want me to demonstrate a really basic partial 3D engine... I can do this and this and it will require a lot of research..." or "If you want a full engine with just as much research, but in other areas i.e. fluid movement, collision detection... then I should drop the 3D and move to 2D". Either way the work is complicated and still lots to learn... but I think within the time possible one project would achieve more (visually and in a game engine way) more than the other.

but focus more on building a "generic" game that can continuously be extended and be simple for a developer to take and develop their own game.

Sounds nice in theory, but is generally a waste of time. Writing reusable code is almost impossible. Every time you 'finish' a project you'll already know what bunch of design flaws are in your current engine, and how you'd do better in your next project. Making code very abstract is one way to lose control and never get anything done.

During prototyping you really have to write code that works. It doesn't matter whether it's a mess, or how you're using stuff that's considered 'not done' to make it all work. Once it works, clean it up, refactor your code into a better structure (an IDE like Eclipse and NetBeans is required here!) and add some new features, again, making a big mess, use dirty hacks, until it works. Rinse and repeat.

Once the 3 months are over, you probably will never use that code again, because with all that you've learnt it would simply be stupid not to start from scratch.

Hi, appreciate more people! Σ ♥ = ¾Learn how to award medals... and work your way up the social rankings!

but focus more on building a "generic" game that can continuously be extended and be simple for a developer to take and develop their own game.

Sounds nice in theory, but is generally a waste of time. Writing reusable code is almost impossible. Every time you 'finish' a project you'll already know what bunch of design flaws are in your current engine, and how you'd do better in your next project. Making code very abstract is one way to lose control and never get anything done.

During prototyping you really have to write code that works. It doesn't matter whether it's a mess, or how you're using stuff that's considered 'not done' to make it all work. Once it works, clean it up, refactor your code into a better structure (an IDE like Eclipse and NetBeans is required here!) and add some new features, again, making a big mess, use dirty hacks, until it works. Rinse and repeat.

Once the 3 months are over, you probably will never use that code again, because with all that you've learnt it would simply be stupid not to start from scratch.

Yeah that is what I definitely plan to do (and funnily enough always what I seem to do with every project at the moment... implement it in such a way that it really is a big mess just to get it to work... then tidy it all up after).

I just need to remember really that whatever code I do eventually hand in, to make sure it is moderately tidy by the end of it!

I was also playing around with 3d in Java a while ago.I wrote an extremely simple 3d engine that can display simple geometric shapes like cubes or pyramids and make them move around and rotate.However it doesn't use opengl. It just draws the stuff with Graphics2D.fill, so it's kinda slow.But since it's so small and simple it is very easy to understand. So it might give you some inspiration.If you want to take a look at the source code, i put it on megauploadcom/?d=TN2TJSS5You can compile it with javac game3d/*.java and run it with java -cp . game3d/Game3D.You can control the camera with w,a,s,d,q,e,space,c,shift and by clicking and dragging the mouse.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org