8x8 dotmatrix snake game
Uploader Comments (elektrolikit)
All Comments (12)
-
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?
-
Did you use a joystick switch? Theirs no up buttons But can you provide schematic?
-
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.
-
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.
-
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!
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.
elektrolikit 2 years ago
good job buddy!
Lets move forward with leds...
elektrolikit 3 years ago
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.
:)
elektrolikit 3 years ago
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!
elektrolikit 3 years ago
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!
elektrolikit 3 years ago