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.
“Play” in browser (IE11 or Chrome)
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)
After playing A Game of Dwarves (and despite the super-shallow gameplay, loving it), I decided to build a similar story-driven game with minecraft-style environments. It’ll be a top-down shooter where the player destroys blocks to find resources and weapon upgrades in a procedurally generated world (but with designed areas).
This was being built with a friend, with him taking care of the movement and shooting mechanics, and me doing the world generation and rendering. My focus for this voxel “engine” was to have it be performant, and integrate into Unity as seamlessly as possible. It uses a tree of map generators to allow alterations of procedural maps, and an Editor Script which allows modification of the world through the scene view. I’m hoping to add the last few features and submit it to the asset store. It can optionally generate an optimised set of box colliders for the terrain, making any existing player controllers work unchanged.
I hope to use the same system to port (and improve) Portals 2D to Android and iOS.
Been working on the infinite runner a little more; I added a new stage for escaping the lab (which I’d like to also use in the tunnel sequences) and fixed up the dogfights a little more (I may scrap them and replace them with a Space Invaders sequence instead though). It also has a cute little menu and the staging system was rewritten to allow nicer transitions between stages.
Play in browser
Unity RTS Updates 2
I havent done much this update, but thought I should have the latest version up. This update is primarily just touching up the fog of war, it is now blocked by trees and cliffs (and any other high objects). The ambient occlusion was also changed, not sure if its an improvement. And theres been a ton of code cleanup to get the fog of war code into something that would be more easily plugged into a new project.
If you want to build an RTS of your own, Elgar’s Code Musings is a decent place to start, he’s written up his findings while developing an RTS in Unity.