I’ve got back into the WebGL port of RTS4. I had previously done a lot of work for.. something.. I can’t quite remember, but I left it in a broken state. It’s now been fixed and had a little more progress made:
- The UI is all data-bound through Knockout
- Users can now box-select stuff
- Units/buildings have a visual thing below them when selected
- Constructing things now has a construction phase
- The object bounds are used for building/attacking/gathering (instead of the unit walking to the object centre)
- Scripts are combined into a single all.js file, reducing the load on my poor server
- Models (including animations) are loaded in a much smaller binary format, meaning MUCH faster load times, and less content to download
- Model transforming happens through an (as yet unseen) node.js server, which also opens a socket to the client; some basic multiplayer tests/features shouldnt be too far off.
- Basics of an “EntityGroup” class, which manages a collection of entities that satisfy a list of requirements. (the “Villies” print out is using this system to count units)
I made a few models earlier, and since they look much better than the current build, ill post them here instead.
Next step will probably be terrain and other visual improvements. The action system also needs to be revamped; the over-engineered “resources” system needs to be integrated into the entities themselves, rather than a separate component (health and population are considered resources in this system). The resources overhead is insignificant, and almost every entity that needs behaviours, needs resources. This may make it easier to integrate more concepts (like line of sight) to be resources (probably to be renamed to “properties”), which will make buffs much easier.
Note to self: I’d also like to have a concept of “abilities”, such as “move” and “face direction”, so that the correct action can gain access to the abilities they need (otherwise a unit ordered to move left but attack right wont know which order should control movement)