Design Question For Game Jam

8 views
Skip to first unread message

pixel...@gmail.com

unread,
Oct 31, 2025, 12:07:50 PM (11 days ago) Oct 31
to Medley Interlisp core
Good Morning,

So for my Game Jam entry I need to store the game's objects so they can be updated as the game runs in the associated Window. We'll call this grab bag of game elements a "game state" for now.

One thing I did last time was to add the game state into the game Window itself using a new user property. 

Then, for the window's left mouse event, I bind a (GAME.UPDATE  W) function that receives the window as a parameter (since the Window events seem to get the window as a parameter), digs into the game state from that window's property list and updates it there then redraws.

This way when a player clicks in the window, the game updates itself and does all the logic and redraws the screen elements needing updating.

Is this an acceptable design?

Herb Jellinek

unread,
Oct 31, 2025, 7:09:21 PM (10 days ago) Oct 31
to lisp...@googlegroups.com
That's how I'd do it.

- Herb

Herb Jellinek

unread,
Oct 31, 2025, 7:16:55 PM (10 days ago) Oct 31
to lisp...@googlegroups.com
Or, more correctly, have the REPAINTFN do the drawing based on the state, and have your event functions only update the state.

- Herb

pixel...@gmail.com

unread,
Oct 31, 2025, 7:23:29 PM (10 days ago) Oct 31
to Medley Interlisp core
Thanks everyone, I've got two PMs saying "yes" and further clarification by Herb.
I'm well into programming it now. (screenshot follows: (Yes, brown is my favorite color))

Screenshot_20251031_171920.png
Reply all
Reply to author
Forward
0 new messages