Easy to port from 2D to 3D to Java game

Due to a lack of capital and time, we have to make our game in 2D, although I (the developer) would prefer it if it was done in 3D. I would not want users to join the game, only to think that the graphics look bad and go away. Although I suppose we just need to try to do our best.

Speaking of which, I would like to design the game in such a way that, if the time comes, we can transfer 3D as easily as possible. I know games that had to rewrite everything from scratch. I would hate to do that, so I would like some tips / tricks to be used when programming the game so that when moving in 3D it is as easy as changing the code of 1-5 graphics rendering classes (or close), and 3D the graphics will work.

PS This is a multiplayer role playing game (not an MMORPG, much less at the moment)

0


source to share


4 answers


Due to lack of capital and time, we have to make our game in 2D even though I (the developer) would prefer it if it was done in 3D. I hate for users to join the game, only to think the graphics look bad and go away. Although I suppose we just have to try and are working hard.

I don't think everything needs to be 3D to look good. Well-executed 2D can look many times better than standard 3D graphics. To have great 3D graphics, you need to put in some serious effort. If your budget doesn't allow it, I would try to put a lot of effort into developing the gameplay.



Think (somewhat outdated) Diablo II, which is not 3D, but still has nice and pretty graphics.

Of course it is possible to build an architecture that makes it easier to change the graphical representation, but I think it will almost never be as easy as you described. Of course, if you just want 3D for 3D's sake, it can be done (instead of the bitmaps you now present to 3D models), but it's somewhat pointless. If you want to use 3D, the player must be able to use it (for example, by moving the camera, having more degrees of freedom, ...), but this must be taken into account throughout the design of the game and therefore seriously affects the gameplay.

+3


source


The easiest way to achieve this is to write a game in 3D and render representations using 3d-2D projection, for example. in plan or height. If the internal mechanics of the games are 2D and you are trying to get into a true 3D frame, you are probably better off rewriting. It also depends on what you mean by 3D and whether you have an efficient matching option. For example, Microsoft Age of Empires renders in 3D, but works great as a 2D plan. On the other hand, there won't be a first-person shooter like Half Life or Quake.



+5


source


You can use GL ortho view. This will allow you to draw on screen using only 2D coordinates, if you want 3D later, switch from Ortho to Perspective and you have 3D, however I don't think it helps you reuse the code as 2D ortho -the rendering is usually done with textures and you cannot convert the texture to a 3D mesh.

Perhaps the best approach is to do everything in 3D and set up the camera to look from above, if you do this later you can switch to 3D simply by moving the camera and creating better models and textures. These options sound better, but give you more trade-off work from 2D to 3D without changing the code.

+2


source


the MVC pattern should help.

And I think you already know, but have you looked at Java3D ? Perhaps given the ability to view 3D renders with a plug-in (but not necessarily polished and production-ready), you'll be honest not to get bogged down with 2D in some horrible way. It can be as simple as adding your 2D material with some Z positioning.

+1


source







All Articles