Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 [FP] Real Time Strategy
Index ->, Contests -> [FP] 2005/2006 Archive
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Vote: What do you think of Java RTS?
(No ending time set)
 28%  [ 4 ]
 35%  [ 5 ]
 14%  [ 2 ]
Needs Improvement
 7%  [ 1 ]
 14%  [ 2 ]
Total Votes : 14

Author Message

PostPosted: Sat Apr 29, 2006 7:07 pm   Post subject: [FP] Real Time Strategy

I did this project for my Grade 12 Computer Programming Course.
Its a Real Time Strategy written in Java, and plays similarly to Age of Empires.
Read the 'ReadMe' for a more in depth description of how to play.

Click 'RTS Game.html' to play the game.
Real Time Strategy

 Filesize:  674.4 KB
 Downloaded:  360 Time(s)


PostPosted: Sun Apr 30, 2006 12:55 am   Post subject: (No subject)

Looks great! Very playable and not too hard to understand. You have some nifty features which one would not expect from something like this (ie. rally points).

Some suggestions:
-Avoid the ability to stack buildings.
-Clicking is a tiny bit too delayed.
-How about some more stuff to do in-game? It's a great shell for a game, but there's not much one can do.
-A selection box, as is seen in most RTS games would be nice and make it easier to control multiple units.

Also, I attacked the other base's settlers, and then my units moved off the screen or else just disappeared... What's this? Smile

PostPosted: Tue May 02, 2006 12:45 am   Post subject: (No subject)

I have a system implemented to disable placing buildings on top of eachother using base bounds for buildings (no..not too advanced, lol).. but for some reason it appears it doesnt work too well after the game starts.
I tried to get a selection box working.. I truly did.. but I havent been able to get java to produce an (xy) co-ordinate ever unless occurs after a user clicks. (I am using the mouseListener class for this.. it doesnt work properly Confused )
Clicking isnt delayed on my computer.. but I didnt code this game particularily well, but ive learned a lot since I made this.
When you attacked an enemy.. well, he ran, lol. If you check where he was heading on the map (or look on the minimap) you can follow where he is running away too. (When they die, they disappear Wink )
Im not sure if I mentioned it.. but the AI doesnt really work. I have over 600 lines of AI code, which "should" have worked.. but doesnt, owell.

There is a bit to do in the game, you can build a small civilization, construct a castle, infantry units, even catapults. You can advance units, etc. But if you saw the AI working like it was 'supposed to', you would be a little more impressed. But I guess that was a failure
Crying or Very sad

PostPosted: Tue May 02, 2006 1:30 am   Post subject: (No subject)

hmm... well my CPU usage jumps to 100%.. things are very unresponsive, it's just about impossible to complete the order to build something (I can select a building, but not actually click on map to confirm location). Workers gather resources though.. Confused
Latest from Tony's programming blog. DWITE - a programming contest.

PostPosted: Tue May 02, 2006 1:46 am   Post subject: (No subject)

Seems like a lot of stuff we're missing out on. Sad

Anyway, I didn't have any of those problems Tony (other than 100% CPU).

The problem you're having with MouseListener could be the same I was having. You should have a mouseCoordsUpdate method (or whatever you're using) for mouseDragged() and mouseClicked() or mousePressed(). This is just a guess, but it's worth a shot.
Oh, and the mouse delay problem only happened at first, it seems to be gone now.

*edit* Sometimes the game says "you need a settler in the college for that", but what you really need is a settler in the barracks. I couldn't find out how to build the helots (I think they're called), whenever I build one the population of the barracks went down by one and nothing happened. Also, what do you do with a castle?

On the up side, another feature I wouldn't expect: two settlers working on one building to make it finish faster.

PostPosted: Wed May 03, 2006 1:08 pm   Post subject: (No subject)

Tony... I have no idea why those errors are happening for you Confused .
I guess I forgot to change 'college' to 'barracks', woops! Sorry guys Sad

Place a Settler inside, train him to become a War Minister
Place a Settler and a War Minister inside the Barracks
With a War Minister inside the barracks, he can train a Settler to become a Helot.

I made the game semi-realistic. Like.. in AOE you just suddenly 'produce' a knight out of a building.. lol? In this game, you bring a Settler, train it to become a 'teacher character', and put him inside the building. Then this 'teacher character' can train other characters to do different things.

A couple things...
-Engineers are highly skilled builders, who can build buildings up to 4x faster then Settlers. They can also develop Catapults too.
-Castles are utilized as an outpost. They can hold 50 people inside.. so if an enemy were to be walking by, you could spring out up to 50 soldiers to the rally point quickly and annihilate them Very Happy .. who suspects an army to be in a castle... err? Haha

Anyway.. Tony, I think your problems are caused because your computer isnt fast enough to process the game. The reason I didnt post the source is because im not proud of it.. at all. Ive learned a lot since I made this RTS, and I didn't particularily structure my code well.. which is why it is taking 100% of CPU usage Mad . (Im not sure if this is the problem for you building things.. but you click a 'Build xxx' option from a Settlers menu, click where you wish to place it on the map, and press Enter to confirm it.)

Thanks for the feedback.

PostPosted: Thu May 04, 2006 6:37 pm   Post subject: (No subject)

I couldn't figure out what to do with Scholars or Houses...And when I attacked an enemy villager, the amazing race started. My guy chased the computer right across the map (upwards), but continued to move and lose health even after he killed his enemy. Good effort! I love the rally points...Java's a tricky one to work with Razz

PostPosted: Thu May 11, 2006 8:54 pm   Post subject: (No subject)

Holy dude your probably the best programmer in your class.

PostPosted: Thu Jun 22, 2006 9:11 am   Post subject: (No subject)

This is really good. I have noticed some bugs, but i haven't learned java yet so i don't know what it is like. I have seen code for it from the grade 12 programming class in my school, and i will be learning it next year. But otherwise, again, nice program.

PostPosted: Mon Jun 26, 2006 5:11 pm   Post subject: (No subject)

im impressed, how did you go about outputing the images to the screen.. do you use GUI frames and containers, or just raw xy coords and images Confused

Either way. pretty good, but a little buggy.. i put a settler into a barracks and i was able to train a heliot. .but the second time i did it was just a black hole for settlers.. . scrolling ability would be nice... (using keys at least)

Display posts from previous:   
   Index ->, Contests -> [FP] 2005/2006 Archive
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 10 Posts ]
Jump to: