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 / cubes making grid level

Author
Message
Dark Master Ev
15
Years of Service
User Offline
Joined: 18th Nov 2008
Location: That is a very good question...
Posted: 28th Feb 2009 19:06
sorry the title isn't very specific.
i'm trying to make an overveiw mining game.
where the whole level is designed like a grid make out of cubes where some have minerals like gold of silver etc.
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 28th Feb 2009 20:35
you don't seem to have asked a question?

Without Music or Love the world would be a very empty place... Thank god I still have music.. --'-<@
Dark Master Ev
15
Years of Service
User Offline
Joined: 18th Nov 2008
Location: That is a very good question...
Posted: 1st Mar 2009 17:54
oh... srry i'm trying to make the level out of cubes.
it is the level im having trouble with.

i want to make some solid some able to be drilled and some that can only be blasted.
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 1st Mar 2009 18:26
well, I'd use an array to store the co'ords of the blocks, what type they are, and whatever other data you need to use.

e.g.



I'd use a different object for each type of block. And perhaps consider cloning each block when creating the level rather than loading hundreds of the same object, which can take a while.

Hope that helps.

Without Music or Love the world would be a very empty place... Thank god I still have music.. --'-<@
Dark Master Ev
15
Years of Service
User Offline
Joined: 18th Nov 2008
Location: That is a very good question...
Posted: 1st Mar 2009 19:02
i'll try that thanks
Dark Master Ev
15
Years of Service
User Offline
Joined: 18th Nov 2008
Location: That is a very good question...
Posted: 2nd Mar 2009 05:26 Edited at: 2nd Mar 2009 05:57
i tried using the code.but what am i doing wrong! i can't even make one single cube show up. nothing will show up when i run it! here is the code
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 2nd Mar 2009 11:57
I've made a quick example for you to look over, I hope this is close to what you were trying to achieve.

It'll be quicker if you reduce the number of cubes. I really didn't know how big you were thinking of making the game.

I hope this code point you in the right direction Feel free to ask questions...



Without Music or Love the world would be a very empty place... Thank god I still have music.. --'-<@
Dark Master Ev
15
Years of Service
User Offline
Joined: 18th Nov 2008
Location: That is a very good question...
Posted: 3rd Mar 2009 06:32
this is very helpful but i can't figure out the colors part. is a clor assinged to eachtype of rock or am i mistaken?
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 3rd Mar 2009 10:48
What I have done is made 3 "template" objects, one green, one yellow and one grey.

These are coloured with the color object n,rgb() commands in the object creation bit.

The code then reads through the array and clones the relevent block depending on what the blocks(n).kind variable is set to.

You can obviously make more than just 3 kinds of block tho.

Without Music or Love the world would be a very empty place... Thank god I still have music.. --'-<@
Dark Master Ev
15
Years of Service
User Offline
Joined: 18th Nov 2008
Location: That is a very good question...
Posted: 4th Mar 2009 05:20
this goes for everyone who takes time to help newbies get the hang of coding thank all you guys

Login to post a reply

Server time is: 2024-09-28 02:26:19
Your offset time is: 2024-09-28 02:26:19