views:

253

answers:

5

I'm coming to the end of my first year of CS and I thought a great way to consolidate all the things I've learnt this year would be a personal game project.

I would like to implement a 2D based rts, I'm thinking along the lines of starcraft I, warcraft II or even command and conquer. I will have about 3 months without interruptions to implement the game.

So to anyone experienced with java game programming, I have a few questions:

Is it realistic to design a 2D rts engine from scratch in 3 months? If so what are some good books/resources to get started?

Would it be better to modify some existing project? I would think the experience of having to work with a lot of someone else's code would be good since our exposure to such topics in an undergrad cs degree seems very rare, if non-existent.

Are there any decent open source 2d rts projects that anyone could recommend? I've looked through a few but most seem to be written in c/c++

My humble thanks

Edit: Thanks for the quick responses, I think that perhaps it was a bad idea to post this in a rush since I think I misrepresented what I want to do.

When I say "along the lines of warcraft II etc" I mean more like that style of rts using sprites. I don't intend to implement a game nearly that complex, more like just a basic prototype.

My goal would be some thing more like a flat textured map with some basic obstacles like trees, a single unit producing structure like a barracks. I'd like to have the units to have health bars, be able to move and attack and die (and possible morph into another unit).

Far off goals would be to implement some basic pathing using a modified version of the dijkstra shortest path algorithm, ranged units with missle attack, etc.

I don't plan to implement any opponents or ai or networking or anything like that.

+6  A: 

It is very unrealistic to think you could implement a 2D RTS engine anywhere even close to the complexity in those kind of games. You could maybe get something very rough if you were experienced, but with only one year I think it's doubtful.

I can't help but feel like it would be much better for you if you used an existing engine or framework and built off of it. Like you said, working with other code would probably be a good learning experience as well. It would allow you to experiment without getting bogged down in having to do everything.

AHungerArtist
+4  A: 

Keep it simple or you will simply drown in complexity before getting around to have anything playable. Since you have not tried it before, you will have a lot of nuts to crack and you don't know how long they will take.

Also remember that report writing and documentation takes time too.

The idea is good, and I think you can pull off a whole game if you find good building blocks. I would suggest discussing this with your teacher to hear what is acceptable for you to use. Would it e.g. be ok to do a game on an open source engine if you add some non-trivial functionality?

Update: Seems to be several engines available from Java at http://www.devmaster.net/engines/list.php?fid=6&sid=1

Thorbjørn Ravn Andersen
Real game developers leave writing reports and documentation until after testing. That is, we let the users do all of that. :)
dash-tom-bang
What does Real Time Strategy Game developers dó then?
Thorbjørn Ravn Andersen
+2  A: 

Perhaps it would make sense to look at some existing efforts to get a feel for the scope of what you are looking at. These should give you some ideas or even code to build on:

http://www.duncanjauncey.com/btinternet/old/javagame/game.html

http://en.wikipedia.org/wiki/Lightweight_Java_Game_Library

http://www.ardor3d.com/

http://en.wikipedia.org/wiki/JMonkeyEngine

It would be a lot for me to bite off (from scratch) in the time given that is for sure. That is about all I can say.

EDIT: I thought maybe JOGRE was not what you are looking for. Then I thought about it and it seems like it would have all the right kinds of plumbing for what you are trying to do.

EDIT AGAIN: After my answer, one of the related questions links on the side seemed relevant: http://stackoverflow.com/questions/987579/java-game-programming-jogl-vs-lwjgl

Justin
Thanks Justin, I think duncanjaunceys game will provide a good base to create a 2d RTS
avatarX
+12  A: 

I'm thinking along the lines of starcraft I, warcraft II or even command and conquer

Make sure you purge your mind of matching the full scope of any of those. They took large teams of developers multiple years to make, with multi-million dollar budgets, so you can't even hope to approach those. They're called AAA for a reason. That being said, there's no reason you can't very minimally ape their design, or make a tiny game in their genre, assuming you have previous experience making small games.

A sub-genre of RTS that might be doable in that amount of time is a Tower Defense game. Plants vs Zombies is a good example. The reason I suggest this sub-genre is that you can avoid implementing any sort of AI or path-finding, which are notoriously difficult to get working, and I think technically impossible to implement "perfectly", especially with a limited CPU budget.

Make sure to reign in your scope. Favor a "complete" game over new features, because you can then call it "done" at any time. Get your game playable ASAP, and don't sweat the polish or details until you have to. Add one enemy type and one type of player unit (with only one ability, if you were thinking of implementing multiple abilities per unit). Make a title screen, menus (even if the menu is just "click screen to play"), game over screen, level complete or stat screens, cross-level player statistics, etc. Once you have all that ironed out, spend equal time adding new features and polishing the gameplay/graphics/bugs.

Once you have a playable, "complete" game ready (no matter how small in scope), find a real artist to do graphics for you. A shiny game always draws an audience, no matter how simple the gameplay.

Merlyn Morgan-Graham
Thanks Merlyn, you have a good point. I'm actually thinking of something even more simple than that, but extending it into some sort of tower defense would be an excellent idea once I have something playable.
avatarX
+1 for recommending game "completeness" first and foremost.
Jake
+3  A: 

People often forget, that creating games is MUCH MORE than just coding the technique thing. Its about content creation, game design, sound and music, the "fun factor". If you make heavy use of existent APIs or engines, it will be possible, but writing it from scratch with no experience in 3 month is like asking yourself if you can code 100,000 LOC in this time which means 1111 LOC per day. This might be possible, but not if you have to desing and think, and just having the code makes no game.

InsertNickHere