Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Dark Basic Game Board Development

Author
Message
Luxor_Lar
14
Years of Service
User Offline
Joined: 7th Mar 2010
Location:
Posted: 8th Oct 2011 22:38
I am new o Dark Basic programming and need advice on creating a game board that could be used within Dark Basic Pro. I want to create a rectangular game board with a graphic picture on its face. Then have dimples on the game board that could hold marbles, like a Chinese Checker board. Within the game, I want to be able to move the marbles between the dimples. I am not sure where to start on such a game board. Do I need a modelling tool like AC3D to create this board and if so what is the learning curve for this sort of thing?
Somarl
13
Years of Service
User Offline
Joined: 11th Feb 2011
Location: UK
Posted: 9th Oct 2011 02:39
I saw something like this ni the Hands On Darkbasic Volume 2 book. Its about making solitaire the board game not the card game. Thats basically a dimple/marble type game.
By the looks of it you will need a little 3d knowledge like creating spheres for marbles and wrapping them in a marble like texture.
You could draw the board 2d i guess and lay it out as you would any picture and represent the board using an array to represent the "grids".

So if your board was 7 squares across by 7 squares down its just
Dim Board(7,7).

Unfortunately i am a complete noob and unable to offer anything much more useful than this. But if you at least create the marbles, draw the board in 2d and set it up in an array your off to a start.
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 9th Oct 2011 17:26
Following on from Somarls point; the 'Hands On' book provides helpful tips for such projects.

There isn't a single right answer to your question; there are different ways to acheive what you want that will more easily spring to mind once you get more experience.

What I would do is make a decision whether to learn how to model, or avoid editor based modelling altogether in order to focus on the code. It is down to you to decide whether you like modelling or not; you do not need to use a 3D modelling program to produce your idea.
---
To hard code everything, look into memorizing the available commands in the Basic3D and GameFX sections in the help documentation.

In the Basic3D section you find that you can create the board out of a box or plane, which can be textured with the design of the board.

The Marbles can be created using the [Make Object Sphere] command, and the dimples in the board can be coded using the [PERFORM CSG DIFFERENCE] command in the GameFX section; this uses one object to carve out another using its polygon form. If you do not wish to carve out the dimples, normal mapping can be used to create the dimple effect with textures. Normal mapping is acheived using FX shaders, check out Dark Shader if interested.

---
To use 3D modelling, I would use Blender. Usually Blender is not easy for people to learn when you have already gotten used to using other 3D modelling programs, the work flow in Blender differs. It takes time to learn, but after you learn it you can create anything you want, now and in the future.

The game board can be acheived in Blender by pressing shift A, selecting cube. Then shift A to create a sphere. You resize them pressing S and resizing the spheres. Finally you add a boolean modifier which can use the spheres to create the dimples in the board.

On my website there is a guide for exporting Blender files for DBPRO, aswell as other DBPRO guides and tutorials.

Login to post a reply

Server time is: 2024-11-22 12:47:06
Your offset time is: 2024-11-22 12:47:06