Sandbox Logo
14 February 2023

Hack Week

We had another hack week
My goal was to create a fun and polished party game in less than a week. I worked with Thai, Lewis, Louie and Tom to re-imagine a 4 player classic.

The fact that something like this can be made from start to finish in such a short time period is a testament to just how easy game development with s&box has become.

For future hackweeks I'd like to create more smaller party games with an aim to connect them together so that friends can go from game to game accumulating points.

If you'd like to check out the code you can find it here and if you'd like to make an arena you can find an example map here that shows how to create multiple arenas in a single map.

Something I wondered for a while is what would change if we were launching a c# exe instead of a c++ exe. Would anything change? What would it make possible? What would we lose?

So I made it possible. It's kind of interesting.. but probably only to nerds like me.

The c# exe can now treat the engine like a library. So we can write a c# exe that will initialize the engine (or if required,  a minimal version of it) and manually run the main loop. What this means is that you we get total 100% control of the renderer and the gameloop and everything else.

I only really got the screen flashing before I ran out of my self imposed time limit for it, but here's something Layla made it do..

The web rendering stuff in GMod was well used for cinemas and stuff, and it's something we're missing. There's a few choices for this stuff.. 
  • Manually implement CEF (yuk)
  • Use a middleware (blurgh)
  • Try to use what windows has built in now (wtf)
  • Use Steam HTML Renderer (what)
Steam HTML Renderer seemed like something I could do in a day so I aimed at that. I'd implemented it before, maybe 10 years ago.. and it was a bag of shit, but maybe it's improved.

Turns out it has. The API and the implementation is really neat, giving you just what you need, redraw, sizing, inputs, cursors, javascript etc. The browser itself seems nice and modern, using what I assume is whatever Steam itself uses. 

Overall I'm really happy with how easy it was to implement, and that I didn't have to install any other dependencies. 

The one minor downside is that there's no real way to control the volume. It would have been nice to have piped that though the game audio system for world panels.. or at least be able to change the volume.. but other that that this was a total success from my point of view.
Something scratching at by brain over the past couple of weeks was making an imgui type thing but for 3d stuff. Like widgets and stuff.

So what I mean by that is that instead of making it object orientated like

init() { myobject = new Object(); myobject.Model = "models/barrel.vmdl"; myobject.OnClick = () => Log.Info( "Object was clicked" ); myobject.AddHitbox( new Sphere( 0, 32 ) ); } frame() { myobject.position = newPosition; myobject.rotation = newRotation; } shutdown() { myobject.destroy(); }
It should be more like
frame() { Scene.StartObject( "My Model", position, rotation ); Scene.DrawModel( "models/barrel.vmdl" ); Scene.Hitbox.Sphere( new Sphere( 0, 32 ) ); if ( Scene.Clicked ) Log.info( "Object was clicked" ); }
I understand that this doesn't turn people on as much as it turns me on, but this stuff really does it for me. Things that were previously quite tricky suddenly become incredibly easy. Things that was previously impossible become possible.

So in this thing above everything is an "immediate mode" draw except the citizen model - which is a regular scene object (kind of like an entity).
  • Draw 256 glass clumps using seeded random positions
  • Draw 128 beachballs using fbm noise
  • If hovered draw with a different color and draw a particle effect
  • If selected draw a sphere and use a different particle effect
  • If click on the citizen model bbox, select it
  • If citizen is selected draw move arrows
  • If draw arrow is dragged then move the citizen model by that delta
This ended up working way better than I could have imagined.. so now I'm incorporating it into our plans for gizmos in hammer and other scene views. 

I think its usefulness will go way beyond that though, so I'm gonna try to implement it in game and we can use it kind of like a legit debugoverlay.
I started working on a Jailbreak mode, people who played back in the CSS days will get what I'm going for here. There's a bunch of prisoners and guards, and it's up to the guards to make sure that they don't die. It's a very social heavy game.

We ran a playtest last Friday, and managed to get 32 people in a server - it ran surprisingly well! (after we sorted out some initial issues)

It served as a good method to test out Entity Prefabs, as well as learn Hammer.
 
If you feel like trying it out, the gamemode is available to play now.


FP4 is a retro style air combat arena shooter (quite a mouthful) inspired by Quake, Wipeout, Bladerunner, UT and the PS1 aesthetic. 

The goal was to make a game with fun flying controls with quick and intense gameplay, the player can pick from 2 different ships (though more will be added later) to fit their play style.

It was a great time to learn more about UI and Resources, I used Resources for the ships so it was really easy to add new ship and adjust values.

S&box - VFX Exploration


Initially I started the week exploring Source 2's particle editor in order to create some punchier explosion VFX for the explosive oil drums. I also added a smaller fire effect for spawning on breakpieces.

Midway through the week, however, I decided to help Louie with his Hackweek project, FP4. 

FP4 ART PASS

I spent the rest of the week authoring tileable textures and hotspots, taking advantage of ogniK's old-school PS1 shader to really lean into that pixelated aesthetic. I also helped to iterate on the level layout, set dressing and lighting, as well as making the two playable ship models. 
It was a lot of fun doing look-dev for this project, and I'm excited to work on more maps for it later. 
Ryleigh and I collabed again for this hackweek, spawning a silly arcady multiplayer fighting game called Punchy!


The basic design we settled on is to have a server full of 1v1 bouts happening in simultaneous rounds. Winning your fight makes you ascend the server's leaderboard, meaning you'll be matched against a tougher opponent next time.

Input is just the four directional keys and an attack button, but we've built up a moveset of around 40 different attacks based on what your character did last.


After your match, win or lose, you'll become a spectator in the background of a random other ongoing fight. Since all the arenas are scattered around Construct, you'll often see other fights going on in the distance too.
We wanted to see how we'd get on approaching a type of game that neither of us have much experience with, and ended up having tons of fun along the way. Our strategy was to get a basic fighting system done ASAP, then just keep adding and tweaking the moveset for the rest of the week.


Something we tried that really paid off is making a couple custom tools early on. It was nice and easy to make an editor window with a little preview scene, which meant we could rapidly iterate on attack visuals and stuff like positioning hitboxes.

Hope you enjoy trying out Punchy!
In Run Rabbit Run you're a rabbit whose goal is to run to the end of the maze without getting eaten by wolves.  The challenge is that the wolves move randomly, you can never predict when or where they're going to move, so you need to be quick and careful.


It can be played single-player or co-op.  The benefit of playing with friends is that you can revive each other without using up lives.  However, if you die and your respawn timer expires, you're back to a safe zone and a life lost.

The idea for this came from an old map in Warcraft III custom games, except you were a kitty dodging dogs.  Warcraft III was one of my main inspirations for getting into game development and being able to re-create one of my favorite games from it in S&box is really awesome.

Run Rabbit Run was created on top of a generic RTS I've been working on for a couple months, and I'm looking forward to polishing things up and creating a handful of simple-but-fun games with it.
I worked on rendering compiled maps in scene worlds, this will allow us to make more kinds of tools that need a map or allow cool background scenes in UI.

The API is very simple, you just create a SceneMap.
new SceneMap( world, "maps/test/scale" );
I still have to handle map entities, because we can't just spawn entities in scene worlds, a scene object representation has to be made for them.
I added the ability to load asset.party maps in SFM, so we can make pretty 📸.

Don't expect too much more out of SFM from us, we're limited by design on how far we can take this, in the long term it'd be 100x better remade in C#.