[solved] Imitating 3D dice in Java2D (Monopoly clone)

Hey JGO, I’m just now planning out my next project that will involve my current project (Networking Library GNetLib) and I can’t seem to grasp the idea of how to imitate a 3D “dice system” via Java2D :slight_smile:

I’d like to have a 2D board, but have 3D dice? (Dice will roll)

My only ideas at the moment are:
1). Switch to LWJGL :confused:
2). Use ray-casting to imitate the 3D dice than 2dScene.draw(diceImage)
3). Loose the 3D dice idea and go with 2D dice :confused:

Thanks for any feedback JGO, I’d like to get started with my project tonight and I can but… I’d have to go with my 3rd option until I can figure out how to implement 3D dice :stuck_out_tongue:

I would suggest reading up on pseudo-3D rendering, since there are many hackish ways to go about 3D effects in Java2D.

  • Jev

Thanks, this should be a fun project lol.

I’ll need to create a six-sided dice that has real physics or, a step-by-step simulation that imitates the rolling effect.

I’ll do some googling and see what I can find :slight_smile:

I’d think using a physics engine would be the only way to get true, realistic looking rolling dice, in which case maybe that would solve the problem?

What’s the game - does it really need such realism? Could you get away with a single “blurred” animated sprite for a rolling die which resolves to a single image showing the result only when it stops.

It’s a monopoly clone :stuck_out_tongue:
Loving the progress so far just not the graphics XD

Eh I could get away with 2 stand-still dice that change textures until the roll’s finished sure, I’d just like to have rolling dice if possible.

Screenshot so you know what I’m trying to work with :stuck_out_tongue:
At the moment I’m just using 2 stand-still dice until I can figure this out :s
NOTE: Dice are just static sprites at the moment, there’s no “roll” code implemented yet.

Resized image (1280x700):
Full image: http://i58.tinypic.com/i42y3k.png

I’ll just stick to my current method :stuck_out_tongue:

(Changing the dice texture to a random dot count for a certain interval than landing on a final side)

Turns out I don’t have room for what I wanted after adding onto the games UI :stuck_out_tongue: