Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
132 user(s) are online (98 user(s) are browsing Forums)

Members: 0
Guests: 132

more...

Headlines

 
  Register To Post  

Porting Space Cadet?
Quite a regular
Quite a regular


See User information
Hi everyone,

A while ago Space Cadet was ported by BeWorld to MorphOS.

I was wondering if it is possible to port it to AmigaOS 4?

Here is the link to it on Github:

Space Cadet Github

It says on the page that it requires SDL 2.

I don't know how many would be interested, but I'd love to have a pinball game of this caliber on AmigaOS 4.

Go to top
Re: Porting Space Cadet?
Quite a regular
Quite a regular


See User information
I just did this port. During it I realised that there was quit a lot of endian byte swapping needed since object code in byte arrays was dumped from a little-endian machine (probably x86 of course). Then, I saw the good work of: https://forum.hyperion-entertainment.com/viewtopic.php?p=54334, which, in turn, came from the Wii port since that machine is also apparently big-endian.

All in all, I took the link in that forum thread and made a few tweaks.

- IMPORTANT: Drop this binary into the location where all the DAT files are located, otherwise your computer will crash (at least, mine does). This is because of hard "return 1" being used instead of freeing up resources first. I don't have plans to fix this, but could do in the future.
- For this version, you can supply an option "-accelerated" from invocation from the shell to ask it to try to invoke the SDL Renderer using accelerated renderer. For me, this just freezes my machine. SOFTWARE renderer works and that is the default
- Also, you can provide an option "-printerr" which will force the output of SDL error messages to be printed to stdout. By default I turned this off.

This is my dropbox link. I don't know how these new dropbox things work, so let me know if the link does not work:

https://www.dropbox.com/s/6dw181f7fwv0 ... paceCadetPinball.lha?dl=0

And, let me know if it doesn't work at all. I would ensure you have not got any important tasks running when you first try and invoke this.

Go to top
Re: Porting Space Cadet?
Home away from home
Home away from home


See User information
@rjd324
Tested.

Firstly unpacked it , and have only binary. So tried to run it as it. It says that i have no .dat file, and then happy lockup the system, that about things you already noted in your post as IMPORTANT, so that is known .. Maybe worth to upload your sources somewhere , maybe some of us will deal with proper cleaning of resources.

Then, find out necessary dat files (i grab them just from morphos port there: https://www.morphos-storage.net/?id=1688897) , and then things runs and works ! See (press open in new tab for fullsize):

Resized Image

The only moment which i can see, is that while it only loads up 50% of cpu (which also not quite small for simple game, but that of course not your fault, but the game itself), and the game itself didn't feels "very fast". It's all ok, but not 60 FPS that fo sure.

Through that surely ready for proper os4depot release, just not forget to add data files and some tasty icon :)

ps. I see game use lmgui engine , that right ? If so , you then seems use software build of lmgui ? Why i ask, is because Andrea have already GL4ES based buildof lmguie engine, which works quite well already, so maybe you can use that one as well (to have 2 versions, software one, and hardware one).


ps2.
Quote:

- For this version, you can supply an option "-accelerated" from invocation from the shell to ask it to try to invoke the SDL Renderer using accelerated renderer. F


For me it freezes too. Through i heard sound, and have no crash visually, it seems like some sort of intuition dead lock. Do you use latest SDL2 from os4depot, right ?

I just tried all the SDL2 renderers now with :


setenv SDL_RENDER_DRIVER "software" : OK, works
setenv SDL_RENDER_DRIVER "compositing" : deadlock
setenv SDL_RENDER_DRIVER "opengl" : OK, works
setenv SDL_RENDER_DRIVER "opengles2" : works, but rendering glitches (blinking).

So it all looks like this : compositing mode broken completely and ogles2 produce "blinking". Seems something to take a look for Capehill into SDL2 (at least about compositing).

Go to top
Re: Porting Space Cadet?
Quite a regular
Quite a regular


See User information
@kas1e

Thanks for that. I will upload the whole thing very soon. Plus it is MIT license. This was just a test that it worked on someone else's machine.

Go to top
Re: Porting Space Cadet?
Quite a regular
Quite a regular


See User information
@rjd324

Wow, that is great news! Looking forward to it appearing on OS4Depot!

This will be the first pinball game (as far as I know) running on AmigaOS 4, so I'm sure many will be looking forward to play it.

Go to top
Re: Porting Space Cadet?
Just can't stay away
Just can't stay away


See User information
@kas1e

https://github.com/k4zmu2a/SpaceCadetP ... adetPinball/gdrv.cpp#L145

Maybe assert happens during bitmap lock?

EDIT: can somebody try it with redirecting output to NIL:? Like

game >NIL:

I think BlitToTexture should be implemented using https://wiki.libsdl.org/SDL_UpdateTexture instead of lock + memcpy + unlock

Obviously game makes an assumption about texture (bitmap) width in bytes.


Edited by Capehill on 2022/3/25 17:21:32
Go to top
Re: Porting Space Cadet?
Home away from home
Home away from home


See User information
@rjd324

thanks! Following kas1e instructions I just put your exe file in the MorphOS download folder and working awesome on my X1000 in full screen mode

only thing misssing is the sound

Go to top
Re: Porting Space Cadet?
Home away from home
Home away from home


See User information
@328gts
Quote:

