Improved UI, set input types, Worley Noise

The UI is now much cleaner and easier to understand. The types of some parameters can be changed (for example making the frequency 2D for PerlinNoise, or changing blend to work with grayscale values). Worley Noise (aka cellular noise) has been added, which is useful for cutting out wedges from objects (like stone). Nodes that can be transformed can now wrap in Presentation space (ie. they still produce a tiling texture) or not at all. Tiles has some more properties, and offset was changed to be relative to the count (like in Substance).

http://weesals.com/Releases/HTML/Surface/R6/

Procedural Texture Generator – Shadows

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:

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).

 

Directory File Comparison

This utility searches for similar-named files in different directories and shows a comparison of their contents. I reuse classes from older games a lot, and often find little things to fix or improve. Running this helps to identify what was changed and what game it was changed in, and also shows a diff of the changes so I can copy them back across.

DirectoryCompare

Download: Source | Binary

Procedural Texture Generator

More work on the procedural texture generator, this time I added functionality for nodes to act as “passthrough” nodes, where instead of rendering to a texture, they pass their code onto the next node, so that a whole branch can be generated at once. While this can help with rendering times, a far bigger advantage is that nodes (like the Tiles node) can provide their own seed for the input branch. Passthrough nodes are denoted by a blue border, or can be forced on by selecting them and checking the “Passthrough” checkbox in their preview.

Loading/saving to external files is there now too, ‘blend’ outputs a (broken) mask as ‘output 2’, and various nodes have added parameters.

DirtRocks

In this render, all the stones are unique. Disable passthrough on the PerlinNoise nodes to see without. The comparison below shows the difference.

Try out this release by visiting http://weesals.com/Releases/HTML/Surface/R4/ and load in the above surface from http://weesals.com/Releases/HTML/Surface/R4/Dirt%20Rocks.json

Procedural Node Texture Generator

I was very impressed with the Substance Designer workflow, so decided to build my own node-based texture editor. After a month, here is the result.

It is only tested with Chrome, use it by visiting http://weesals.com/Releases/HTML/Surface/R3/.

Future goals are to better tag data types so they are converted correctly (ie. height-map implicitly converted to normal-map) and allow different types of data to be passed between nodes (points and meshes). And obviously add and fix nodes.

LAN Battle Game

I made a small battle game, you control a square and use awkward keys to jump around, kill other players by jumping on top of them.

Z: Move left
X: Move right
Z+X: Jump

R: Change costume
S: Respawn

Sword: Kill people by walking into them
Shield: Block sword attacks

Multiplayer LAN battle game
Play in browser

Players were supposed to be blobs which can expand (by pressing Z+X), causing them to bounce up, but that looked lame. Players could also wallrun, but that made controls too confusing.

RTS4 Data File Structure

There haven’t been any gameplay changes recently, instead I’ve been working on adding features for modding. The current proto data format automatically supports a lot of scenarios, but many common concepts can be tedious to write. The latest build includes some of those changes (and a lot of bugs).
RTS4 Release 9
Webplayer (Unity)

I’m working towards supporting advanced scripts like this RPG-style script:

Player.default {
  Level = 1;
  Experience = 0;
  NextLevelXP = $Level * 200;
  Health = 200 + $Level * 20;
  RequireComponent<AttackMelee> {
    Attack = 20 + $Level * 2;
    OnKill = (other) {
      Experience += other.$XPGain;
    };
  };
  Event(Experience >= NextLevelXP) {
    Level += 1;
  };
}
Grunt.default {
  XPGain = 1
}

Several fields (NextLevelXP, Health, Attack) are augmented by other fields. By default, these fields only include the augmentations that appear prior, adding a $ causes all augmentations to be used. Using this feature does introduce the possibility of cross-dependent fields which would crash the game; I’ll need to add some protections for that later (probably just not run those augmentations recursively). An example of something that would break it is:

Health += $BonusHealth
BonusHealth = Health * 0.5

The OnKill event handles giving experience when they kill a grunt. Any augmentations that appear in these scripts are somewhat special; a single augmentation is allocated at compile time, which starts off as the identity value; whenever the script is run, the augmentation value is changed by whatever the script says. This has the benefit of allowing any other augmentations later in the file to still be applied correctly (ie. if Experience *= 2 appears in a later technology, the experience will correctly be doubled until that tech is removed).

Finally, the script creates a level up event to be run when the players experience passes the required amount. Because of the $ in earlier dependent fields, changing the level later in the file still correctly affects Health/Attack/NextLevelXP.

Currently fields referencing other fields, and simple scripts are supported. Its also possible to define “APIs” (RequireComponent and RequireTechnology are now external APIs) to provide more functionality, without bloating the code.

ModHQ Now supports AoM Beta formats

Spent a bit more time on ModHQ to get it working with the beta formats; The beta uses a BTX texture format (bitmap), the BAR format is slightly changed, and XMB files sometimes contain uncompressed camel-case XML.

ModHQ with AoM Beta menu screen
Download (.net binary & source code)

Theres more discussion about the Alpha & Beta versions over here: http://aom.heavengames.com/cgi-bin/forums/display.cgi?action=ct&f=1,29492,0,20, go check it out and run it through ModHQ to see all the sweet sweet game assets.