PixlTest
#1
Posted 23 August 2003 - 05:15 AM
i'm not completely sure how to use it.
i want to draw random dots around the screen and then when my snake hits any dot, it goes gameover.
can somebody please help.
#2
Posted 23 August 2003 - 05:25 AM
PxlTest:
PxlTest X,Y
;This tests the pixel at X ,Y (Not sure maybe upside down: Y,X)
Now you can't use the result directly so you have to do it the folowing way:
PixelTest A,B ;A/B is the head of the snake
Ans=1=>Goto s ;Pixel is set! Die!!!
It's silly you can't use it in conditions but Ans contains the value pixeltest returns. Good Luck!
#3
Posted 23 August 2003 - 07:16 AM
Who here makes color games, I can't be bothered, it's not like we need the colour, black and white games are already slow.
#4
Posted 23 August 2003 - 12:11 PM
#5
Posted 23 August 2003 - 07:43 PM
I'm not sure if Locate function works slower than SetPxl. Possibly yes, but in text mode the snake is clearer and easier to lead to target.
Anyway I made snake in text, but it worked rather slow after eating 12 targets. It is not a problem to enlarge snake, but to check impacts.
#6
Posted 23 August 2003 - 07:51 PM
#7
Posted 23 August 2003 - 08:09 PM
#8
Posted 23 August 2003 - 08:11 PM
#9
Posted 23 August 2003 - 08:16 PM
#10
Posted 23 August 2003 - 08:17 PM
#11
Posted 24 August 2003 - 04:12 AM
writing the deg sign (which actually turns out to be a 3x3 hollow square) and turning the middle pixel on, is faster than drawing 3 flines to fill the same space (on the AFX2.0)
also for clearing you could write a text space (" ") somewhere to the end. This would end up being a lot faster than clearing 9 pxls
if you look at my tetris game's loading screen i use this method but it turned out to be way too much of a problem for ingame graphics
#12
Posted 24 August 2003 - 10:13 AM
It also includes a level editor to make own levels.
It's quite easy!
Here is the link:
Snake GAME
In level editor:
EXE = SET WALL
- = RESET WALL
EXP = SAVE MAP
*EDIT
If you get an error click right on the link and choose "save target as"
or click in the adresse field and press enter to reload the file. It will work then.
#13
Posted 25 August 2003 - 06:36 AM
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users