
- CLASSIC SNAKE GAME QBASIC HOW TO
- CLASSIC SNAKE GAME QBASIC UPDATE
- CLASSIC SNAKE GAME QBASIC FULL
- CLASSIC SNAKE GAME QBASIC CODE
CLASSIC SNAKE GAME QBASIC FULL
And indeed I wrote a great many tools and utilities to take full advantage of the 16-pages you could store and read not just pixels but interpreted data from.Īnd of course you could recolor the palette with POKE(). That was just too tasty for me to bypass. And if you chose the 16-color 320x240 resolution, you could have 16-virtual graphic pages to work with. You see, back then QBasic could have a resolution of 640x480 B&W dots, 320x240 with 256-colors or 16-colors. I was working in QBasic 4.5 on Scenario 1 at the time, a 16-color RPG Maker with high promises. Now along comes IBM-pc and aside from GWBasic, Turbo Pascal, and QBasic, you MUST use a special command to give time back to the system, or you could hang the computer.
CLASSIC SNAKE GAME QBASIC CODE
You could just code and things ran as well as they did. And all my life on modern IBM-pc I've used little interrupts to write code with.īack in the TRS-80, Apple ][, and Commodore Amiga, you didn't need that. I wouldn't be here if I couldn't code the way I like to. That would be me, the Grinch, stubborn and set in my ways, even though Christmas might be better. I know there is _draw() and _update() but I really don't like it. Well you have to understand first off, I am REALLY old school. OMy, (White Rabbit?) your SNAKE game is just as good today as it was then. I really enjoy your content, keep up the good work! I hope the kind of response you were hoping for <3 Even the apples are just a circle and a few dots! One of the details I was proud of when making snake was the fact that everything except for the title screen was drawn in code and not as sprites. If you have a look in the code for "Snake for Pocket Chip" you'll notice the _update and _draw functions also act as a finite state machine, literally taking the variable "state" as the state of the game (ie, title screen, main game, game over screen) The reverse is true for the snake traveling in a vertical direction. The program would see the snake as being in a horizontal state, and while in that state would only have access to vertical inputs. If the snake is moving horizontally then the game would only take in an input if it was up or down and would ignore any other input. I got around that problem by reducing the direction you could turn. I've forgotten most of the details of how I made my second snake game but I do remember relying heavily on the idea of a "finite state machine" as that's the only powerful computational concept I had at my disposal at the time.įor example, the problem where the snake can turn back on itself and you lose the game instantly. I wanted the snake to appear to be moving smoothly like it did in my first ever cart ( ) but also be locked into a larger grid so that I could have better art opportunities, the sense of a smaller play area, and to make it slightly easier for the player to achieve the goal of eating the apples.

I think my biggest problems came from how I was expecting the snake to move through the level. Here's a link to the updated version of the cart (note: it no longer works on the pocket chip as I had intended it to)
CLASSIC SNAKE GAME QBASIC HOW TO
I had a lot of problems trying to figure out how to make my second snake game, the one you left comments on just over a year ago. I can't figure out how it works, there isn't even a _draw() function? But clearly it does work! I've had a look at your code and honestly. I saw this post and couldn't resist speaking up as my snake game is something I am so proud of. How would you code your SNAKE in the most efficient manner possible, and please, include the source.Ĭhances are one of us (likely me) will learn something from it. This is open to any and all programmers, not just you aces and veterans but those who are either learning to program in Pico-8 or have for a-while. My question to you is how would =YOU= do it more efficiently ? So you need only plot a number behind where the player just was, to create this trail effect.

CLASSIC SNAKE GAME QBASIC UPDATE
To update this I have a sweep of the entire playing area and if one of the tiles is a number that is greater to or equals one, then it decreases by one. Albeit a lower number means it will vanish more quickly. The higher the number the longer it will be in play. As for me, I have always opted to ID the entire screen, in this case, all 15x15 tiles and use a number to represent a part of the snake. There are many approaches to writing this.

It's not simply drawing a line, it creates a trail that disappears behind the player according to how far in the game they are. The classic SNAKE game has been around for many years and during that time some innovative programmers have figured out unique, interesting, and compact ways of handling it. This is not a very complex cart, or perhaps it is. Update: put helpful remarks in ALL of code now.
