boriel Wrote:Are you using just PRINT, or another graphic routine?
Yes. Just plain old print. You've got a copy of the code to prove it
boriel Wrote:Update: How do you printed the double-sized ghost in the middle?
<!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:DoubleSizePrint.bas">http://www.boriel.com/wiki/en/index.php ... ePrint.bas</a><!-- m -->
boriel Wrote:JBGV Wrote:The game is really good.
I imagine the behavior of the ghosts have to be very complicated :roll:
PAC-MAN responds very well to the keyboard, it moves very well
I'm a bit intrigued about the Ghost Logic It's pretty good.
Thankyou!
Actually, the behaviour is as authentic as I can get. Notice the border colour changes sometimes? That's for me to keep track of scatter/chase/frightened modes.
Behaviour algorithms stolen wholesale from the original, as written up at: <!-- m --><a class="postlink" href="http://home.comcast.net/~jpittman2/pacman/pacmandossier.html">http://home.comcast.net/~jpittman2/pacm ... ssier.html</a><!-- m -->
All except the fast cornering, which you can't really do in a character based game. No colour clash, though.
The most interesting thing, to me, is that it's all clock based. Interrupts are on, and something gets to move when the framecounter is past a certain point. Then it's moved, and a variable set as to the next time it's allowed to move. It makes for changing the speed of everything very easy (and in higher levels, you bet it speeds up and ghosts go blue for shorter and shorter times) - and also anything else you add to it (like test printout code) doesn't affect the speed. The downside is that sound will mess with the frames counter! So any sound effect longer than half a frame will have to increment the frame counter afterwards, to keep timing neat...
As you run out of dots, watch the speed of Red Ghost there... starts out moving every 10 frames, but just before the last dot gets eaten, he's zooming! (cruise elroy mode, in other words)