Welcome, Guest. Please login or register.

Author Topic: Hit the performance wall with AMOSPro - Switch languages or target fast Amiga?  (Read 305 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline DownshiftDXTopic starter

  • Newbie
  • *
  • Join Date: May 2019
  • Posts: 12
  • Country: us
  • Gender: Male
    • Show only replies by DownshiftDX
Just like the title says I have hit a wall with my "infinite" 8 way tile scroller in AMOSPro. Having recently fixed the last few glitches I had posted the code in ASCII to the AMOS facebook group but I have since marked my account to be closed. (I am sick of the almighty algorithm suggestions of politics / bot pages / p*rn in my feed that I report and facebook claims aren't p*rn. I am not a prude or even easily offended, I just have young kids who sometimes look over a shoulder or come into the office while I am scrolling and reading. No amount of block/hide/report seems to do anything with FB but I digress...

Having solved the glitches I moved on to optimizing and trying to up the performance. My normal machine is an A500 with a V2 and with my player bob on screen (~64x72px) and scrolling all over it is able to solidly hold 60fps so I feel good that I have some room to begin trying to implement level collisions. Moving to my '020 equipped A500 or with the V2 in slow "turtle mode" this drops to ~32-35fps. (Same with an emulated A500 with an 020) I've avoided floats and division as much as possible since the beginning and use a pre-calculated array for necessary mod values. There are no procedures being used in the main loop. Over the course of the last week I have gone so far as to rem out whole sections or put in GOTOs to jump over sections of code and with nothing else going on, no tile drawing, no bobs, just scrolling the screen I can get as high as 42fps. Compiled isn't much better. Since I am in NTSC I know I can squeeze some more performance by going to PAL but I don't think it will be enough to do any kind of game logic on top of rendering a level. I didn't think AMOSPro's code was really that slow even when you start doing just a few things.

When I was 16 or so, I bought Blitz 2 and moved from AMOS Pro when I got an A4000. I am a better programmer now than I was then so when I got back into the Amiga a while ago I wanted to go back to AMOS where I was more comfortable and thinking I would be able to make better design decisions. Blitz was always quirky and prone to crashing and I never really loved it other than its speed. I've kept an install of Blitz 2.1 and AmiBlitz3 on my systems for a while and I keep checking AmiBlitz periodically. AmiBlitz's built in tools, syntax highlighting, etc all seem awesome so I tried AmiBlitz 3.9.10 (latest) for the last couple days and was disappointed to find that it is essentially unusable as compiling will cause a crash in three or four attempts in most cases. Moving the cursor or selecting text can cause a crash. Changing preferences can cause a crash. (I am also building quite the list of non-crashing bugs with the editor.) I tried Blitz 2.1 again and it seems only slightly more stable but has its own editor weirdness that I had forgotten about.

So, for the veteran Amiga users still on here I have a few questions... Given that I am more nostalgic for OCS/ECS Amiga's and want my game to run there:

1. Would you stick with AMOS Pro, finish the project, and just target high CPU spec Amiga's? (Maybe even grant myself the 2mb chipram I have even though I have been limiting myself to 1mb?) I see this similar to modern retro inspired games on a PC with a modern language and game library/API... way more CPU power than is what is needed but it is about doing the project not necessarily being true to the past hardware.

2. Port to Blitz or AmiBlitz keeping a lower CPU target (around the 14mhz '020 range) and try to find a more stable system configuration for them? (I am happy to setup a dedicated install with nothing else but Blitz or AmiBlitz if somebody can recommend a configuration.) This I see as a more "pure" experience but probably brings a whole bunch of problems I haven't even considered besides just working in the constraints and issues of the tools.

I am sorry to say I just don't have the energy or will to try to learn 68k asm for the Amiga at this point and I have nothing but a loathing for C like languages. I am just more into the art and design end of things than I am a hard-core programmer.

Thanks for any input.

 

Offline TribbleSmasher

The bugs and crashes you are encountering with AmiBlitz3 and even BlitzBasic2.1 have other reasons.

Especially AmiBlitz3 is maintained still and bugs are now more rare than ever.
 

Offline DownshiftDXTopic starter

  • Newbie
  • *
  • Join Date: May 2019
  • Posts: 12
  • Country: us
  • Gender: Male
    • Show only replies by DownshiftDX
The bugs and crashes you are encountering with AmiBlitz3 and even BlitzBasic2.1 have other reasons.

Especially AmiBlitz3 is maintained still and bugs are now more rare than ever.

Would you mind elaborating? This isn't the old days where I had every hack/patch I could throw at my system running OS3.1. I don't think I am running anything too crazy but I guess I will clone my clean OS3.2.2.1 drive image for FS-UAE and only install AmiBlitz 3.9.10 and see how it goes tonight.
 

Offline TribbleSmasher

Quote
I tried AmiBlitz 3.9.10 (latest) for the last couple days and was disappointed to find that it is essentially unusable as compiling will cause a crash in three or four attempts in most cases. Moving the cursor or selecting text can cause a crash. Changing preferences can cause a crash. (I am also building quite the list of non-crashing bugs with the editor.)

This sounds weird all together.

I would suggest the previous version but i don't think it's AmiBlitz's fault.
 

Offline DownshiftDXTopic starter

  • Newbie
  • *
  • Join Date: May 2019
  • Posts: 12
  • Country: us
  • Gender: Male
    • Show only replies by DownshiftDX
Okay it has been a few busy days of work and kids but I finally had a chance to sit down and make a base install 3.2.2.1 system and a fresh extracted install AmiBlitz3 3.9.10 and give it a test for a while. I was not able to duplicate the crashes. The UI still acts weirdly in a lot of places but I think I can work around it. (Deleting text seems to corrupt the display of text from time to time. Backspacing up a line takes out the last character on the line. Selecting text from the bottom of the code to the top and scrolling to keep selecting shows the bottom code again at the top of the window. The color sliders for setting the syntax highlighting will not stay at the value they are set at either by using the slider or entering the number directly, etc...)

I went to my V2 system to compare and after disabling everything in WBStartup and going over the startup-sequence it seems that maybe StackAttack (which I had honestly forgotten I had installed) is the only thing that made a difference. When I disabled it it got a lot harder to crash the system while using AmiBlitz. There just isn't much else but VisualPrefs and VControl in my startup and my user-startup is almost all assigns. One time last night after I copied and pasted a line of code it pasted  "INTUITION_A" (or something similar to that) over and over on the line and then crashed the system. I haven't been able to duplicate that one where before as I said it would crash after four compiles or if I selected a menu to maybe bring up the instruction browser.

 

Offline Rob

Quote
I am sorry to say I just don't have the energy or will to try to learn 68k asm for the Amiga at this point and I have nothing but a loathing for C like languages. I am just more into the art and design end of things than I am a hard-core programmer.

Scorpion Engine might be more up your street, assuming you have a windows setup.

https://github.com/earok/scorpion-editor-demos/tree/master?tab=readme-ov-file

https://github.com/earok/scorpion-editor-demos/archive/refs/heads/master.zip

https://www.youtube.com/@earok/videos

https://www.facebook.com/scorpionengine/

 

Offline DownshiftDXTopic starter

  • Newbie
  • *
  • Join Date: May 2019
  • Posts: 12
  • Country: us
  • Gender: Male
    • Show only replies by DownshiftDX
Scorpion Engine might be more up your street, assuming you have a windows setup.

https://github.com/earok/scorpion-editor-demos/tree/master?tab=readme-ov-file

https://github.com/earok/scorpion-editor-demos/archive/refs/heads/master.zip

https://www.youtube.com/@earok/videos

https://www.facebook.com/scorpionengine/

I know of Scorpion and I think it is fine. I've enjoyed several games made with it but I don't have Windows and I don't really want to have to work in another OS to make something for the Amiga. If I am already working with a toolkit on another platform why even bother with the Amiga? I could just use Godot, AOZ, or fill in any number of other game making tools or high level languages. (And some years ago I was doing that in Blender with the Blender Game Engine and Python only to have them kill it and several forks went nowhere.) This is as much about having fun using the Amiga as it is about working on the project. I have no misconceptions about how difficult it is or the likelihood I will actually finish.

RedPill is interesting too but the last time I tried it out it placed a lot of limits on character sizes which greatly restricts design choices and the style of games to be made. Of course it also clearly states that you can't make every kind of game with it so restrictions are expected.