Senior project: 3D Chess Game

I’m new using JMonkeyEngine, and currently working on my senior project for school. I want to develop a 3d chess game, to improve and motivate myself in becoming a game programmer but to impress my professor (who’s the dean of our department) and my fellow classmates. I would like some suggestions how can i accomplish this task. First of all, i loaded the chessboard and pieces like this:

Chessboard = (Node) assetManager.loadModel("Textures/chess.j3o");

but my question is, should i upload the chessboard and pieces individually or as a whole piece like i did on my above code?

You probably want to move the pieces individually, so should have a model for each piece.

When you load a j3o scene, you will probably make it a node. In that scene node you can find the nodes of the chess pieces and the board itself depending on how you set up your chess board and pieces (say in Blender).

So you should name your mesh objects in Blender and then those names will be on the nodes in the .j3o file. You can even visualise each node (chess piece) in the SDK’s scene viewer by expanding the scene node and clicking on the individual nodes therein. You can then iterate through the nodes in your code and single them out using the name string.

I have created space ships like this for my own game and then I can get the say … the canopy … by iterating through the j3o file looking for the node named “canopy”. The canopy can then be made to open or close etc by rotating the canopy node.

You could set up the whole chess set as one blender file, but the pieces and board will need to be individual meshes, i.e. separate objects in blender itself.

If you are going to texture the pieces, prolly best to use a single texture for the whole chess set, i.e. a texture atlas. The checkered chess board may only need vertex coloring in blender, which translates quite nicely into jME3.

Hope that helps.

1 Like

Thank you. The only problem i’m having is setting the individual pieces on the board. I don’t know if is the same logic as a 2d chessboard and pieces, where you use two dimensional arrays to put the pieces in the correct place on the board.

I’m not sure what logic you are using. But I would imagine it would be very much the same.
For example; The chessboard is on the same plane so the y-co-ordinate should always be constant. Thus you will only have to play around with the x and z co-ordinate.

1 Like