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.

Code Snippets / [STICKY] The RTS is back!

Author
Message
sadsack
16
Years of Service
User Offline
Joined: 27th Nov 2003
Location: here
Posted: 3rd Feb 2005 08:44
I love you code I got my civil war game going now. thank You I can't wait for more

renny
LeaderOne
16
Years of Service
User Offline
Joined: 9th Jan 2004
Location:
Posted: 3rd Feb 2005 20:49
as always, it always very golden.

thanks

"Chicken is nice"
Digital Dragon
15
Years of Service
User Offline
Joined: 17th Dec 2004
Location: ...
Posted: 7th Feb 2005 03:53
BTW i might be wrong but "were the hell are the models for ur l8test code snippet!".

Mrnaughty is my name being NAUGHTY is my game. lol
Phaelax
DBPro Master
17
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 7th Feb 2005 09:54
I thought I mentioned where the models came from, but I can't find the post. Here's a download.

"eureka" - Archimedes

Attachments

Login to view attachments
Digital Dragon
15
Years of Service
User Offline
Joined: 17th Dec 2004
Location: ...
Posted: 7th Feb 2005 15:10
thx

Mrnaughty is my name being NAUGHTY is my game. lol
Balthazar
15
Years of Service
User Offline
Joined: 29th Jan 2005
Location: Cyberspace
Posted: 7th Feb 2005 17:51
I think this is worth being a sticky
if it already is, my bad.
Also, i think Dungeon Keeper 2 RULES too.

P.s, im making a remake of it!

Lemony Snippets for Lemony games
TEH_CODERER
16
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 7th Feb 2005 20:01
Damn you!
So was I!

[url]andrewneale2004@yahoo.com[/url]
http://www.freewebs.com/elbsoftware/index.htm
Spline
15
Years of Service
User Offline
Joined: 30th Oct 2004
Location: London U.K
Posted: 8th Feb 2005 04:22
nice work Phaelax
Matto
17
Years of Service
User Offline
Joined: 27th Aug 2002
Location:
Posted: 8th Feb 2005 09:26
About to check it out, no doubt as these all said it will be great thanks

AMD XP 2500+,512 DDR RAM 2700, GFFX 5600 256DDR,SBLive 5.1,Win XP
Best Upcoming MMOG - http://WWW.Atriarch.com
Project: Cluckie Egg
Balthazar
15
Years of Service
User Offline
Joined: 29th Jan 2005
Location: Cyberspace
Posted: 8th Feb 2005 14:19
Oh, ummm, with the .dba file, it dosent work, also could you make a dbc enhanced version of the tut, and finally, in the first tut it says that theyr will be a third edition of the tut called "polishing off an rts" , will that be out any time soon, oh, and also, in the second tut, it says "step eleven, unknown", er, what do you mean by that, thanx!
Also, i think these tuts rock! Good job Phaleax!

Lemony Snippet

Lemony Snippets for Lemony games
Phaelax
DBPro Master
17
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 8th Feb 2005 15:58
What errors are you getting on the source? "step 11: unknown" means I haven't written anything for that section yet. There will not be a dbc version.
"polishing an rts" will discuss things such as particle effects and other eye candy. It will not be done until I feel that this one is fully completed. Most likely, that won't be anytime soon.

"eureka" - Archimedes
LeaderOne
16
Years of Service
User Offline
Joined: 9th Jan 2004
Location:
Posted: 13th Feb 2005 17:51
getting better and better

"Chicken is nice"
LeaderOne
16
Years of Service
User Offline
Joined: 9th Jan 2004
Location:
Posted: 2nd Mar 2005 21:10
btw, if you don't have multi in mind when you start, you'll have to redo the whole program structure for multi!

"Chicken is nice"
Phaelax
DBPro Master
17
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 4th Mar 2005 12:29
why's that?

"eureka" - Archimedes
UnderLord
16
Years of Service
User Offline
Joined: 2nd Aug 2003
Location:
Posted: 4th Mar 2005 15:29
Phaelax, what do you do for fun?

heh this tutorial is really great....take me sometime to get upto your level though the code is way over my head right now...but i guess for you its just standard stuff heh...

I'd hate to see him like extremely bord if that ever happens he might code the cure for cancer in DBP =P

The search continues.

