The response to this has been pretty positive, so I'm throwing this demo up here on the forums.
This cart is a prototype for a point and click adventure with pre-rendered 3D graphics and a custom palette.
Included in this cart are elgopher's require module and snowkittykira's error explorer module
32 synthesized instruments for your composing pleasure.
#able_ipack_01-1
If you've got requests for the next instrument pack, let me know!
I made it as easy to use and as performant as I could. You certainly won't be getting the performance boost normally associated with an ECS, since that particular optimization doesn't exist in picotron, but you'll still get the architecture.
Here's a demo which showcases its use.
You can find the latest version and the documentation on github.
https://github.com/abledbody/picotron-ECS-framework/releases/
https://github.com/abledbody/picotron-ECS-framework/blob/main/README.md
Does what it says on the tin. Lets you see what's eating up your CPU time. If you make an extension to this, I'd love to see it.
API:
profile.enabled(detailed,cpu)
Turns on and off profiling tools.
detailed
: Whether or not to display results of profile
calls.
cpu
: Whether or not to display total CPU usage.
profile(name,linger)
Starts or stops a profile. Accumulates between profile.draw
calls. Extremely cheap when profiling is disabled.
name
: Arbitrary display name indicating which profile to start or stop.
linger
: Whether or not the profile should linger even if the profile is never called between draws.
profile.draw()
Draws profile and CPU information to the screen if they are enabled. Extremely cheap when profiling is disabled.
profile.clear_lingers()
Clears any lingering profile information.
Example:
include("profiler.lua") profile.enabled(true,true) local frames = 0 function _update() profile("_update") frames = frames+1 profile("_update") end function _draw() profile("_draw") if frames%2 == 0 then profile("displaying frame count",true) print(frames,80,0,7) profile("displaying frame count",true) end profile.draw() profile("_draw") end |