Painting Prototype

Today’s prototype!

I was inspired by playing the beautiful Eastshade (an open world painting game) but was disappointed to find no painting minigame, so of course I just had to mock one up myself.

It was originally implemented with the plan of simply using the mouse cursor to paint but then I remembered this plugin which allows the Leap Motion Controller to be used in Garry’s Mod, and again – just had to try it.

 

How it works is actually really simple!

The player performs a short calibration at the start; by positioning their hand (yes, hand – the brush is just a prop :]) to define 3 corners of the game window.  Then their hand can be tracked relative to these to allow painting, with distance from the screen being converted to brush size.

So when the player decides on a perspective to paint a raw, normal screenshot is immediately taken and stored locally.  From there it’s just drawing to various render textures in order to ‘reveal’ the part of the image under the brush & applying the selected ‘paint’.  I’m using what I learned from the Magic: Anomolies to apply shaders & post-processes to the ‘paint’ to achieve different effects – these different styles are linked to the numpad as a sort of mock artist palette!  These render textures caused a lot of issues with them not handling transparency as expected & their lack of documentation – but the end result is so worth it!

 

I had forgotten just how much fun the Leap is!

We used it for our Tragic Magic jam game and the added physicality is always just a blast!


Magic: Anomalies

PART OF MY EXPERIMENTATION WITH IDEAS FOR INTERESTING MAGIC SYSTEMS

Took a break from working on the magic crafting system/UI to quickly prototype this idea my friend DrMelon suggested; Anomalies inspired by S.T.A.L.K.E.R.!

They are procedurally generated; each with a custom visual shader effect and physical buff/debuff effect (a poison debuff in the above video). The closer a player is to the center of the anomaly, the faster the effect is applied to the player and the more intense the visual effects become.

Magic: Crafting UI Implementation

PART OF MY EXPERIMENTATION WITH IDEAS FOR INTERESTING MAGIC SYSTEMS

Aha! It works!

(Left: regen buff applied by spell | Middle: Spell Crafting UI | Right: Debug output of spell reasoning)

I’ve now tested these basic example components with some friends online and can really see the system’s potential coming to life!

However I need to think some more about the layout of the UI if I want to be able to support some more complexity… One idea would be to stick with the foundations of the current design, but make it work recursively to allow as many components as the player wants. I made a quick mockup of this (shown below) but I worry this will also fast become cluttered and unreadable.

(Notice that EYE_TRACE has two possible subcomponents so these split the space and become half size. These pos offsets would all execute one after the other.)

Magic: Crafting UI

PART OF MY EXPERIMENTATION WITH IDEAS FOR INTERESTING MAGIC SYSTEMS

I made some quick mockups of a few different ideas I have for the way the crafting UI should look/how players interact with it.

Attempt 1, Spaghetti:

In my first attempt my thoughts were focused on the pure freedom I want to incorporate, which led to this really open but potentially really confusing/cluttered design.  While I like the idea of bigger spells having a convoluted/spaghetti feel to them, this isn’t inline with my desire for the player to be able to read/adapt their spells at a glance during fast-paced gameplay.

Attempt 2, Ordered Recipe Grid:

This more grid-based design solves these issues well I feel! Now it’s really obvious what components a spell can support, and it makes swapping things in/out as simple as dragging&dropping. Can’t wait to implement it and get a real feel for the possibilities of this system!

Magic: Crafting

Part of my experimentation with ideas for interesting magic systems

Something I always want out of magic systems is true spell crafting, whether its premeditated and UI based like in The Elder Scrolls, or done on-the-fly as in Magicka. In this experiment I’m trying to find a happy middle ground between the two; one that supports the depth and possibilities of a more complex system while still allowing players to adapt as they play & avoid spending too much time ‘stuck’ in the UI.

Here’s an example of how this spell is expressed in code:

