Blog Layout

Devlog #8: The Rather Large Update

22 October 2023

Featuring explosives.

Download


What's new? A lot!


Unlike most of my previous devlogs, there's not really a specific focus for this update, in many ways it was more gradually turning my prototype Build Fight Game into an actual video game (still don't know what I'm going to call it). I guess I'll start with the visual changes.


Textures & Trees

Trees! This wasn't really something that I ever actually intended to add from the start, thinking that the grass planes would serve fine as a battleground. However, I had to create a structure system anyway for spawning each team's vault into the world. While developing this, I needed to test it so filled the world with trees stone dicks. At this point, I was only a couple blocks away from just having trees, and I found the world looked a lot more interesting when it wasn't completely barren. All I needed was textures for the wood/leaves.

In my last devlog, I mentioned wanting help from artists. Upon release, I was pleasently surprised to find out two things: first, there was in fact an artist who wanted to help (UnusualOranges); and second, people actually read my devlogs. So, I was blessed with a whole load of new textures that truly took the visual direction leaps and bounds ahead of where it was. In the end, I had new textures for grass, dirt, wood, leaves, all of which actually had two versions so I could later add the option for different map 'styles', e.g summer/winter. With these, I finalized the updates to the world generation by creating a tree, and setting it up to be spawned throughout the world.

Up next on the chopping block was to stop using the same world for everything. At this point I already had the world generation system using a seed, so all I needed to do was randomize the seed on the host when a new game is started and send this to any clients as they connect. As it turns out, this was more difficult than I expected. By just adding the seed randomization code to the previous initial world sync manager, which was responsible for sending new clients existing block modifications and beginning world generation on their machine, the seed was effectively being re-randomized for every connecting client. I restructured some of the code in hopes of it being more efficient as well as fixing this issue, and accidentally just ended up breaking everything more. Essentially, the old world sync was being handled by a component attached to every individual player, which never presented an issue previously because with the same seed all clients would generate the same world anyway. However, architecturally I didn't like this: there's only one world, so why does every individual client have this world management component? To fix this, I moved the world sync code from the player object to an object built-in to the main game level, which then executes the world sync when a player connects. This brought with it its own issues, most notably when the host detected a player connected it would immediately send the world sync message, however that message would often arrive before the connecting client had fully initialized the game world, meaning to them the world sync object does not exist and therefore it cannot execute the required method. What am I even saying?!


The solution to this was to once again have a component attached to every player, however instead of it being responsible for managing the world this component would be checking every frame if it has initialized the world sync component, upon which it requests a world update from the server and destroys itself. The server then only sends the world update after it is requested, ensuring that the player is ready to initialize the world. Hey presto, we have randomly generated worlds synced between all clients!


Title Screen

I was starting to get tired of the entirely blank purely functional menu that I'd used up until now, so I developed a cool looking title screen - though I'll probably end up changing it between now and the game's full release. The menu itself is pretty simple, with the placeholder title and 'Play'/'Quit' buttons (there's also an options menu in development which I disabled for this update). The awesome-looking background works by generating a world with a random seed and randomized style, then finding an appropriate place to position a preview player object and camera. In future, I want to adjust this to show various different characters in different poses beyond the current placeholder model holding their shotgun.


BOOM!

At last: explosives! I started with dynamite as perhaps the simplest choice. The item itself is reasonably simple: if you have dynamite, press left click to throw it, launches a projectile, wait some time for it to re-spawn. The explosion itself was... actually also not that hard to implement. For damaging players and other objects, I simply check in a sphere around the explosive according to its radius, get all objects within the circle that can be damaged (have the 'IDamageable' interface on any of their components), and then damage them according to a specially calculated damage value based off the targets distance to the center of the explosion. For damaging blocks, the process is pretty simmilar. I check in a sphere around the center point for occupied blocks, and damage them according to a seperately-calculated damage value (though this is still based on the distance between the block and the center).


After the technical side was complete, I made an explosion particle effect basically just comprised of a bunch of orange cubes (and some grey ones - very important). Usually I find I'm not a very competent visual designer, however I think this turned out pretty well:

And I think that about covers it for that update! There's a few minor changes/features that didn't really fit the devlog (press ctrl+r and see what happens), but overall a successful update! Go play it! Also, I have a Discord now.

by 183:924032007 20 November 2024
Game is not cancelled, don't worry.
by 183:924032007 6 November 2023
I still love you, itch.io
by 183:924032007 19 October 2023
A lot.
by 183:924032007 19 October 2023
I am speed.
by 183:924032007 6 October 2023
Erectin' a dispenser.
by 183:924032007 3 October 2023
Plus, Unity VS My Soul. 
by 183:924032007 26 August 2023
We're gonna need a bi gger CPU.
by 183:924032007 15 August 2023
Ok, it still looks like a Minecraft clone. Trust the process.
by 183:924032007 15 August 2023
That's right, I'm making video games.
by 183:924032007 27 June 2023
We've been here before.
More posts
Share by: