So I've seen people do small scale rts games in the browser, and I just want to know, where does one start? I've created small one player games with js+html5 so I know the basics. What resources would be best to read into for starting this kind of a project?
-
1If you are asking "where does one start?" then probably you lack the necessary experience to understand that this project is too big for you. Still you may want to learn WebSockets (google it) because it probably won't work without it. Also good server scripting will be required but probably noone will help you with this unless you have concrete question, concrete problem. – freakish Apr 02 '12 at 17:49
-
@freakish why does he have to learn websockets? whats wrong with normal sockets? Java and Flash both have sockets. I think with flash you only get tcp though. – WalterM Apr 02 '12 at 17:55
-
@WalterM He mentioned HTML5 but did not mention Flash or Java. I assumed that he does not want to use plugins. In this scenario it is only natural to think about WebSockets. There's nothing really wrong with "normal" (whatever that means) sockets. I just have a mission to popularize HTML5. :-) – freakish Apr 02 '12 at 17:58
-
@freakish ok, I didn't know you could use sockets with HTML5. Thats cool. idk why he wants to make a realtime game in JS. should either use a Java Applet(runescape) or Flash. tehres also something call Unity which you can make 3d games more easily. – WalterM Apr 02 '12 at 18:05
2 Answers
There is now a definitive guide to building RTS games in HTML5.
The book Pro HTML5 Games walks readers through the process of building a complete RTS game, with multiplayer using Websockets.
The book has been written based on my experience recreating Command and Conquer in HTML5.
The book covers everything you are ever likely to need while building the game (the game covered in the book is complete and working) -
The single player campaign includes an economy with buildings, vehicles, aircraft along with an over arching storyline told using scripted events. You also look at adding intelligent unit movement using path finding and steering, and combat using a combination of scripted events, and finite state machines.
You then look at adding multiplayer using the WebSocket API and Node.JS- everything from the basics of WebSocket and Node.JS, to details such as compensating for network latency while keeping the player games synchronized.
This should hopefully be everything you will need to get started at building complete RTS games in the browser.

- 371
- 3
- 4
You can read Network Programming in Age of Empires and Beyond, and have a look to Game Programming Gem books networking and multiplayer articles.

- 545
- 5
- 14