Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have created a Monopoly game with a 2D Graphics in Java for my final exam at college.

I feel that the game doesn't look very good and I want to add a 3D Graphics. My problem is that I have never done 3D programming and I don't know how to create 3D objects.

Can someone tell me where can I create 3D objects and what library to use for 3D programming that will allow me to create a 3D graphic interface fast? I have only two more weeks to do this. Can this be done?

share|improve this question

closed as off-topic by MichaelT, GlenH7, Kilian Foth, Glenn Nelson, Dynamic Dec 19 '13 at 22:44

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – MichaelT, GlenH7, Kilian Foth, Glenn Nelson, Dynamic
If this question can be reworded to fit the rules in the help center, please edit the question.

1  
3D won't disguise bad art skills. If you have nothing else left to do in other courses and you're ready for some long nights, go for it. If not, your time would be better spent looking into improving the 2D experience. –  Erik Reppen May 18 '12 at 5:22

6 Answers 6

up vote 16 down vote accepted

Learning both creating 3D graphics and programming 3D rendering in just two weeks will be hard.

3D Graphics programming involve many non trivial concepts to understand, among others matrices and quaternions. If on top of this you want to learn a 3D software like Maya or Blender, this is almost impossible.

As a starter, you should take a look at some OpenGL tutorials.

Now, if I may give my opinion, I would suggest you spend your 2 weeks enhancing the user experience in your game in 2d. A monopoly game doesn't need 3d graphics to be good looking. Instead you could try adding 2d animations or effects, or sound, or game modes.

Edit

Other answers suggest to use higher level engines. Although this can be done, I don't think it falls into the scope of an exam (I assume the author is asked to develop the game by himself).

