Quantcast
Destructoid - alexandersshen's Community Blog



About Me
Just another child of the 80s whose memories of old cartoons and video games reflect a much simpler and much more ignorant time.

He also likes to draw the comics.

Website: http://www.alexandershen.com
Gamer Profile
3DS friend code:
Steam:
Battle:
PSN:
Mii:
Gamertag: alexandersshen
Following ()
Coding Experiment - EKANS!
alexandersshen | 6:24 PM on 06.10.2010 3 comments




I spent some time this morning thinking about mini-games to add to my newest project Penny. No details really, but I decided adding a Snake type game would be nice. In an effort to strengthen my coding skills, I decided to whip one up together with the greatest Pokemon ever (http://www.destructoid.com/why-ekans-is-the-best-pokemon-168461.phtml).

There are many different ways to implement the code, but the way I approached it was that each segment has two states: where it was and where it's going. With each tick of the game loop, it will move to where it's supposed to be going. The body piece behind it will set it's "where it's going" to the "where it was" of the piece in front of it. This way I don't have to queue up a huge list of turns. It will always know where to go as long as there's something in front of it.

Overall I think it worked out pretty well and I learned something today and that's a good thing. Play link below!

Related Link: http://www.shengames.com/flash/ekans/



Attached photos:

Photo

Is this post awesome? Vote it up!

3

Those who have fapped:  AwesomeExMachina  


Post a comment! You can also post a photo below:

Comment with Facebook





Click connect and comment instantly!

Comment with Dtoid





New? SIGN UP - it takes 5 seconds

2 comments | showing # 1 to 2
prev next

robotbebop's Avatar - Comment posted on 06/10/2010 20:32
robotbebop
I was about to close the browser, thinking WTF is this shit? But then the text appeared and it became awesome.
CelicaCrazed's Avatar - Comment posted on 06/12/2010 01:51
CelicaCrazed
Haha nice!! So true!
prev next

Comment with Facebook





Click connect and comment instantly!

Comment with Dtoid





New? SIGN UP - it takes 5 seconds

Comments policy

Destructoid is an open discussion community. You don't need to "audition" to post a comment - just speak your mind. We respect differing opinions on the site, so have at it. Be smart, funny, insightful, clueless, or cute -- but back it up with substance. Keep your cool, keep it fun. We only ask that you act respectfully and above all: don't be a troll and ruin it for everyone else. Don't bring down gamers or we'll, you know, gently shoot you in the face and stuff you into a flaming mailbox. Each comment is your opportuntity to make this community awesomer. Is that even a word?

Avoiding the banhammer only requires common sense: spamming, trolling, racism, NSFW stuff, and other forms of sucking will not be tolerated. If anyone is griefing please report abuse. Be good. Don't suck!