This week in RPG I refactored the movement code from last week, creating 2 classes - one for
Mobs and one for the
Player class has no special functionality at all beyond what it inherits from the
Once I had things refactored and nice and neat, I made the Orc a Mob and gave him some very rudimentary intelligence. If you get too close, he’ll chase you! So awesome.
Next up I need to implement some special generator tiles that you can click on to ‘harvest’. Probably need some kind of inventory too, which is a whole other kettle of fish.
I also ended up spelunking in the rabbit hole of creating some lighting effects. I realised that any self-respecting RPG/survival horror game needs a day/night cycle.
This spelunking also lead me to realise that I made a pretty stupid and large mistake with my depth code. I wrote some fairly funky-gymnastics-type-code in order to render different levels of the tilemap in a different order. What I realised is that I’m working with a graphics system designed for 3D rendering. All I really need to do is stop rendering everything at the same z-coordinate (I wanted it flat!!!), and the ‘3d-ness’ will take care of itself!
I wrote the original code for glixl over a year ago now, so I’ve forgotten most of what I learnt about WebGL. I’ll have a stab at re-writing things when I get some time to myself.
I didn’t do any pixelling this week as I ended up quite busy. I did however justify all the time I spent on my little band when I came up with a great 1-shot lesson for a year 7 group I have using Scratch to create little bands and animate them.
I’ve noticed that this happens quite a lot - I play around with something interesting and after a couple of weeks it seeps into my teaching, making my lessons more fun.
At least, that’s how I’ll justify my procrastination when the OFSTED Inquisitors come knocking…
I found my way back to the gym this week for some swimming. Aren’t I a good boy.