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 / Few questions - 3D model implement - Timed random loop - Menu with resolution support + chosing blocks

Author
Message
Ladathion
13
Years of Service
User Offline
Joined: 3rd Aug 2011
Location:
Posted: 3rd Aug 2011 15:15
Hello everyone!

I am a starting programmer with little or no experience, and thus far I have been experimenting with Dark Basic a bit and Im starting on a small project to learn the basics, but I have a few questions that I need to have answered to continue the project.

I assume most of you know the game Minecraft, and I took that as a subject because it seems easy to make things out of that.

My idea was to make a program which allows you to see all the blocks in 3D by turning them around with the arrowkeys. No real practical use, but its good to start with and learn the basics.

This is my code thus far:



Lets just start with my first question,

Is it possible to implement 3D models like blocks instead of using
?


Second question,
I am trying to loop random sound effects on a timer, so far I have this,

My problem is though that the command rnd does not actually makes the pattern random, it generates a pattern and follows the pattern each time it launches, so eventually it resumes where it started and follows the same pattern it did before. There should be a way to randomize it right? Also, I want to play random sound effects (ID 10-19) once every 60 seconds, but how do I do that?

My last question,
I want to make a menu with resolution settings and the choice to select certain blocks to be showed. So when I see a dirt block and I want to see a cobblestone block, I go to the menu and click on "Cobblestone" and then the screen displays a cobblestone block.


Thanks in advance for helping me,
Ladathion

Learning to program with Dark Basic
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 3rd Aug 2011 16:48
1) Yes, use
You will be able to make external objects with a seperate program such as Blender, Milkshape, AC3D etc.

2) Look into the command
. Usually used like this :


3) Look into TDKs menu tutorials, they are somewhere at the top of one of the boards as a sticky.

TheComet

Schnide
22
Years of Service
User Offline
Joined: 18th Oct 2002
Location: The DarkBASIC Side of the Moon
Posted: 3rd Aug 2011 17:24
@Ladathion

I'd suggest reading this document - it explains the Randomize issue very well and offers a host of other insights:

http://www.madladdesigns.co.uk/extras/DBProGuide.pdf
Ladathion
13
Years of Service
User Offline
Joined: 3rd Aug 2011
Location:
Posted: 3rd Aug 2011 17:37
Thanks for the quick replies, but I have one more question, I wanted to make a zoom in/out function on the blocks, so that you can zoom in and out on how big the block is. Ive searched the forum on "zoom feature" etc but I couldnt find anything.

Learning to program with Dark Basic
Ladathion
13
Years of Service
User Offline
Joined: 3rd Aug 2011
Location:
Posted: 3rd Aug 2011 18:05
I just made a cobblestone block with Cinema 4D, I exported it into an .xml file and added this code;


But it will not show the object when I compile and run it, does anyone know whats wrong?

Learning to program with Dark Basic
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 5th Aug 2011 04:14
Yep, you need to export it as a .x file not a .xml file.

Warning! May contain Nuts!

Login to post a reply

Server time is: 2024-11-22 18:47:03
Your offset time is: 2024-11-22 18:47:03