Gaming News, Game Reviews, Game Trailers, Tech News

dtoid   |   japanator   |   flixist   |   tomopop   |   store


 
alexandersshen blog header photo
alexandersshen
Posts 0Blogs 12Following 0Followers 3


 
 








On Destructoid:
Most Comments

more notable stories

FAQ

Who updates the homepage?
Our Staff
What is Destructoid?
Long story
Can I submit a story?
#BloggersWanted
Dark theme?
Yep
Site rules?
Douche lightly
Ethics much?
Read this
Privacy?
Common sense
Who owns my posts?
You do


Get in touch

Editorial contacts
Meet our staff
Ask a question
Community@
Get support
Support@
Story idea?
Tips@
Everything else
Get in touch

LONG BLOG

Coding Experiment - EKANS!

   0


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/
#Community    #Indie   
Login to vote this up!

LOOK WHO CAME:


alexandersshen   
CelicaCrazed   1
robotbebop   1


 
 

  0 COMMENTS

Please login (or) make a quick account (free)
to view and post comments.



 Login with Twitter

 Login with Dtoid

Three day old threads are only visible to verified humans - this helps our small community management team stay on top of spam

Sorry for the extra step!

 

About alexandersshenone of us since 12:16 PM on 02.01.2008

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: https://www.alexandershen.com
Xbox LIVE:alexandersshen


 

Around the Community

Featured

Posts

Blogs

Support

 



Read Huge: Top Stories

Destructoid