Computer Science Canada

My RTS game

Author:  Geniis [ Sun Nov 02, 2008 3:16 pm ]
Post subject:  My RTS game

K ive only known turing for about 2 months now so im not the best programmer out there but i think im dooing descent on this project.
Its an RTS based on the WoW 5v5 arena. Its no where near complete but ive got some of the basic stuff in it. Theres no enemies yet and you cant attack anything but
you can move your guys around the screen. There is a form of scenery in place, although its not too good..i plan to make it better soon. Also there is a working minimap
All the info is in the readme file. Please leave feedback and suggestions as to stuff i can add in the game and please post replys with any bugs you find it would really help.
Also if anyone is good at making spritesheets and would like to help PM me cause it would be greatly apreciated because i suck at making them.

Author:  metachief [ Mon Nov 03, 2008 10:31 pm ]
Post subject:  RE:My RTS game

Dude! Get rid of the usless loading screen! I can't understand people that make a loading screen for something that doesn't need to load! All it does is wastes time... after the first time I look at this game, I would not open it again because I wouldn't want to wait. Otherwise, I think you did a great job at it. I started on something like this a while ago, but gave up.

Author:  SNIPERDUDE [ Tue Nov 04, 2008 7:52 am ]
Post subject:  RE:My RTS game

It ran really slow on my computer.

Author:  Geniis [ Tue Nov 04, 2008 6:05 pm ]
Post subject:  Re: My RTS game

I know what ya mean meta when i posted this it was actually dooin sumthing, there was sumthing wrong with the pic files or sumthing and white wouldnt set itself as transparent so i made a quic proc to change anything that was white to white and thats what the loading screen was for ( it took a while to do that so it was to keep you entertained lol). Me beeing dumb i didnt think of dooin it once and then saving the result to bmp.
Now i did that so it Im getting rid of the loading screen and adding a bit of code for a basic attack. Also i put a grass background instead of just bright green. Ill post the update when im done.
And sniper sry it runs slow it goes through a 3mile long loop so its slow on some computers...works fine on mine but like crap on school ones...Im gonna work on makin it faster and using less code to get it to work...all the code is sloppy right now and if i went throught it i could probly cut out a bunch of it but i wanna focus on actually getting it done first.

Author:  S_Grimm [ Thu Nov 06, 2008 9:14 pm ]
Post subject:  RE:My RTS game

try procedures. they enable you to get everything out of one big giant loop, and are helpful for repetition (ie. attacking)

Author:  Clayton [ Thu Nov 06, 2008 10:52 pm ]
Post subject:  Re: RE:My RTS game

A\V @ Thu Nov 06, 2008 9:14 pm wrote:
try procedures. they enable you to get everything out of one big giant loop, and are helpful for repetition (ie. attacking)


Or better yet, try functions. Functions are infinitely superior to procedures in almost every way. Just about every procedure that does something useful can be transformed into a function.

Author:  Geniis [ Thu Nov 06, 2008 11:02 pm ]
Post subject:  Re: My RTS game

I am using procedures, but each procedure is 3 miles long lol. What i think i need to do is go through it all and find a faster way to do it all. Shorten it. I already did this once and managed to get rid of over 300 lines of code. It would help if it wasnt such a mess lol

Author:  Geniis [ Thu Nov 06, 2008 11:05 pm ]
Post subject:  Re: My RTS game

alright i think ill try putting in funtions... butwhat makes them so superior? Are they faster or something?

Author:  Clayton [ Fri Nov 07, 2008 12:24 pm ]
Post subject:  RE:My RTS game

For your reading pleasure:
Click! and Linky!

Author:  Insectoid [ Fri Nov 07, 2008 7:50 pm ]
Post subject:  RE:My RTS game

I find procedures are quite nice, though if I only need to return a single value, I will use a function instead. Perhaps I'm just good at deciding what to put in a procedure and what to do manually.

Author:  SNIPERDUDE [ Sun Nov 09, 2008 7:28 pm ]
Post subject:  RE:My RTS game

the slowness may be from:

1) Poor programming (coding) techniques.

2) Loops within loops. These are often unnecessary and really slow things down.

Author:  Geniis [ Sun Nov 16, 2008 11:22 pm ]
Post subject:  Re: My RTS game

I think its probly the first 1 cause im still not very good at this whole programming thing yet. And sorry its taking so long i just lost my desktop at home so now all i have to do this on is an old windows me laptop and it cant handle my game without intense lag so i only get to work on it at school. And i still cant seem to get it to run faster i dont know why. basically what it does when it draws the everything on the screen is :

Turing:

for i : 1..numberOfObjects %which could be anywhere between 1000-3000 i beleive
if thisObject(i) isOnScreen then
Pic.Draw(thisObjectsX(i),thisObjectsY(i), thisObject(i))
end if
end for
for  1..4  %number of characters
if character(i) isOnScreen then
Draw.Pic (characterX(i),characterY(i),characterPic)
end if
end for


this is just psuedo-code ish but it gives the just of it
plus it goes through a loop this long again to check for colision and thats not even very good yet

if anyone has any suggestions on how to make this loop smaller please leave a comment
cause im having trouble figuring it out


: