Added: 3 years ago
From: elektrolikit
Views: 1,967
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (12)

Sign In or Sign Up now to post a comment!
  • good job.. i am trying to do the same thing.. do you have any pc simulator so i can test it on my monitor first.. ?

  • Do you have the source code (asm) and the schematics?

  • control is very similiar with orginal nokia snake game. You can play it with 2 buttons.up-right control is via right button, down-left control is via left button. Easy to learn and play...Schematic is simple. Make a google search:16f84 dot matrix circuit.

  • Did you use a joystick switch? Theirs no up buttons But can you provide schematic?

  • good job buddy!

    Lets move forward with leds...

  • NOW IT's READY XD!!!! (only movement) I used the same trick thanks.

  • thanks a lot, You give great tips, but I'm working at clearing the last led instead of seting leds, I store de lenght, and the turns, I hope it ll be finish soon. thanks and nice snake!

  • everything seems allright for stage one :) now lets move forward to the second stage...

    you should have an integer (i) value which stores the lenght of the tail then you may pass the recent head cordinate to next following tail before you update the head coordinate. Loop this i times, so that every time head changes its coordinate you can pass new coordinates to every led of the tail.

    :)

  • In asm we use 8 bytes that will store the whole display area, and only set the bit where is the new head position and clear the bit of the very last position.

    To be able to remember the very last position of tail we want to clear, we use a buffer of bytes the same length as the tail, always entering the new head position at buf(max) and reading the last position from buf ( 0 ). Then the whole buffer is shifted down one position.

  • When the snake eats something, max will be max +1 and we only enter the new head position at the new buf (max) position in the buffer. No buffer shifting and no tail clearing occur in this case.

    Every byte of the buffer contain an address in the binary form 0YYY0XXX.

  • Hi me again, Now I can control the head,I made a subrutine which only I put the cordinates in two registers CX & CY for matriz control,(Because asm language dont let me do bidimensional registers) and cheking botons to clear an move head adding or subtracting x,y through the direccion I am, but only i can save x,y, do I most save all cordinates(5x7 45 registers)? please help me! how do yo do tail and following code i know as words but i dont in code T_T, I'll be grateful!!! Thank U!

  • ohh,I'll take your advice, thanks a lot!

  • Code is written in "basic"

    Idea is simply using a matrix for recording recent tail coordinates to the game.Trick is transfering coordinates pixel by pixel.

    First try to make the head and control it.Then try to make a tail by matrix method.

    Good Luck!

  • very nice!!!, can you tell me about the program you did? how do you control the moving? and the tail following? did you use assembler, c, basic?(sorry for my poor english)I really want to do one

  • Thanks for the comment.You are right!!We can add new features with 16F88.

    That is the simplest and cheapest design but maybe I should jumb to RGB leds!

  • Nice! You might want to check out the PIC16F88 -- the '84 and '84A are kind of obsolete, not to mention expensive. (It shouldn't take much to port your code over -- and you get an onboard clock plus two extra I/O pins.) I believe the 16F88 is pin-compatible with the 16F84, as well, so you wouldn't even need to redesign the circuit.

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more