only thing misssing is the sound


Sound and music here : f5 and f6 to disable sound / music (as i see sound enabled by default, but music not, so hit those keys).


@Capehill

Quote:

EDIT: can somebody try it with redirecting output to NIL:? Like

game >NIL:

I think BlitToTexture should be implemented using https://wiki.libsdl.org/SDL_UpdateTexture instead of lock + memcpy + unlock

Obviously game makes an assumption about texture (bitmap) width in bytes.


With SDL_RENDER_DRIVER set to compositing ? If so, then tried, but same freeze.

Go to top
Re: Porting Space Cadet?
Just can't stay away
Just can't stay away


See User information
@kas1e

Redirection to NIL: doesn't help because assert probably causes abort() with bitmap lock. Game code should be fixed. Of course there can be other issues but this one is obvious.

Go to top
Re: Porting Space Cadet?
Quite a regular
Quite a regular


See User information
Okay, this first version is at:

http://os4depot.net/?function=showfil ... ion/spacecadetpinball.lha

See the TODOS and offer porting feedback since I am new to it. Sorry, but there is no decent icon, just a default info file.

....

Only before I uploaded to the depot/aminet did I use the latest SDL. I noticed a much smaller binary, and it defaulted to linear filtering which made it slow. I added the information to the IMPORTANT section, saying you can turn off that smoothing. It still crashed with accelerated. I can try the suggestions @capehill mentioned later.

....

Maybe I should set up a github for this code so you guys can suggest improvements and, in any case, I want to update the core code to the latest released version of spacecadetpinball anyway. This one is a few months old.

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: Porting Space Cadet?
Home away from home
Home away from home


See User information
@kas1e

thanks f5/f6 got sounds and music working

_______________________________
c64-dual sids, A1000, A1200-060@50, A4000-CSMKIII
Catweasel MK4+= Amazing
! My Master Miggies-Amiga1000 & AmigaONE X1000 !
mancave-ramblings

Go to top
Re: Porting Space Cadet?
Quite a regular
Quite a regular


See User information
A new version will appear soon on the depot, but it is in the queue right now:

http://os4depot.net/download.php?file=queue/spacecadetpinball.lha

This one is updated to the latest core code from the original repository, smoother graphics, an icon, and this time should not crash when there is no required DAT file.

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: Porting Space Cadet?
Home away from home
Home away from home


See User information
@rjd324

cool thanks

_______________________________
c64-dual sids, A1000, A1200-060@50, A4000-CSMKIII
Catweasel MK4+= Amazing
! My Master Miggies-Amiga1000 & AmigaONE X1000 !
mancave-ramblings

Go to top
Re: Porting Space Cadet?
Home away from home
Home away from home


See User information
@rjd324
Quote:

This one is updated to the latest core code from the original repository, smoother graphics, an icon, and this time should not crash when there is no required DAT file.


Tested : Moving of the ball are pretty slow. And cpu loading not 50% as before but 95. But that not very important if only ball moves fast but it sadly just really slow.

Also now on running i have in onsole such output : SDL ERROR: That operation is not supported.

Are you sure you build it all with -03 and without debug enabled ? And SLD2 with which you lin were non-debug one ?


ps. And seems compositing renderer now wors.. But give no differences in speed at all :( same slow.


Edited by kas1e on 2022/3/29 7:05:37
Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Porting Space Cadet?
Quite a regular
Quite a regular


See User information
@kas1e

That's really strange. For me it is the opposite. Linear filtering works fine and it is a lot faster. Optimizations are enabled and the output error messages were in the previous version also, I just did not put in the printerr option this time which suppresses them.

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: Porting Space Cadet?
Just can't stay away
Just can't stay away


See User information
@rjd324 @kas1e

Maybe Hieronymus and Profyler tools can be used.

Go to top
Re: Porting Space Cadet?
Quite a regular
Quite a regular


See User information
I just uploaded a new version in the queue on OS4Depot. The only thing is that I have suppressed the SDL error output (since users don't want to see that), devs may want to - I actually had this option in the first version but took it out before.

This time I compile with DNDEBUG if it makes a difference and was already using -O3.

From my end, I am getting lots of CPU usage, but no more than the first version and smoothing plays quite quickly.

This time there is no forced software rendering. When I updated to the latest core code and compiled with only endian changes applied, the game just worked. using "compositing" and was faster than before.

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: Porting Space Cadet?
Just can't stay away
Just can't stay away


See User information
@rjd324 @kas1e

Tested the latest on an X5000.

- Compositing mode is playable.
- SW rendering without linear filtering is playable. Filtering slows down quite a lot.
- MiniGL renderer I cannot test at the moment, waiting for NovaBridge...
- OGLES2 renderer flickers. I need to open a proper Mantis ticket for flickering issue, as it is visible also on some SDL2 test programs. Oh, I forgot to test the impact of batching on this, it changes the symptoms with test programs.

Go to top
Re: Porting Space Cadet?
Quite a regular
Quite a regular


See User information
Okay. Believe it or not, I just received an Amiga X5000. I am playing around with it!

I downloaded the LHA file from OS4Depot and I also saw that it was slow. What I needed to do was:

Options>Graphics>Set Default UPS and set that to 60.

It no longer runs slow. I will have to get the X1000 set up again to figure out why I have never needed to do that on that machine.

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project