DEV Community

Dustin Runnells
Dustin Runnells

Posted on • Edited on

Moving Student Sprites

Some slow progress while I find time to work on this game in between being a dad and sleeping!

Sprites for the students/"lemmings" are now moving:

Image description

Since all of the students are on the same layer, they look funny when they pass through each other. I am going to resolve this by making the left moving students on a slightly different Z axis than the right moving students. This is how I also plan to handle staircases - two 3d sloped surfaces in a single room stacked on top of each other with a landing separating them.

The next area that I'll be working on will be for handling doors and openings in the floor. I initially thought that I would be able to "subtract" a cube object from the room walls to make an opening, but I haven't found anything that would indicate that this is possible with the objects that I am importing from Blender. HOWEVER I learned a little about layer masking while making the students able to bounce off the walls but not collide with other students. I think that I will be able to temporarily turn off layer masking for the layer that a wall or floor is on when the student touches an invisible object to temporarily allow a student to pass through as if there is an opening there. This will let me make students that have an ability (like hammer?) to create holes in the floor or wall and let other students through. That seems like it would work for the physics/collisions. To make it look like a hole maybe I'll be able to do something with image masking on the material in code to put a transparent spot in right location.

Top comments (0)