🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Is HTML a good language to develop an RTS game?

Started by
6 comments, last by 8Observer8 1 year, 11 months ago

So I came up with an RTS computer game and got some of my college friends to make it with me.

My friends suggest that we go with HTML and JavaScript to develop this game. I'm not very good at coding so I just went with what they said but I'm still skeptical about it. My friend says that you can just use some kind of package? or program? (I'm not really sure) and then you can just use the HTML as the interface.

I know many games, especially mobile games are being developed with HTML but I don't know with an RTS game.

Let me know what you think.

p.s We were originally going to do it with Unity

Advertisement

JavaScript is a full, capable language. People who know it well certainly could develop an RTS on a web page.

I would not call it a good choice. For someone who already knows the language and is comfortable with the tools, or who is focusing on developing for the web, it's what you would need to use mostly out of necessity to get the job done.

Unity would be far easier, especially if you're comfortable using toolkits. There are a bunch of frameworks/toolkits/etc on the asset store of varying quality.

Either way you go, you're looking at a tremendous amount of work. You'll learn a lot along the way.

Related: https://littlewargame.com/​​ which uses nodejs & javascript

Cons of Unity Web Player: Riddled with bugs, and slower than JavaScript (source: a search of stackoverflow.com). I don't know of any real RTS games (or real games period) that use it besides little experiments and proof-of-concept projects, but if you know of one, I'd like to be proven wrong.

Examples of Unity Web Player “games”: https://zh.y8.com/tags/unity_web_player​​ If you enjoy Superman 64-level view distance (without the fog) and fewer polygons than 1996 Tomb Raider, then you might enjoy these.

Pros: Overall easier to use than reinventing the wheel or jimmy-rigging a half-dozen packages to get the engine and physics working in native javascript or typescript.

The pro probably outweighs the cons, but for someone extremely well-versed in 3D engines, websockets, and javascript, the choice is obvious.

The best option for 3D game dev using Javascript/Typescript, IMO. Version 5 is out.

This channel has decent informative videos but I wouldn't use their tutorials, they are not very good

🙂🙂🙂🙂🙂<←The tone posse, ready for action.

You can use the Phaser framework or the Pixi.js graphics library for 2D games; for 3D games: Babylon.js or Three.js I prefer to study pure WebGL and TypeScript. You will need a physics library for games: Planck.js (it is a port of Box2D for 2D) or Ammo.js (it is a port of Bullet Physics for 3D). Phaser already has the Matter.js physics library supporting. Babyloon.js support a few physics libraries: Using A Physics Engine | Babylon.js Documentation Use Web Audio API for 2D and 3D sounds or use sounds supporting from frameworks like Phaser, Babylon.js and so on. You can deploy your games on GitHub Pages (if you do not use server side like databases or multiplayer) or on Heroku with databases or multiplayer: Deploying a Node.js server with WebSockets on a free hosting Heroku. Web- Desktop Clients (Qt)

These video tutorials for beginners:

@frob this reply definitely helped 'cause after reading your reply we've set on Unity. Thanks mate!

stepback133 said:
we've set on Unity

Godot is better for building HTML5/WebGL games. Godot builds faster.

As I remember:

  • Unity builds 7-10 minutes for first time and 4 minutes for next builds
  • Godot builds 3 minutes for first time and 20-30 seconds for next builds

I prefer pure WebGL API: https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API

This topic is closed to new replies.

Advertisement