Archive: AVSnake


1st February 2004 17:39 UTC

AVSnake
My second game for AVS. It's still in development, but I hope you guys can find some of the bugs. The full version will have different levels, which are programmed in the level loader sscope. Currently, only level1 is programmed. The required fonts and bitmaps are included in the zipfile.

The game should work for all resolutions larger than 256*169 and fps.


1st February 2004 18:50 UTC

You really need to work on the controls: the mouse thing is very hard to use (and seems quite inaccurate). For example, letting the player indicate 'reverse' is useless because this move is not allowed. Often, the moving of the snake changes the indicated direction, which is confusing, especially combined with the previous annoyance.
Finally, rapid movements aren't possible because doubleclicking triggers fullscreen.

You're better off using something like arrowkeys. T-F-G-H is a set that works for me in Winamp5 and it should work on most common keyboard layouts (QWERTY, QWERTZ, AZERTY)


1st February 2004 19:27 UTC

I'll fix it to make sure you can't reverse the snake. I'll make two modes: one mouse, one keyboard. I noticed one bug that I don't know how to fix. The orange things you have to pick are generated by randomly trying 2 times the height times the width positions and the code tests if there is already something there. I actually want this code to work until it has found a good location, but I don't know how to do it. Now the code is like this (edited to make it easier to read):


tmp=0;tmp2=0;
loop(mh*mw*2,exec2(assign(tmp,rand(mw*mh)),
exec2(assign(if((position is good)*(1-tmp2),gmegabuf(tmp),0),-100),
assign(if(equal(gmegabuf(tmp),-100),tmp2,0),1))));


The tmp is the position index. A value of -100 means there is a orange thing on that location. The tmp2 makes sure only one orange thing is generated.