Current project - A space game
Deadwords
15
Years of Service
User Offline
Joined: 2nd Feb 2005
Location: Canada
Posted: 5th Mar 2005 07:42
It's cool! THanks Phaelax!

PDAC 4 Ever! http://www.pdac-online.com
Current Projects: House Maker 1.0, The Killer 3D
[url=www.pdac-online.com][img]www.pdac-online.com/PDAC%20Logo.jpg[/img][/url]
Trev
16
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Canada, Ontario
Posted: 5th Mar 2005 23:57 Edited at: 5th Mar 2005 23:59
i changed some things in Phaelax's program. I changed the group system so it works properly (same controls but some minor changes). I also made it so it shows a sprite for every unit selected. But this is almost all Phaelax's program... i just decided to change a few things (not nesesarly better but i like them) and i decided to post it because others may find it useful.

The media you use dosnt really matter, but their are 3 different images in this program. two are "blank.bmp", "blank2.bmp" which are just to show what objects are selected (blank=soldier, blank2=worker) theirs also a bottom menu bar... but just to make it look more organized.(this is whats in the download)

EDIT: sorry i just realized i used sync rate 0 in the startup..just to let you know, so you can change it.

Trevor Somerville

Attachments

Login to view attachments
LeaderOne
16
Years of Service
User Offline
Joined: 9th Jan 2004
Location:
Posted: 9th Mar 2005 21:45
@phaelax: A.k.a Firewall. Core program structure made multi impossible.

On second thoughts, i'm sure you're good enough to get around this anyway.

"Chicken is nice"
Phaelax
DBPro Master
17
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 21st Mar 2005 11:24
Updated tutorial, now added pathfinding with the use of IanM's A* library. The pathfinding step is on pages 17-19.

Attached is the full tutorial up to step 11 with source code and IanM's library included. Some changes were made to the library just to make it work with current DBP patch.

Changed code from this:
exitfunction SEARCH_SearchPath(Path, SEARCH_PathSize(Path)-Move).Y
to this:
temp = SEARCH_SearchPath(Path, SEARCH_PathSize(Path)-Move).Y
exitfunction temp



Not sure why returning values like that cause problems some times and not others, but I that's all I changed.

Note that the resource gathering temporarily will not work after you update your code to follow step 11. If you understand it, it's easy enough to code yourself. I'll fix it soon.

"eureka" - Archimedes

Attachments

Login to view attachments
LeaderOne
16
Years of Service
User Offline
Joined: 9th Jan 2004
Location:
Posted: 14th Apr 2005 23:45
hey... i read it again and if you were to upgrade armour, all players armour would change, not just yours.

(read the character creation sections)

"Chicken is nice"
Phaelax
DBPro Master
17
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 16th Apr 2005 10:22
That was purposely done, so that when you upgrade a Grunt's armor, all the grunts receive the effect. If you wanted something with more individual control so that you could create heroes, such as in Warcraft3, then add an armor attribute to the "character" UDT. The the armor stat would be individual for each and every unit, regardless of whether they are the same type or not.

PETA - People for the Eating of Tasty Animals
UnderLord
16
Years of Service
User Offline
Joined: 2nd Aug 2003
Location:
Posted: 16th Apr 2005 15:51
You know i'v downloaded each and every one of these RTS tuts but yet i havent even read them...guess i should get on it eh?

BTW when i read them im sure i'll be saying "nice phaelax"

so in advance

Nice Phaelax

When we talk to god, we're praying. When god talks to us, we're schizophrenic.
Schizophrenic beats eating alone.
Phaelax
DBPro Master
17
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 17th Apr 2005 04:11
The last download on this page, 4th post from above this one, contains the current version of the full tutorial. So that's the only one you need to download, no need to worry about those misc pieces.

PETA - People for the Eating of Tasty Animals
UnderLord
16
Years of Service
User Offline
Joined: 2nd Aug 2003
Location:
Posted: 18th Apr 2005 03:42
Alright got it thanks =)

When we talk to god, we're praying. When god talks to us, we're schizophrenic.
Schizophrenic beats eating alone.
LeaderOne
16
Years of Service
User Offline
Joined: 9th Jan 2004
Location:
Posted: 19th Apr 2005 23:43
I meant as the armor from different players -- i.e. blue researches 'gooey armor plate' but red dosen't. As it happens though red would the 'gooey armor plate' bonus as well!



