fun actor programming update


hello pals. i have another update worthy of noting. lately i have been working on coding. the changes i've made don't show in the final product, but they make development cleaner and it takes up a lot less space :) to understand the changes i've made, i need to explain how the game works.

the game is made up of scenes. a scene could be a room or a park or a closet.

each scene can have some actors in it, and actors can have a few components

an actor could have no appearance, have a static image, or an animated image. it can have a hit box that the play can't walk through, or not.

before these recent changes actors were separated into a few categories, and the structure of the classes was "tree-like"


an actor had an image and a location in the scene. another class which inherited from actor added a hitbox, and triggers (something happens when the player stands in its bounds) was an offshoot of that. basic animation scrolled through the frames in the spritesheet, dynamic actor had idle/moving animations as well as directional sprite capabilities. finally player inherited from the dynamic animated class.

all of this worked, but if i wanted to have a basic animated actor with no hitbox, there was no easy way to do it besides introduce a variable that would decide if its hitbox should be ignored, and at that point it might as well just become a new category of actor, and so on.

the changes i made was to combine all imaginable types of actors into one big class, and have the components simply be optional. this way, the player, a gift box, a trigger, and a falling leaf can be a part of the same exact class.

as of tonight, the new actor class has met the old actor class in terms of capabilities in full

do you like my allusions to plays with my terminology? there are other examples in the code as well. when one actor interacts with another actor in some way, a "cue" appears in the receiving actor's brain! i think it's fun! :3

this is all for this devlog. i understand programming posts aren't interesting for some, but it is interesting for me, and i want to talk about it, so i post. 

thank you!


Get ski butters

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.