Chaze in the Maze (Demo)

Game development specific discussions.
Post Reply
JJFlash
Posts: 6
Joined: Nov 30, 2018 8:06
Location: Rome, Italy

Chaze in the Maze (Demo)

Post by JJFlash »

Hello everyone! :)

I just wanted to let you know about this little program of mine.

It's a FreeBASIC demo where you control a white asterisk, the Computer controls a little red face, and both of you are placed in a maze. Oh, and the Computer chases you :D

Image

Features
  • No square roots; only Integers used, no divisions
  • No queues & no stacks used!
  • Wall following
  • Main trick is Walter D. Pullen's Chain Algorithm, from his Daedalus program (see the Algorithms and the Daedalus pages)
  • Cross product of Vectors! :-o (Idea taken from StackOverflow)
  • A touch of Bresenham's Line Algorithm (adapted and simplified from the pseudocode at the Wikipedia page)
  • Compile in Debug Mode and see the Chain Algorithm in action
The source is posted on GitHub at this link.

What do you guys think about it? I feel that this can be improved while keeping in the above constraints, but I'm out of ideas so if there's any comment/suggestion/insult, I'm all ears! :D

Thank you for your interest!

(I apologize for my English as it is not my first language)
ganache
Posts: 47
Joined: Aug 04, 2016 9:25

Re: Chaze in the Maze (Demo)

Post by ganache »

Very nice work JJFlash!
But how to control the white asterix? Pressing arrow keys does not affect the movement. It is random movement, right?
JJFlash
Posts: 6
Joined: Nov 30, 2018 8:06
Location: Rome, Italy

Re: Chaze in the Maze (Demo)

Post by JJFlash »

Hello ganache! Happy to see your interest in this! :)

No, it's not random movement, you're supposed to actually control the asterisk by using the cursor keys on the keyboard.

I'm using the Multikey function to read the keyboard, and I know that it doesn't always work, depending on platform and/or antivirus used (a friend of mine had the same trouble because his antivirus on Windows 10 decided that my compiled program was suspicious, and somehow blocked the keyboard on it).

I'm sorry that you can't control the asterisk! I wonder if there's something I could suggest to make it work. Are you compiling the source on Windows or Linux?
Post Reply