Live data from Hacker News

Show HN: I made a browser-based RTS game

battle-of-flags.com

1–10 of 65 posts

Show HN: I made a browser-based RTS game

#1
I've posted this game here before, hopefully a repost is fine as the game has changed quite a bit (improved AI, improved mapeditor, much quicker gameplay, etc).

Game is based on JavaScript/Canvas and WebSockets. On the browser side the map is pre-rendered (as a background image), just the mobile units/buildings and animations are dynamically rendered. The lobby server is made in node.js, but the game server is C++ for performance reasons (mainly the pathfinding). I found the C++ WebSocket libraries out there to be too difficult to use so I made my own based on the rfc. Overall I think making a game like this is quite easy with the browser performance/features nowadays. The game server and client side JavaScript are around 5000 lines of code each.

If you have any questions about the tech I'm happy to answer them.

Show HN: I made a browser-based RTS game
battle-of-flags.com

Re: Show HN: I made a browser-based RTS game

#5
That looks great.

* By JavaScript/Canvas I suppose you are talking about WebGL?

* Is the source code available for public viewing?

* Did you use any of the popular frameworks like ThreeJS?

* Do you use differently sized textures depending on whether the user is on a mobile phone or desktop?

Re: Show HN: I made a browser-based RTS game

#7

Nice, big fan of browser based multiplayer stuff. I think there's so much potential now to make some crazy browser based games given current state of web apps. Edit: How long did it take you to create?

I've been working on this since 2014, but the actual time spent on development is maybe a few months.

Re: Show HN: I made a browser-based RTS game

#8

That looks great. * By JavaScript/Canvas I suppose you are talking about WebGL? * Is the source code available for public viewing? * Did you use any of the popular frameworks like ThreeJS? * Do you use differently sized textures depending on whether the user is on a mobile phone or desktop?

- Not WebGL, there are just some "canvas" draw functions. - Source is not public currently. - Just jQuery - Game is desktop only, based on 32x32 sprites, there is an option to scale though if you are on a high resolution display.
Post reply on HN