"Chicken is nice"
Phaelax
DBPro Master
17
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 20th Apr 2005 04:16
you should have seperate arrays for each team in the game.

PETA - People for the Eating of Tasty Animals
ALPHA ZERO PRODUCTIONS
16
Years of Service
User Offline
Joined: 28th Sep 2003
Location: Mom ! I forgot where we live !
Posted: 7th May 2005 09:43
nice stuff Phaelax.

Phaelax
DBPro Master
17
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 8th May 2005 04:45
woh, when did this become a sticky post?

PETA - People for the Eating of Tasty Animals
UnderLord
16
Years of Service
User Offline
Joined: 2nd Aug 2003
Location:
Posted: 15th May 2005 16:04
I guess when they decided to make it a sticky? thats a good idea....

When we talk to god, we're praying. When god talks to us, we're schizophrenic.
Schizophrenic beats eating alone.
DLS
16
Years of Service
User Offline
Joined: 6th Jul 2004
Location: Wet And Windy Britain
Posted: 16th May 2005 04:53 Edited at: 16th May 2005 06:57
i'm having a look at the tutorial. looks really gr8 but i got a slight problem with it.

when i run your tutorial code it comes up saying it can't include the a star file.

i decided to do a little rewrite of it and it seems to include the a star file this time. but when i try and compile the code i get this error

"Could not understand command at line 28"

that is the line that says

CreateSearchMap(mapX, mapZ)

as far as i'm aware the code is correct but what could be wrong?

if you can tell me whats up then i think it should work

i'm using the 5.8 update btw

thnx

[EDIT]

figured out the problem with it. was my fault. but anyway looks good. just wondering about the animation frames. how did u know what numbers are for what?

system specs: AMD XP 3000+, 512Mb DDR333, nvidia ge-force FX 5600 128MB, 1x8Gb & 1x40Gb HHD, 52x CD drive, DVD+RW 4x, Sound Blaster 128.... all in a Nokia 8310 case :0D
Phaelax
DBPro Master
17
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 6th Jun 2005 08:54
The guy that made those great dwarf models included a text file containing the frame numbers for each animation sequence.

PETA - People for the Eating of Tasty Animals
kaymation
15
Years of Service
User Offline
Joined: 30th Mar 2005
Location: up, down, all around
Posted: 7th Jun 2005 07:27
it doent work on my computer i copied and pasted you code but it didnt work what does rts mean?

i owe all my wantingness to TBC at [href]www.homestarrunner.com[/href]
Mattman
17
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 11th Jun 2005 10:43 Edited at: 11th Jun 2005 10:43
Make sure you are using DarkBasic Pro.

RTS is a game genre, standing for Real Time Strategy (Age of Empires, Warcraft)

My less-pimp name was Mattman.
kaymation
15
Years of Service
User Offline
Joined: 30th Mar 2005
Location: up, down, all around
Posted: 18th Jun 2005 23:57
can some one compile it then?

i owe all my wantingness to TBC at [href]www.homestarrunner.com[/href]
Phaelax
DBPro Master
17
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 23rd Jun 2005 06:32
compile it? this is a tutorial, and if you don't have DBP then whats the point?

PETA - People for the Eating of Tasty Animals
kaymation
15
Years of Service
User Offline
Joined: 30th Mar 2005
Location: up, down, all around
Posted: 26th Jun 2005 10:12 Edited at: 26th Jun 2005 10:13
not the tutorial but the game in your very first post

i owe all my wantingness to TBC at [href]www.homestarrunner.com[/href]
Mattman
17
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 26th Jun 2005 11:31
It's not a very complete game, it's just the basic structure of a RTS.

God nobody reads signatures nowadays.
The admiral
17
Years of Service
User Offline
Joined: 29th Aug 2002
Location:
Posted: 8th Jul 2005 14:44
Where is all the media for this?

The admiral
Phaelax
DBPro Master
17
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 9th Jul 2005 03:42 Edited at: 9th Jul 2005 03:44
Here's the code and media, including the dwarf models:
http://forum.thegamecreators.com/xt/xt_apollo_download.php?i=496764

And here's updated tutorial with code and A* library:
http://forum.thegamecreators.com/xt/xt_apollo_download.php?i=528388


This is not a new, updated part of the tutorial, just links to all the files for those that are too lazy to look on the previous page 2 for them.

