Added a shadows node, made the Shape node more generic (all falloff functions work with all shapes), and optimised things a bunch. Also added FileSaver so large files export correctly.
Heres a perlin terrain:
Use this version here http://weesals.com/Releases/HTML/Surface/R5/, it will automatically load the test surface now (just hit New to clear it).
I wanted to get the cliffs using their own model and material tonight, but I got stuck with a silly bug for far too long (two variables named “c”, one overwriting the other). The game now has basic terrain, with units being draw at the correct terrain height.
Play in browser
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)
- Can access the game from anywhere by visiting the URL in a newer browser (can also run on mobiles)
- Much less likely for WebGL to be discontinued
- Built-in standard and high performance UI framework (HTML/CSS)
- Very difficult to load external resources (require expensive upload or local storage options)
- Mathematical inaccuracies make multiplayer and game replays much less stable, require error correction
- Overall slower loading and rendering performance
- Impossible to protect the game code from hackers, though security measures can be added to prevent cheating in multiplayer.
After designing enough of the game, I will likely build a native Windows version of the game as well. The current version is quite underwhelming, but can be played below.
Play in Chrome