Amiga.org

Amiga computer related discussion => Amiga/MorphOS/AROS Programmers Forum => Topic started by: balrogsoft on February 28, 2018, 10:17:20 AM

Title: Amiga Game Engine, system compatible engine
Post by: balrogsoft on February 28, 2018, 10:17:20 AM
Hello.

After a few months without progress in this project because I was busy with other hobbies, I learned to paint in watercolor and I took some practice time, I am working again on my Amiga projects.

Finally, this game engine project has a minimum development to share the code, is compatible with the system and includes support for the classic Amiga and MorphOS (AmigaOS 4 is not tested, I do not have any AmigaOS 4 machine), from older systems, below V38 and above, a different approach is used to implement double buffer screens and make it work from older Amiga systems to MorphOS.

Here is the code:

https://github.com/balrogsoft/amiga-game-engine
Title: Amiga Game Engine, system compatible engine
Post by: SamuraiCrow on February 28, 2018, 05:01:46 PM
Good start!  Does it support Cybergraphics 3 on classic?
Title: Re: Amiga Game Engine, system compatible engine
Post by: balrogsoft on February 28, 2018, 06:33:00 PM
Quote from: SamuraiCrow;836761
Good start!  Does it support Cybergraphics 3 on classic?


It should work, the real job of this engine is to detect the system in which it is running, and use the correct functions to have a basic screen initialization, the use of double buffer, bobs, mod player, joystick and keyboard, without the need to use AmigaOS API that runs from classic Amiga systems to MorphOS with the same executable file. But checking my code, maybe it will fail using the fb_flush function that manages the double buffer, which only manages the MorphOS system, the classic kickstart version of less than 38 or the classic 38 biggest kickstart version. I no longer have a Cybergraphics system, I sold my BVision :(

If you have a Cybergraphics system, check the executable examples of the engine. If it does not work, I'll change it to be compatible.
Title: Re: Amiga Game Engine, system compatible engine
Post by: Karlos on February 28, 2018, 11:56:32 PM
I noticed you have a cosine and sine lookup table header. If you are implementing lookup based functions for these, may I suggest storing just the sine range equivalent to 0-90 degrees (the first quarter) and making use of the fact that the curve is symmetrical. The same table can be used to compute sine and cosine and will be much smaller and more cache friendly.
Title: Re: Amiga Game Engine, system compatible engine
Post by: balrogsoft on March 01, 2018, 08:30:30 AM
Quote from: Karlos;836764
I noticed you have a cosine and sine lookup table header. If you are implementing lookup based functions for these, may I suggest storing just the sine range equivalent to 0-90 degrees (the first quarter) and making use of the fact that the curve is symmetrical. The same table can be used to compute sine and cosine and will be much smaller and more cache friendly.


Thanks, I know that trick, but the examples provided are just that, examples to show what can be done with the engine, and they aren't optimized for the size. It's just a showcase of chunky modes and a wolfenstein example developed with this engine compatible with Amiga classic and MorphOS.