PETA - People for the Eating of Tasty Animals
LeaderOne
16
Years of Service
User Offline
Joined: 9th Jan 2004
Location:
Posted: 11th Jul 2005 14:51
how it coming?

"Chicken is nice"
Siege1975
15
Years of Service
User Offline
Joined: 27th Jul 2004
Location: UK - Wiltshire
Posted: 25th Jul 2005 10:41
This is a fantastic tutorial


Use http://www.whits-end.co.uk For Both Sites
The Ringmaster
15
Years of Service
User Offline
Joined: 19th Mar 2005
Location: Cyberspace
Posted: 1st Aug 2005 13:11
Yay!

This Tut rocks. It really helped me along for my new Dune Universe game. (Atreidies, Harkonnen, etc...)

Clouds float the exact same way bricks don't
- Douglas Adams
UnderLord
16
Years of Service
User Offline
Joined: 2nd Aug 2003
Location:
Posted: 26th Sep 2005 08:44
Quote: "Clouds float the exact same way bricks don't
- Douglas Adams"


LOL good sig =P

Yes this is a good tut but only if i was working on a RTS type game it'd help alot. But im not but its stil la good game.

When we talk to god, we're praying. When god talks to us, we're schizophrenic.
Fortune never calls on those that have no balls.
Peter H
16
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 1st Nov 2005 17:15
yeah, it's a great tutorial... i really like chapter 12

"We make the worst games in the universe."

Fneep
14
Years of Service
User Offline
Joined: 3rd Sep 2005
Location: In my house
Posted: 7th Dec 2005 09:16 Edited at: 7th Dec 2005 09:17
All Hail Phaelax! We are thy humble slaves!

Also, were did you get teh name Phaelax?

Shadowed Lightning
15
Years of Service
User Offline
Joined: 10th Nov 2004
Location:
Posted: 20th Jan 2006 19:31
Is this thread even alive anymore? I hope so, I need a little help.

AMD Athlon 64 3200 - GeForce 6800 GT - 320GB Hard Drive
1024MB RAM
Shadowed Lightning
15
Years of Service
User Offline
Joined: 10th Nov 2004
Location:
Posted: 21st Jan 2006 04:11
Sweet god of mercy, I think i just accomplished the first couple stages in my 2d Sprite RTS, check out the EXE!!! i is so happy! it is very messy so I am not sharing code right not, I need to remark, but here is the EXE so you guys can see how Phaelix's 3d RTS has been transformed.

AMD Athlon 64 3200 - GeForce 6800 GT - 320GB Hard Drive
1024MB RAM

Attachments

Login to view attachments
Fneep
14
Years of Service
User Offline
Joined: 3rd Sep 2005
Location: In my house
Posted: 26th Jan 2006 08:32
Phaelax? Phaelax? Oh Phaelax? Are you there?

Hmm... Does anybody know how old Phaelax is? It look's like she died on us...

Shadowed Lightning
15
Years of Service
User Offline
Joined: 10th Nov 2004
Location:
Posted: 26th Jan 2006 13:08
Lol ive been waiting froa bout a week for response from people, thought this thread was dead 0_o

AMD Athlon 64 3200 - GeForce 6800 GT - 320GB Hard Drive
1024MB RAM
Wolf Dreamer
14
Years of Service
User Offline
Joined: 13th Sep 2005
Location: the land of chaotic dreams
Posted: 27th Jan 2006 18:56 Edited at: 27th Jan 2006 19:19
When I run it, it doesn't fit the screen properly, it severely off to the right. Even changing my settings before hand so its 1024 by 768 instead of the usual 800 by 600, doesn't make any differance. It still loads up everything way over to the right side of the screen, with the left half of it blank.

Anyone else getting this problem?

[edited]
Doh! Nevermind. Use the arrow keys to move around.

I rush in and run something to look around at it before looking through the tutorial, as I'm sure most do.

This is a good start for things.

http://www.teamxtcgames.com/rts_tutorial_001.htm
Found another RTS tutorial which will show you how to move using the mouse at the edge of the screen, and other useful bits.

Dark Konflict has progressed far farther, with units not colliding with each other, and able to shoot at one another, as well as build bases, and have them produce things. Alas, they haven't opened source 99% of it yet, so there is still much work one must do on their own.

the last sane human being in a world gone mad

Login to post a reply

Server time is: 2020-07-15 20:02:52
Your offset time is: 2020-07-15 20:02:52