Scripting the Penguin

Unfortunately at this point not too much has been done, since I’m lazy. However the penguin’s psuedo code (aka the planned code, so that it can be proof read before being written into the game) has been written. For those of you who want to take a peek at it, look here:

Penguin Pseudo Code

And for those who have a grasp of assembly, the assembly version of the pseudo code is on the aforementioned page too.

What this code does is pretty simple. The penguin first checks if it’s within range (8 blocks left/right, 4 blocks up/down). If it is, it runs code that will try to chase after you. If it isn’t, it will run its idle cycles (stand, walk around, repeat).

This may not seem like much of an update, but once the pseudo code is written, plugging it in and testing/debugging won’t take long (so pretty soon we’ll have ourselves a penguin). The other 2 frames for the penguin (pre-jump and mid-jump) aren’t done yet, so I have to make those as well.

Of course, if you find any errors/logic mistakes in the pseudo codes, please let me know since it’s better to fix it now than to try and fix it when I’m plugging it into the executable.

Advertisements

3 Comments

Filed under Development

3 responses to “Scripting the Penguin

  1. Serge

    I didn’t notice anything, since I’m not used to ASM (or ASM-like pseudocode), but it seemed pretty legit as is. *shrug* Good work!

  2. I am know learning assemby and find pretty fair of you that you publish this. Learning from other people`s code is excellent. Btw. don`t listen to people who say bad thing about your mod. When I saw the Snow-land screenshots here I realized how awesome this mod is. Keep up the good work!

    • Yeah often I find the best way to learn a language is to look at example code, since it basically acts as a guide. GL with coding/hacking. (Bonus Points if you can find the error in the penguin’s code [in both versions], it’s already been fixed, but there’s 2 of them at least)

      And ty for the last comment, means more than you might think to me.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s