And I also would recommend understanding the basics of 3D graphics before using a higher level engine (but that's my opinion).

share|improve this answer
    
nah, it can be done. I programmed "battleship" first with a 2d presentation and then with a 3d presentation many years ago. Most things you need are translations and rotations and you needn't really know matrices and much less quaternions on that level. I programmed everything in one day, even with animated water, but without models. –  Falcon May 15 '12 at 17:41
2  
@Falcon Could you elaborate a bit more? Did you, with no experience, make a battleship game with animated water, complete with I guess camera sweeps, UI? If it looked good you must have also learned lighting, texturing, modeling, and hooked it into your game (non-trivial as well)? And all that in one day? Crazylicous if that's the case, congrats on being quick on the uptake! –  Max May 15 '12 at 20:00
    
@Falcon, it all depends on what you already know on the subject, and how fast learner you are. I agree, a 3d battleship game or even Monopoly if you have the game logic already won't take much time for a skilled programmer –  XGouchet May 16 '12 at 8:54
    
@Max and XGouchet: I knew a bit of 3D programming and used an already made engine (much like Ogre) for it. I used a SkyCube and no models, just coloured rectangles. You could zoom and rotate everything. Using models would not be that difficult, if you have the model-files already. It looked pretty good! Lighting and texturing isn't really difficult on that level imho. I think things like this can be done very, very easy with XNA, but I haven't tried that API intensively. –  Falcon May 16 '12 at 11:19

I agree with the other posters here - you most probably are not going to be able to implement both the code/engine for your game and the 3D content needed in 2 weeks.

However, if the operational part of your question is "I feel that the game doesn't look very good and I want to add a 3D Graphics." then you may not need to implement a 3D engine at all in your game.

Back in the 80s and 90s, before video cards were considered standard hardware in computers, most "true" 3D games that rendered 3D on-the-fly (in software) displayed 3D as wireframes, and later flat, low-count polygons - this wasn't because people didn't know how to make "nicer" 3D graphics - the machines at the time just weren't powerful enough.

Most games were actually 2D, but used various approaches to "fake" a 3D look.

Using isometric graphics is one approach.

Another approach was create 3D models, but instead of creating a 3D engine for the game and loading/animating the model on-the-fly - pre-render graphics of them (probably using a raytracing program) into a series of images that can be animated. (i.e. pre-render the model at various angles, or at various phases of a walking animation and just string the images together.) This can be combined with the isometric approach mentioned above.

You may be able to use these ideas to make a "better looking"/"fake" 3D version of your game in the 2 weeks you mentioned - I still think it's going to be a tight schedule, but probably more do-able than learning real 3D programming and figuring out how to use a 3D modeling tool and generating 3D models for your game.

share|improve this answer

I would suggest working at a higher level. Check out Unity 3D (unity3d.com). It's an order of magnitude easier to work with than coding something directly in OpenGL, and it integrates with many tools. Even when you get past the challenges of getting your first spinning cube on the screen, the next question will be how to display a model. And then, how do you animate it. Those are really complicated and you're going to want to use a framework that makes it easier (e.g. Unity 3D).

Finally, you're going to also want to check out Blender (www.blender.org). It's free, and pretty much the go-to tool when you want to do 3D modeling without spending hundreds or thousands of dollars. It also happens to integrate great with the aforementioned tool.

share|improve this answer
    
I don't think this is a very useful answer to this specific question without a pointer on how to integrate a Unity frontend with a Java backend in less than a day. –  Peter Taylor May 15 '12 at 8:10
    
From what I know of Unity the only languages that can be used in it are Javascript and C# ise't that true? –  Nistor Alexandru May 15 '12 at 8:46
    
I think when all is said and done, the existing Java code is going to be a very small percentage of what needs to be written using OpenGL. C# is on par with Java. Think about how much actual code goes into a 3D engine. –  Kevin Hsu May 15 '12 at 16:00

I also suggest working at a higher level, but Unity is not the right tool for Java. I don't know much about 3D libs in Java, but this http://sourceforge.net/projects/jirr/ might be a start (maybe others know better/easier ones). What XGouchet said is true, also. Learning these libraries is still hard and creating good 3D art for the average programmer even more.

share|improve this answer

3D graphics is hard, and 2 weeks is a short amount of time. You have been warned. But it can be done if you are very dedicated and eager to learn!

Firstly you will need a 3D engine or library. For Java, the best 3D engine IMHO is jMonkeyEngine. It would allow you to build a scene by positioning and moving objects in 3D space. There are a lot of demos / example code on the site to explore. Another option is LWJGL which gives you more direct access to OpenGL calls - but this is more low level so probably more tricky for a first-timer.

You will also need to build 3D assets (graphics, models etc.). I actually think this might be harder than setting up the 3D engine itself, since it can take a lot of work to produce a large volume of decent 3D assets. There are some amazing open source tools available like Blender - but this can take as long to learn as 3D programming itself! On the plus side, you may however be able to re-use some of your 2D graphics as textures on 3D objects.

Finally, you will need to do some coding to make your 3D interface. There will be a few things to do here:

  • Render in 3D space rather than in 2D - all your objects will need (x,y,z) positions rather than just (x,y)! But also you will need to consider rotations, camera angles etc.
  • Modify your user interactions / input interface. In 2D, handling mouse clicks is relatively easy. In 3D, you have a slightly more complex problem figuring out what the user clicked on!
  • Add nice "3D touches". e.g. you could animate the dice rolls in 3D

Overall seems like a big project - but you will learn a huge amount so don't let that put you off!

If you are concerned about how much you can achieve, I would suggest trying to replicate your 2D version as closely as possible in the 3D engine at first (overhead view, flat square objects). Once you get this working, you can think about the more complex stuff (rotating the view, lighting, complex 3D models etc.)

share|improve this answer

As well as these great answers here, you could also enhance your game graphics via a simplified form of 3D graphics, which may not require as much work as using a 3D game engine using full perspective would. I'm talking here about Isometric graphics - which are also known as 2.5D and oblique projections. You can think of it as a simple projection of your 2D board into 3D space. Not sure how much you could do in 2 weeks however.

Here is an example of a chess board and pieces in isometric:

enter image description here

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.