Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QB64 Pac-Man Clone
#11
speaking of options, while in the options screen if you press esc then the program crashes
Line: 3622 (in main module)
illegal function call
Continue? Yes, No
Reply
#12
(12-27-2022, 09:17 PM)Jack Wrote: speaking of options, while in the options screen if you press esc then the program crashes
Line: 3622 (in main module)
illegal function call
Continue? Yes, No

uh oh. I'll check it out.

Ok, that's an odd one. Line 3622 simply unloads the font from RAM:

_FREEFONT Font

and it's contained in the ExitGame subroutine. I can press ESC everywhere else in the game and no issue. I see no reason why being in the options screen would cause an error.

I'll keep investigating.
Reply
#13
Terry: This is amazing!  You've done it again!  Such a great clone.  I love this game.  Thank you for doing this and thank you for sharing.
Reply
#14
(12-28-2022, 02:42 PM)TerryRitchie Wrote: Ok, that's an odd one. Line 3622 simply unloads the font from RAM:

_FREEFONT Font
This statement has been unreliable since its creation. In particular the programming system complains when the programmer tries to release the font it thinks is active...
Reply
#15
(12-30-2022, 07:21 AM)mnrvovrfc Wrote:
(12-28-2022, 02:42 PM)TerryRitchie Wrote: Ok, that's an odd one. Line 3622 simply unloads the font from RAM:

_FREEFONT Font
This statement has been unreliable since its creation. In particular the programming system complains when the programmer tries to release the font it thinks is active...

I believe you need to have any surfaces that the font has been assigned to removed from RAM before the font can be removed. In the options subroutine I create a screenshot and I believe that screenshot inherits the font. When the user presses ESC while in the options screen that screenshot is still sitting in RAM and hence the error. I'll need to rework the code to remove that screenshot to account for this.

I've never had a problem with any of the font commands over the years, including _FREEFONT. I've just found a certain order of operations needs to be adhered to when using them. I used to think this was an SDL thing but this same behavior occurs on the latest versions of QB64 as well.
Reply
#16
(12-30-2022, 07:02 AM)LEM Wrote: Terry: This is amazing!  You've done it again!  Such a great clone.  I love this game.  Thank you for doing this and thank you for sharing.

Thank you for the kind words Smile  I'm tinkering around with a 3D wireframe engine I'm working on. Damn near have it looking like Battle Zone at the moment. I'm thinking QB64 Battle Zone may be coming in the future ... Big Grin
Reply
#17
Geez... I stink at this.  I can't even get it to compile. (I mean, yeah, eventually I got it... but feeling like a doofus for forgetting how to use the IDE) It did complain about the ICO file though.
Reply
#18
(01-05-2023, 03:43 PM)Pwillard Wrote: Geez... I stink at this.  I can't even get it to compile.  (I mean, yeah, eventually I got it... but feeling like a doofus for forgetting how to use the IDE)  It did complain about the ICO file though.

You should have no problems if you place all of the files into your QB64 folder.

If anyone else is having issues this is what you do:

From within your QB64 folder start qb64.exe or qb64pe.exe.

Within the IDE press:

ALT-F then O  (the letter O)

then type:

pacman.bas

Press ENTER to load the source file

Then press

F5

To run the code.
Reply
#19
I finally got around to trying this out.  Wow, you hit this out of the park, Terry!  It plays exactly how I remember the original.  I'd swear the ghost move/follow logic is the same too.  Really amazing work.  Great!

- Dav

Find my programs here in Dav's QB64 Corner
Reply
#20
(01-05-2023, 11:31 PM)Dav Wrote: I finally got around to trying this out.  Wow, you hit this out of the park, Terry!  It plays exactly how I remember the original.  I'd swear the ghost move/follow logic is the same too.  Really amazing work.  Great!

- Dav

Thanks Dav. Yes, I used the same logic as the original game. The ghosts target the exact same cells using the same algorithms. It's slightly off from the original though. Patterns I use in the original don't quite match up in my version, which is good I suppose because it gives a while new feel to the game.
Reply




Users browsing this thread: 23 Guest(s)