local comp = {
    Name = "HEAL",
    Type = "SPELL",
    Cost = 100,
    Invoke = function( self, ply )
        print( "Try invoke HEAL" )
        local trigger = self.SubComponents["Trigger"].Value
        local invoke = function()
            local ent = MM_InvokeComponent( ply, self.SubComponents["Patient"].Value )
            ent:AddBuff( 4 )
            MM_Net_Invoke( ent, self.Name .. " " .. ent:Nick() .. " because " .. trigger )
        end
        MM_InvokeComponent( ply, trigger, { invoke } )
    end,
    SubComponents = {
        -- Ent to heal
        ["Patient"] =
        {
            Type = "TARGET",
            RequiredType = "Entity",
            Value = "TARGET_SELF",
        },
        -- Trigger
        ["Trigger"] =
        {
            Type = "TRIGGER",
            RequiredType = "Number",
            Value = "TRIGGER_HURT",
            -- Value = { "TRIGGER_TIME", 0 },
        },
    },
}
MM_AddComponent( comp )

Each SubComponent here will eventually be switchable in-game using a node based UI.

One idea for the possible gameplay is that players start with no knowledge but can find these components littered around the map; each one opening up new possibilities for spell combos.

Magic: Drawing from the world

Part of my experimentation with ideas for interesting magic systems

In this system mana, the resource consumed when casting spells, must be drawn from a physical location in the world.  Each player has a variable reach around themselves within which they can draw in mana.

(Player’s view. The dashed circle represents their reach. Notice that the inside is dark as mana has been drained from this area)

The idea here was to create a tactical element to gathering mana, which should force players to move around more as they deplete all sources in their area.

 

To achieve this in Garry’s Mod I used a 2d array representing positions on the map (no verticality). Whenever the array is altered, each client is notified to update their mana render texture (a top down view of the map with black squares where mana has been consumed). This texture is then used to project light onto the map from above, leading to the effect pictured.

(An aerial view of the map. Black areas are void of mana, having been consumed by a player)

Heavy Gullets: Portals

The goal of the portal gateway from the main lobby was to create an awesome first impression of the game, as this is players’ entry to each level it is the first thing they will see (and then continue to see often).

(The portal effect seen when travelling between levels. Sequence lasts around a second)

By curving the direction of the particles over time I was able to create the simple but convincing effect of the tunnel bending around in various directions before reaching the destination and spitting the player out.

(The effect seen before entering a portal; A hole is cut in the wall with stenciled rendering)

The portal has a gravitational pull on any nearby players, which was then extended to affect the plantlife (notice the tuft of grass to the left of the portal) – again with the goal of making the world seem more real through interactions and feedback.

 

And here’s a view of the full interaction:

Heavy Gullets: Plantlife

One of my core focuses while creating Heavy Gullets was polish & good game feel. I wanted to make the world feel really alive by adding reactions to the player in every aspect of it. This began with particle effects, however the aspect I’m most proud of is the plant interaction. If a player or bullet moves through a plant then it rustles and bends away from the collider (all clientside). This is a really simple effect accomplished by lerping the plant’s angle in the direction of the collider’s velocity, with some added squash and stretch to the scaling, but has a has a huge impact on the feel of the game!

Magic: Tracing Runes

PART OF MY EXPERIMENTATION WITH IDEAS FOR INTERESTING MAGIC SYSTEMS

Inspired by classics such as Arx Fatalis and Black & White, I wanted to create a magic system involving drawing.

