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 / Dose anyone know how to create a strategy game with DBC?

Author
Message
Lord Einstein
19
Years of Service
User Offline
Joined: 22nd Oct 2005
Location: Well here, of course...
Posted: 22nd Oct 2005 18:53
I have been trying to create a strategy game in DBC and I have found some problems with variables. I can create a strategy game but it takes 100s of variables just for a few units. Is there a way to reduce the ammount of variables needed?
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 23rd Oct 2005 02:44
Lord Einstein,

Well, first off, you haven't quite explained your situation thoroughly enough. Second, may I suggest using variable arrays?



+NanoBrain+
UFO
19
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 23rd Oct 2005 15:41
Yea. Something like this:
Unitdata(unit number,20(1 = x-coordinate 2 = y-coordinate 3 = health 4 = speed, etc.))

I'm a stupid n00b.
And I'm trying to make a MMORPG. OK, not that stupid...
The great saiyaman
22
Years of Service
User Offline
Joined: 11th Nov 2002
Location: Netherlands
Posted: 23rd Oct 2005 16:40
you can also use structs for this kind of game I suppose
Lord Einstein
19
Years of Service
User Offline
Joined: 22nd Oct 2005
Location: Well here, of course...
Posted: 23rd Oct 2005 21:31
Firstly, I am able to create a strategy game but it takes loads of lines of codes and loads of variables and I wanted to know if there was a simpler way.

Secondly, can someone exsplain what an array is then. I heard the name before and didn't quite understand the glossery. It sounds like what I was looking for so can someone exsplain it to me and how to use it.

Note: I am a noob to all this programming...
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 26th Oct 2005 06:27
Check out my tutorials for beginners on my web site. There is a series for people who have never programmed before and Arrays are covered in detail.

Link is at the bottom of my post.

TDK_Man

Lord Einstein
19
Years of Service
User Offline
Joined: 22nd Oct 2005
Location: Well here, of course...
Posted: 26th Oct 2005 18:31
Wow! Great tutorial, that must of taken you ages to write! I got the idea now, thanks.

Lord Einstein
19
Years of Service
User Offline
Joined: 22nd Oct 2005
Location: Well here, of course...
Posted: 28th Oct 2005 13:08
One more question. I'm having trouble right clicking to move. I can't seem to get the right position variables. I can only get the x position but then I can't get the z position, or the other way around.

The second line doesn't work. The z position is on the otherside of the screen.
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 28th Oct 2005 16:25
You've not been using the forums long enough yet to use the Code box in posts, so the Source button in your post doesn't work.

Use the Code button instead!

TDK_Man

Lord Einstein
19
Years of Service
User Offline
Joined: 22nd Oct 2005
Location: Well here, of course...
Posted: 29th Oct 2005 12:07
Ok:

Login to post a reply

Server time is: 2024-11-27 14:36:20
Your offset time is: 2024-11-27 14:36:20