Added basic pixel creatures! I made them bright pink now instead of just plain white, but also might change that in the future. I created a JS creature class (OOP is so much easier in JS than Python!) so that I could make lots of creatures with less code and I added movement logic. Right now they pick a random direction to go in, and I have them looped so that they will keep going in that direction for a few steps before picking a new one. This prevents them from just moving back and forth and it also makes it look better to have them make a little progress before turning around. I added edge and object detection logic so that they don’t go off the grid and they won’t walk on each other. Now I need to add hunger, thirst, and death detection along with sources of water and food.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.