New Member: currently developing a new THINK Pascal App/game for 68K

LelandLong

New Tinkerer
Apr 27, 2024
4
11
3
This is a cross-post from 68kmla.org, hopefully that is okay.
I am hoping for a larger audience by posting a common thread in both forums.
- - -
For various reasons I won't bore you with, I recently recreated PacMan using JavaScript. Not a port. No copy/paste of somebodys code somewhere, but a complete start-from-scratch coding of the entire game all by myself. It was a wonderful time. Lots of challenges that matched my skill level. I would consider myself to be an intermediate-level JavaScript developer, nothing more. To add some clarity (and confusion most likely), this game was actually written and contained inside a FileMaker Pro database, using JavaScript for the game engine and native UI being handled by FileMaker. I am assuming that most readers of this post will find this bemusing, baffling, confusing, and possibly outright ludicrous, but so be it.
- - -
So I am currently in the middle of recreating PacMan using THINK Pascal v4.5d4, both on Basilisk II Quadra 900 v7.5.3 and on my new-to-me Mac SE/30 v7.1.
I am having fun, some challenges, more fun, more challenges, but still having loads of fun coding this well known game.

When I programmed a little bit back in high school and early community college days I only made THINK Pascal projects for 1-bit screens. Attempted to figure out color options once I had some color screens to try it out on (Mac LCII) but never could figure it out.

Now I have conquered this challenge and after a LOT of failures, and some helpful hints over on the 68kmla.org thread, I finally got color and an offscreen PixMap working to my liking and have moved on to greater challenges.
- - -
I hope that some of you on this forum will find this thread fun and captivating and that this can become the start of more fun and enjoyable 68K projects to come!

I will post my most current efforts here for anyone to browse and/or follow along with.
 

LelandLong

New Tinkerer
Apr 27, 2024
4
11
3
Apr 22 update
1) new Window menu item: DeveloperView toggle
2) no longer redrawing entire screen for every frame. Now in the offscreen PixMap we draw the entire frame once (startup, window size switching, & updates) and then only draw moving rects (previous location and new location) in subsequent frames. Then we transfer the whole image over to the gameWindow using CopyBits
3) we have the first row and column of pellets so that I can start to figure out spacing, collisions with, and variable storage of all the pellets
4) we have Pacman movement and animation frames. Current keys are: W,A,S,D and/or I,J,K,L
5) no walls or paths yet. He continuously moves but bounces off game borders.
6) we have pellet collision testing and erasure
1714221787210.png
 

Attachments

  • PacMan_v2 ƒ.zip
    2.8 MB · Views: 67

Paolo B

Tinkerer
Nov 27, 2021
258
143
43
Nagoya, Japan
Back at the time, I used to do a lot of programming in Think Pascal for solving scientific and engineering problems. Loved every bit of it.
 

LelandLong

New Tinkerer
Apr 27, 2024
4
11
3
Back at the time, I used to do a lot of programming in Think Pascal for solving scientific and engineering problems. Loved every bit of it.
Sounds great!
Anything since then?
Wanting to try your hand at it again?
Any hurdles preventing you from doing so?
 
  • Love
Reactions: Paolo B

Paolo B

Tinkerer
Nov 27, 2021
258
143
43
Nagoya, Japan
I’d love to help, but indeed I don’t have any spare time for it. I will follow your posts with special attention, though, keep on working on it, “The reward is in the journey“!
 

LelandLong

New Tinkerer
Apr 27, 2024
4
11
3
Apr 27 Major Update!
1) we have pellets. I decided to use a bitmap-style variable "matrix" to create where to draw pellets
2) we have walls. I copied the pellets "matrix" idea for the walls
3) we have collisions. I use the "matrix" to generate Rects and use these Rects inside SectRect() to test against the PacMan Rect
4) we have 30 new images, all for the custom scoring "digits", and the score is displayed using those instead of Text/Str255
5) the new Developer menu allows you to turn on/off behind the screens data that can be helpful and/or interesting
6) again, all of this is is implemented using 3 different screen sizes. A bit overkill but nice to have bigger & color when it's available

It feels like a lot of the hardest parts are implemented!

What is left?

Power pellets
Escape routes (vertically centered paths that wrap-around to the other side)
High Score
Custom controls
Sound
Monsters & their A.I. paths
Fruit / Levels
Cut scenes
Initial demo
Start/Abort game controls

Stretch goal: I have had this in mind for quite awhile now.
I would love to try and figure out how to connect 2 games together for a head-to-head 2 player game using AppleTalk.
I have never attempted AppleTalk programming and this should be a great place to start I think.
Maybe Program Linking?
Maybe AppleTalk Data Stream Protocol (ADSP)?
Just educated guesses.

But the game would be similar to the original Mario Bros. (not Super) and Joust and other games that allowed players to play both at the same time. But on 2 different networked Mac's, not using just 1 Mac, no no.
There would be 2 PacMan players, slightly different colors/shades to tell them apart. Competing over pellets and monsters and fruit to try and get them first.
Seems to me like a neat variation on a theme :)
1714267786657.png
 

Attachments

  • PacMan_v2 ƒ.zip
    2.9 MB · Views: 64