tom-seddon / ghouls-revenge

Ghouls: Revenge
3 stars 1 forks source link

Game should draw objects as part of drawing level #6

Closed tom-seddon closed 1 year ago

tom-seddon commented 1 year ago

Currently objects get drawn on their first update, which (depending on speed) might take a visible number of frames. (This got broken while moving everything to use an object list.)

The editor has its own level draw function, that draws everything. Could reuse that? This would also fix #5. (This routine is a bit editor-specific though, and it requires the (rather chunky) editor objects table.)

Separate per-object draw routine could also be an option. Might come in handy for other stuff.

tom-seddon commented 1 year ago

Post editor revamp, the editor draw routine is probably more reusable.

tom-seddon commented 1 year ago

The editor draw routine still calls a bunch of editor-specific stuff.

For now the relevant sprites are drawn manually. Not ideal, but it works. This might be worth revisiting later, when/if I remember how everything works.