(Tracing a simple rune, linked to making the player fly forward. In this case the rune’s design is (East:1,North:1,East:1)

The rune detection simplifies any drawn shape in to a list of 2D vectors – each rounded to one of 8 compass directions. These are then checked against all defined rune shapes and accepted within certain thresholds. Runes themselves are defined with an ordered list of compass directions and their corresponding distances (Direction:Distance).

 

Future Note: I went on to use this system in my virtual reality magic prototype VR! Photies

Dead by Daylight

We’ve been playing a lot of Dead by Daylight recently, which inspired me to try my own version in Garry’s Mod.  Here you can see (maybe you can’t, it’s dark and scary) the generator repair system and skill checking.

dbg1

Planetary Annihilation Modding 8 – Networked Play

Currently working on networking the standalone application element of the mod

pamod11

(Art belongs to UberEnt & Planetary Annihilation)

Using the Lidgren C# UDP networking library, which has been really easy to work with so far.

Currently players can connect to games and take turns performing actions, which are validated by the server & then sent to all connected clients.

pamod12

(The turn notification UI is just placeholder at the moment)

Planetary Annihilation Modding 6 – Galaxy Generation

With my Honours project done, I am happy to finally get back to this.  Working on some procedural galaxy generation.

pamod7

(Art belongs to UberEnt & Planetary Annihilation)

This should allow for some more interesting layouts, as before I was just hard-coding the systems and the routes between them.

 

The generation works by;

• Randomly positioning a number of systems within a bounding box, while collision testing to ensure there is no overlay between themselves

• Connecting all systems within a short range of each other

• Grouping together all the systems which are linked

• Finding the shortest paths to link these isolated groups of systems together

 

It seems to work well enough for my purposes at the moment, but I could make it more interesting by adding some more random paths later on.

The systems also have a procedural name which just combines two strings from arrays of names and suffixes.

Planetary Annihilation Modding 2 – Progress!

Progress with the actual modification part, now when players build something they will construct their unique version instead of the default.  This may not seem like much but it forms the foundation of the concept, as it allows each player to have separate statistics and units.

Planetary Annihilation Mod 2

(notice that the tower’s name has been appended with a 0, as I was the first player)

Also thanks to wondible for the Instant Sandbox test environment mod

Planetary Annihilation Modding

I recently started playing Planetary Annihilation: Titans (PA) multiplayer with some mates & have been really enjoying it.

Planetary Annihilation Mod

 

As with any enjoyable PC game I quickly started looking into the modding scene, to improve our experience with preexisting mods and look into creating mods for the game personally.  I discovered that PA actually has a notable mod community (though fairly small in number), which was strongly encouraged by Uber Entertainment (being listed initially in their Kickstarter as “Advanced Modding features”).

 

I’ve decided to try and make my own multiplayer version of the game’s Galactic War campaign mode.  In this singleplayer mode the player moves through a galaxy map playing AI skirmishes and unlocking new technologies (e.g. new units or buffs) for each victory.  My current concept is an external galaxy map featuring the functionality of the campaign and allowing for new technologies to be unlocked, which I have created a small prototype of in the C# game framework Otter (as pictured above).  This external application will edit the base .JSON files describing each unit and export them into the game.

 

The major problem I foresee at the moment is that most of the unit .JSON files are not unique per player (excluding the unique commander units), which would cause any technology unlocked to be shared among all players.  My current low-tech solution to this is to make a copy of each unit per player and then alter their build menu UI to reflect this.

 

You can follow the project here:
johnjoemcbob/PA_MultiplayerGalacticWar

Rust Modding: Team Colours

Just a quick update today, implemented the team selection menu & chose some appropriate clothing to identify the teams.

Rust: Team Select 1

I ran into a bug which caused the client and server to become unresponsive, so I’ll be looking into that tomorrow.

I’ve also been trawling the forums for references of plugins changing weapon variables.  After a while I stumbled across someone with a similar question; they wanted to know how to change the types of ammo a weapon would accept.  The general consensus of the replies seems to be that these variables have client-side counterparts which plugins cannot currently change, which lines up with what I was experiencing.  This means that I’ll have to make do with the weapons as they are now, which is a workable if a bit disappointing.  After Garry’s Mod I can only assume that Facepunch do have plans for an official modding API or at least more support in the future.

Rust Modding: Changing Game Variables

I realised yesterday, after creating the basic loadout system and testing it with the Soldier class, that for the plugin to be functional I would have to edit the base game variables of weapons and ammo to alter fire rates and damage.

Rust: Class Select 2

With this in mind today I have been exploring similar plugins which edit base game values, such as Stack Size Controller and ItemConfig.  Reading through Stack Size Controller gave me a good base knowledge on how to achieve this, which ItemConfig built on – being the more complex of the two.  I couldn’t find any examples of plugins modifying weaponry specifically, so I spent a lot of time printing out the various Components each GameObject possessed and trying to work out which was which.

 

At the end of the day I’m still hitting a wall with trying to have changes to weaponry, so I’ll be leaving this for a bit and working on team colours tomorrow.

Continue reading

Rust Modding: Introduction

Started looking into modding Rust today.

Rust: Class Select 1

While reading through the Rust devblogs and community updates I discovered a few server-side mods which caught my attention, and so I decided to have a closer look at the tools available.  I’v decided to use the Oxide modding API for now; as it seems to have been in development consistently longer than the other options, and allows for plugins created using C#.  I also found that Garry added a “community entity” to Rust, which allows modders to send GUI JSON code through remote procedure calls to the clients.  This opens a lot of possibilities for modding Rust with in-depth plugins which can communicate without spamming the chat window, as I had previously thought my options would be limited to.

Continue reading