Real people change shape much more dramatically when they run, jump and hit things. That’s why a lot of 2D games have very compact, boxy characters: the game can treat them as a simple rectangle regardless of what animation they’re playing. Old-school platformer protagonists versus actual human proportions. Generally, though, it’s all fine so long as your character is a solid unchanging block. The effect can be seemingly perfect, since these precautions are computed before the result is drawn on-screen, but it makes the underlying logic fiddlier than it ought to be. So collision logic fudges it one of two ways: the game either waits until you’ve already gone through something and pops you back out, or it looks ahead to see if you’re going to hit something and pretends you already have. That permits a nasty possibility: after 1 frame you haven’t hit anything, and after 2 you’ve already gone through it. Unless you want everything to move very slowly, some things are going to have to move more than one pixel at a time.
#Stalker call of pripyat oasis puzzle code#
Code isn’t smooth, it has to re-examine and re-create the whole world sixty times a second, and there’s nothing in between these frames. Real life doesn’t really care if it’s not at exactly 1 second or 2 seconds that a man walks into a door, he just stops when he hits it. The issue is that time progresses in discrete chunks in games, so just the word ‘when’ is problematic. You have to pretend it is, though, and the intricacies of that are what’s taken up most of my time. I don’t mean hard, it’s just not the way algorithms work.
![stalker call of pripyat oasis puzzle stalker call of pripyat oasis puzzle](https://i2.wp.com/gamesisart.ru/images/screens/Stalker_3/Side_Tri_Shutnik_2.jpg)
I like to do stuff like The Hardest Logic Puzzle Ever in my spare time with a Google Docs spreadsheet (and xkcd’s The Hardest Logic Puzzle In The World in a text doc), but implimenting the most basic laws of game worlds is on a whole other level of complexity. But even so, that means hand-coding some pretty fundamental stuff, and it’s taught me that you can’t use the word ‘basic’ to describe anything you haven’t tried to code yet. I’m only making a very basic game, and with a program that provides the base engine for you.