Hi Cody --

This would be very awesome if you could build a 2.5d Doom-style engine in Squeak against BitBlt/Canvas, maybe even exposing morphs and halos.

Here are some thoughts to get started:
- By default, the image won't burn CPU unnecessary but includes pauses between draw cycles. Turn them off via preference "higher performance" or by removing the code in WorldState >> #interCyclePause:. The baseline should be around 300-400 FPS on modern systems.
- Frame drops might occur because of the garbage collector, which is not yet incremental but always full. So try to minimize object creation, maybe design a pool and re-use things.
- Stéphane Rollandin create a powerful roguelike engine for Morphic with a top-down perspective and some depth effects: http://www.zogotounga.net/comp/squeak/rogue.htm
- For a basic understanding how Morphic and interactivity in Squeak works, read this: http://dx.doi.org/10.1145/2984380.2984386 -- maybe your engine could run besides Morphic, not within Morphic.
- Morphic itself feels like "sugar on top" of such an engine. Yet, you might want to explore how far you can get by composing morphs and using #step (#stepTime), #keyDown:, #mouseDown: etc. as callbacks. You can do all the (procedural) drawing in a single morph's #drawOn: or you can find an object-oriented decomposition.
- Try browsing the implementors of #drawOn: in the image.
- If you never programmed a game in Squeak/Morphic, maybe take a look at the sources of: https://github.com/hpi-swa-teaching/Squeak-Is-You

Happy Squeaking! :-D ... and get comfortable with reading source code you already have there in your image. Lot's of content and examples already in front of you. :-) Senders/Implementors is your best buddy.

Best,
Marcel

Am 07.03.2024 07:08:39 schrieb Cody Sevier <sevierit@gmail.com>:

Hello Everyone,

Firstly, this is my first message here, so please correct my etiquette if it is not appropriate, or if I am mailing the wrong list.

I discovered smalltalk a few months back and i've been growing excited with use. I read through a few books like the squeak by example book and others. I now think it's time to take on a project of substance to really gain some experience.

I was really impressed with the multimedia/liveness of squeak and the stepping system of morphic. I thought to myself that this would be a perfect environment for some game development and thats where my current professional skills are being used. Cursory research showed others with games projects, even some with 3d to my surprise. I suspect those 3d engines are using the FFI to bind to c libs to achieve acceptable performance.

My desire would be to build a 2.5d rendering system inspired by the doom engine. I figured it might be a better candidate performance wise then a full 3d engine and since its a software render, entirely self contained. (im not interested in external bindings yet.) However, I discovered the FPSMorph when exploring and to my dismay saw my system running at 47 fps on average simply idling.

My specs are pretty good, Intel© Core™ i7-8705G CPU @ 3.10GHz × 4. So I thought surely this is a stepping concern, perhaps they have limited it. I changed the update interval and was guaranteed no additional frames. Im going to dig in further to see if implementation details are the issue, but thought it might be a good idea to consult the experts in tandem.

So, is morphic really that slow for everyone else? Im concerned that if I take on such a project it may never actually be usable beyond learning. Would anyone willing to share their experience doing games? Perhaps maybe bypassing morphic and using direct Form + BitBlt would be faster? Any advice, experience or wisdom would be greatly appreciated. Im more then okay with being told this wont work etc.

Sorry for the long mail and thanks for the great system!

Kind Regards,
Cody Sevier