
Not for the first time in this blog am I forced to acknowledge that the world seems to be going insane, but we’re going to put that to one side and talk about some nice regular game dev stuff with this fortnight’s regularly scheduled blog!
Progress on Strays was good last week, and we’ve been playing around with some new functionality, getting those building blocks up and running! One of the things that is going to be core to the game is object destruction. You can’t have a game about creating chaos without breaking a few plant pots! So I started the week by getting something set up. This is the earliest prototype:
You can throw the object about a bit, but when you hit another object (or the ground!) too hard, it will break. Pretty neat huh? Next I jumped into Blender and modelled myself a plant pot, ignoring the level of cliché I was invoking in my endeavours. I then painstakingly worked out how to split it into pieces; a process that took way longer than it should. This was partly thanks to my inability to comprehend basic 3D geometry, but mostly because Blender is operated almost uniquely on hotkeys, and I didn’t know the one that splits geometry (Y, by the way). Finally I was able to produce this:
Not bad right? Ok, so one piece does yeet itself into the abyss (yes, I said yeet. Unironically. This is what I have become…), but honestly, that’s fine; it’s no longer useful after all, and it’s amusing! However this process seemed pretty time intensive, and I’m still no artist, so John and I put our heads together and tried to come up with a faster way. This is what John achieved with some clever code:
No 3D modelling required! He’s essentially shearing the mesh in rings across the whole model in code and filling in the missing faces manually. All at runtime! It looks pretty alright right now, but we’ll polish it up and make it look even more swish when we have time. Of course, for centrepiece items we can still add our own custom broken pieces manually, to tailor that look. But we don’t have to worry about simpler or less vital items anymore!
I haven’t actually talked about the hutch have I? It just sort of appeared two videos above and then exploded for your viewing pleasure. Well this is the next thing I spent my time working on. The hutch is the most complicated model I’ve made yet, and I think it has worked out nicely. But it isn’t just for show! We have a planned mechanic involving a rogue agent. A rabbit, to be precise! The intention is that if you open (or explode maybe?) the hutch, then the rabbit will be freed, and will help wreak havoc… Largely, it must be admitted, through chomping on the plant life, but it all helps!
For this mechanic to work I needed the dogs to be capable of opening the hutch. For this I set up a hinge joint on the door, and played around with some values. It had some, er, questionable, results:
Not particularly wanting my dog to be catapulted into the previous blog post (which if you haven’t read, you should check out here by the way), I made some adjustments:
Almost. Now I just needed to stop our pooch from drifting; this isn’t Need for Speed after all! Turns out this was because the door was trying to open inwards, so I applied some angle clamps to the joints and the result is this:
Lovely! The dog cannot get out of the hutch once inside, but that’s a minor detail! I’ll fix it later. Next on my agenda with that mechanic is to create the rabbit and tell it it can escape when to door opens. But then I got distracted.
Instead of forging ahead with the hutch, I next added some initial work on the scoring system. This entailed creating a simple method of allowing anything to fire off a request to add score, and generating a text asset above the object of the amount of points just earned. Sadly I didn’t have time to prepare a video of that, so you’ll have to wait until next time to see it!
There’s more I’d like to talk about, but unfortunately, this post has to be out in less than an hour, so I’m going to call it there! Look out for more updates and ravings in a couple of weeks! I gotta go draw a thumbnail!
Matt out.