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 / RTS buildings

Author
Message
Soroki
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: United States
Posted: 29th Aug 2006 21:18 Edited at: 29th Aug 2006 21:56
I am going to make an RTS soon, when I can get enough code help for it. I need a code where you can select a building or two from a menu and place it on the map. I can't download Phaelax's RTS tutorials cuz I am at school, so can anyone post maybe the code on here? You can make the buildings into primitives if you want.

EDIT: oh yeah, this is for DBC
EDIT(again): DBC Enhanced. I always forget...

If we're here to help others, what exactly are the others here for?
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 29th Aug 2006 22:25
This part may be a bit complex. Do you want the building icons to be 2D or 3D? (2D is easier, and it is what most games follow. However, I could try to make more of a 3D thing if you needed it...)

But basically what you need to do is check to see if the button in the menu is highlighted and clicked, and then you need to make the game react by making an object to place. This is hard though (I can't do it in DBC)... Maybe keyboard controls would be easier.

Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 29th Aug 2006 22:26
Try to start with something simple first dude...

you cant code an RTS if you cant even make an object appear at the map with mouseclick!

FPSC-Toolkit in the make.Progress log:
FPSC-Segments 35%---FPSC-Entity 's 0%---FPSC-Signs 0%
FPSC-Decals 0%---FPSC Characters 0%
Soroki
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: United States
Posted: 30th Aug 2006 20:26
Dude, I can do that much. It's just hard to make the object appear where ever you click. I can't exactly figure that out. I already coded the scrolling for the camera myself because when someone posted a code it wouldn't work. I want object buttons to be 2D by the way. I know an RTS is not exactly the easiest game genre to make, but that is all I ever play.

If we're here to help others, what exactly are the others here for?
Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 30th Aug 2006 21:16
try this for the building placement :

http://myopia.c-reality.com/archives/5-3D-Coordinates-from-Mouse-Screen-Position.html

FPSC-Toolkit in the make.Progress log:
FPSC-Segments 35%---FPSC-Entity 's 0%---FPSC-Signs 0%
FPSC-Decals 0%---FPSC Characters 0%
Soroki
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: United States
Posted: 30th Aug 2006 21:29
Ouch...that code is good, but OMFG it is complicated. I guess I have some studying to do...thanks though. Very nice.

If we're here to help others, what exactly are the others here for?
Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 30th Aug 2006 21:40 Edited at: 30th Aug 2006 21:40
i just found it too

i just do research if needed

OUCH!

i just noticed you have DBC(ENCHANTED)

dont know if its works for that...

FPSC-Toolkit in the make.Progress log:
FPSC-Segments 35%---FPSC-Entity 's 0%---FPSC-Signs 0%
FPSC-Decals 0%---FPSC Characters 0%
Soroki
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: United States
Posted: 30th Aug 2006 21:51
oh, okay. I'll try it though.

If we're here to help others, what exactly are the others here for?
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 31st Aug 2006 00:54
It doesn't. But it's not really that hard to make vectors form scratch, it's just faster if it's built in.

Soroki
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: United States
Posted: 31st Aug 2006 20:57 Edited at: 31st Aug 2006 20:58
Oh. Well that sucks. I think I may be able to figure out this code myself. I just realized that placing objects is not as hard as I thought. I just need buttons that actually work.

If we're here to help others, what exactly are the others here for?
Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 31st Aug 2006 21:45
I only got DBP codesnippets i made from DBC snippets...

FPSC-Toolkit in the make.Progress log:
FPSC-Segments 35%---FPSC-Entity 's 0%---FPSC-Signs 0%
FPSC-Decals 0%---FPSC Characters 0%
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 1st Sep 2006 01:32
I've got some really messy code for you to try. It was originally going to be something else but then I had to change it, thus the messyness. Anyway, here you are.



Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 1st Sep 2006 20:37
Did you try it at all yet?

Soroki
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: United States
Posted: 1st Sep 2006 20:50
No, sorry. I have to print it and wait till I get home from school. I type it out when I get home. It really is annoying, but until I get a USB stick, it's all I can do. But I do thank you. Sorry if it was any trouble to change the code.

If we're here to help others, what exactly are the others here for?
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 1st Sep 2006 21:56
Or, you can go home, go on the internet, (unless school is the only place where you have it) and then copy/paste the code at home?

Soroki
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: United States
Posted: 1st Sep 2006 22:01
I have the internet at home, but I don't have it on my PC. I may be getting it soon, and unless I can convince my parents to allow me to install DB on their computer so I can copy source codes, I have to stick with the printing and coding. I messed up yesterday when I used your RTS camera code. I was able to scroll off the map, but I read back trhough and fixed it. Perfect code BTW.

If we're here to help others, what exactly are the others here for?
Mickm
18
Years of Service
User Offline
Joined: 22nd Apr 2006
Location: Kingston, ON
Posted: 1st Sep 2006 22:11 Edited at: 1st Sep 2006 22:14
Not to go off topic but perhaps this will help OnlineNotes http://onlinenotes.gamestack.org

*** Edit: Miss read your post... I hope you can convice your parents soon

Online Flash Games and Guides .::. http://www.gamestack.org
Online Notebook .::. http://onlinenotes.gamestack.org

Attachments

Login to view attachments
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 1st Sep 2006 22:17
Ah I see. Hope you can get internet/some kind of floppy disk/USB memory thing soon!

Ginga
18
Years of Service
User Offline
Joined: 3rd Jul 2006
Location: Dorset, England
Posted: 2nd Sep 2006 19:14
sometimes, i use my MP3 player as a storage device the usb connector is pretty bog-standard.
Soroki
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: United States
Posted: 5th Sep 2006 16:42
Well, I got a USB over the weekend, so now I can get the code right without having to type it in by hand. I messed up when I was typing it so I gave up. But now I can find out whether it works or not.

If we're here to help others, what exactly are the others here for?
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 6th Sep 2006 09:19
a usb what?

"Using Unix is the computing equivalent of listening only to music by David Cassidy" - Rob Pike
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 6th Sep 2006 14:45
Surprised that noone else has said it yet, but this sounds like Gimme Da Codez!

Soroki
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: United States
Posted: 6th Sep 2006 20:21
USB Flash Drive. And what do you mean this sounds like gimme da codez?

If we're here to help others, what exactly are the others here for?
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 7th Sep 2006 21:03
It got hard, you gave up. Yet somehow, through use of a flash drive, you're able to find out if it works or not. What does a flash drive have to do with testing unfinished code?

"Using Unix is the computing equivalent of listening only to music by David Cassidy" - Rob Pike
Soroki
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: United States
Posted: 7th Sep 2006 21:39 Edited at: 7th Sep 2006 22:10
You do not understand, do you? It did not get hard, I was freaking tired at 1:00 in the morning on a school night, I am in 11th grade and it's stressful going through school and trying to learn programming at the same time! Why bother helping someone if they F it up anyway? So my friend gave me a flash drive so I could get the help I need without errors and so I could study the code and learn each part for future reference. I don't just take everyone's codes for my own and paste them in DB, I actually learn about them. So get off my back and don't try to understand what you cannot!

EDIT: I am offended, just thought you should know.
EDIT(again): a flash drive is useful. I just put the code into notepad, take it home, and see if it works, then I look at it and figure out what does what.

If you don't learn from your mistakes, you might as well stop programming...
Frozen Flame
20
Years of Service
User Offline
Joined: 22nd Jul 2004
Location:
Posted: 10th Sep 2006 23:46
ah brutal guys..

ok well soroki here doesnt have internet in his bedroom, and i gave him a flash drive just recently to help him get files and programs off the forums and get help rather then using a notebook to write down code.

ill have you know soroki is not a "gimme da codez" type guy.. and you know this community would be better if you all would instead of throwing people down when they ask for your help, to rather give it to them, and help them.

How can anyone develop into game programming, without a supporting community.. isnt this forum catagory ment for experianced members to help noobs to the program?

If you cant help, why are you even responding. Why are you bashing someone who doesnt understand.

Anyways...
Soroki says "sixtysquares, the code worked. thankyou."

cya.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 12th Sep 2006 03:51
Quote: "So get off my back and don't try to understand what you cannot!"

I can't understand? Try explaining it better before yelling back at the guy whose tutorial you tried to use in the first place.

To me it sounded like you just gave up completely, not quit for the night, my mistake. But nowhere in this talk about the flash drive did you say the purpose of it or that any code was on it. FF wrote some code, stuck on the flash drive which was later given to you. Far as I could tell, he gave you a flash drive and the code you already had just worked. See the confusion?

I try to help whenever I can, but I need to understand what's going on first.

Here's the DBC code from the tutorial, but I'd recommend having your friend download the whole zip to the flash drive for you. You can't download the file to the flash drive at school?

Also, note that this code is very outdated when compared to the DBP code, which is what I moved on with while doing the tutorial.


"Using Unix is the computing equivalent of listening only to music by David Cassidy" - Rob Pike
Soroki
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: United States
Posted: 12th Sep 2006 16:49
Alright. Sorry for being such a jerk. I am really hating school right now, and everyone at school sucks. They all push me around and whatnot because I am shorter than most juniors. I just think that some people in the world need to get their lives together and understand that they are hurting other people. Sorry again. I put the code on the flash drive that Frozen gave me at school the monday after I got it. It worked very nicely. I thank you very much for helping me and I really am sorry for my comments. If anyone felt like I was an a$$, then don't take it personally. I will be sure to look at that long tutorial tonight and try to better understand it. I think I can get the hang of this programming thing after a while.

The program is only as good as the programmer...
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 13th Sep 2006 00:06 Edited at: 13th Sep 2006 00:15
Let me know if you get stuck on anything. It's been years since I've really looked at the DBC code for that, so there's no telling what could be wrong.


This took a few minutes to find, but here's a thread you might want to check out. The code is DBP, but with some careful coding you should be able to make it work in DBC.
The code demonstrates how to create a build queue for a building and produce units.
http://forum.thegamecreators.com/?m=forum_view&t=79116&b=7

"Using Unix is the computing equivalent of listening only to music by David Cassidy" - Rob Pike
Soroki
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: United States
Posted: 13th Sep 2006 21:04
Okay, thank you for your help. I say once again, sorry for being such an idiot and taking offense at the stupidest of things.

Downfall:Arena by A Squared Software is currently in development. Features full online or AI multiplayer maps, with 35 online maps and 15 AI maps. Demo release date will be somtime in October.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 14th Sep 2006 01:47
no worries, we just had a slight communication problem

"Using Unix is the computing equivalent of listening only to music by David Cassidy" - Rob Pike

Login to post a reply

Server time is: 2024-11-27 07:56:31
Your offset time is: 2024-11-27 07:56:31