vampiress ,
@vampiress@eigenmagic.net avatar

Ahhhhhh that's satisfying. Just optimised the living shit out of my virtual text rendering code.

Dungeons of Freeport SDL version now runs at the right speed. Was an easy fix too.

I'd done the text rendering in a QUICK and nasty way just to ensure it worked. It re-rendered each character every frame, which is adding and removing a LOT Of sprite nodes.

(More details in the alt text for the image)

Apple Instruments showing execution of DFP before optimisation. The spike at the start is pathing a bunch of NPCs around - that should be spread over numerous frames to hide any frame drop on slower machines, so that’s my next optimisation fix.
After checking to see if the character NEEDS re-drawing, and the CPU load is MUCH lower. We still have the huge spike at the start from the pather but that’s something I’ll be fixing next.

ALT
  • Reply
  • Loading...
  • vampiress OP ,
    @vampiress@eigenmagic.net avatar

    Next on my to-do list, probably not all going to happen this afternoon:

    • turn on spreading the pathing routines over multiple frames, ideally before the player takes an action, to reduce the CPU bump. For ease early on I had the pathing routines as blocking, just doing a single path in a block even if it took a good chunk of time.
    • re-implement the 'text field input' routines that are needed for UI stuff
    • Implementing gamepad support
  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • test
  • worldmews
  • mews
  • All magazines