Devlog #8: The Rather Large Update
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.
It is genuinely incredible how much better the game looks now.
World Randomization
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.
Files
Get Build Fight Game
Build Fight Game
Status | In development |
Author | peterkcodes |
Genre | Shooter |
More posts
- V0.11.1 ChangelogDec 08, 2023
- V0.11.0 ChangelogDec 05, 2023
- 0.10.1 ChangelogDec 04, 2023
- 0.10.0 ChangelogDec 04, 2023
- Version 0.9.0Nov 29, 2023
- Version 0.8.0Nov 21, 2023
- Version 0.7.0 ChangelogNov 21, 2023
- Devlog #9: New Player & New PlacesNov 06, 2023
- V0.6.0 ChangelogNov 06, 2023
- v0.5.0 Changelog (+ how to play)Nov 01, 2023
Leave a comment
Log in with itch.io to leave a comment.