Jump to content

I'm trying to make a real time strategy game, am I on the right track?


ewanvalentine
 Share

Recommended Posts

Hi folks,

Babylon.js/game dev n00b here. I've started attempting to make a real-time strategy game, similar to Red Alert or Starcraft. So far, I have  a bunch of blocks you can create and move around a flat map. 

I'm just posting this here so I could get your feedback, or suggestions, am I doing anything obviously wrong? 

https://github.com/ewanvalentine/game-guild

Cheers,

Ewan

Link to comment
Share on other sites

Hi, 

In order to have the best performance, don't forget to use Solid Particle System (very easy to use once you got the concept) that can be used to draw everything that is repeated in your game (I use it personnally to draw a tile map).
For units, you can use instances (very easy as well, just do mesh.createInstance()).

It could be cool to show us a running demo somewhere !

Good luck :)

Link to comment
Share on other sites

The SPS is the right guy for this job. This would nice if someone who already did once a tiled block world with it could put somewhere a little tuto or a simple commented PG about this...

This question is recurrent.

Please search the forum, you'll find that someone called BeanstalkBlue did something equivalent some days ago :

documentation : http://doc.babylonjs.com/overviews/solid_particle_system

Link to comment
Share on other sites

I plan to do it, and relaunch my serie of Babylon.js tutorial. (When i'll have some time)

Quick playground, same behaviour but for a forest with random positions http://www.babylonjs-playground.com/#DBJ1I#1

Don't try to make more than 1000 trees, as the model is very complex for this kind of thing and it will crash your browser.

Link to comment
Share on other sites

8 hours ago, Temechon said:

Hi, 

In order to have the best performance, don't forget to use Solid Particle System (very easy to use once you got the concept) that can be used to draw everything that is repeated in your game (I use it personnally to draw a tile map).
For units, you can use instances (very easy as well, just do mesh.createInstance()).

It could be cool to show us a running demo somewhere !

Good luck :)

Ahaaa that looks so useful! I guess I could use that for terrain elements.

I've also updated it to use `Mesh.clone(name)` instead of creating a new mesh each time. It seems to be running a little smoother, albeit still very slow :/ 

Thanks for the advice! 

Link to comment
Share on other sites

note that instances have some limitations,

things like materials and skeleton animations will be the same across all instances of that unit, see; http://www.babylonjs.com/Demos/InstancedBones/

so clones is the way to go,

i'm not sure whether the SPS allows seperate skeletons & animations for each particle(unit) @jerome ?

because if that's the case, it would be pretty neat.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...