Stargate arcade style game converted from RISC OS

Discussions related to graphics (2D and 3D), animation and games programming
Hated Moron

Re: Stargate arcade style game converted from RISC OS

Post by Hated Moron »

On 12/07/2022 19:45, terryswanb wrote:
I managed to find an old Dell laptop to try the different versions on, the original = 30FPS the GFX version was 60FPS
I also tried it on a Kindle Fire HDX 3rd gen and that also returned 60FPS.
I noticed that neither Stargate nor Decrypt scale their output to the window size (e.g. when clicking the Maximize button). Some people like to run games 'full-screen' for a more immersive experience, so I've modified my copy of Stargate by incorporating the resize routine that can be found in several of the supplied example programs:

Code: Select all

      WinW% = 640
      WinH% = 480
      VDU 23,22,WinW%;WinH%;8,16,256,8
      ON MOVE PROCresize(@msg%, @lparam%) : RETURN

...

      DEF PROCresize(M%, L%) IF M% <> 5 ENDPROC
      LOCAL W%, H%
      W% = L% AND &FFFF
      H% = L% >>> 16
      IF W%/H% > WinW%/WinH% THEN
        @zoom% = &8000 * H% / WinH%
      ELSE
        @zoom% = &8000 * W% / WinW%
      ENDIF
      IF @zoom% < &8000 @zoom% = &8000
      IF (@platform% AND 7) < 3 THEN
        @panx% = (WinW% - W% * &8000 / @zoom%) / 2
        @pany% = (WinH% - H% * &8000 / @zoom%) / 2
      ENDIF
      ENDPROC
This code snippet will not be correctly formatted if viewed at the Discussion Group, please click-through to the forum post to see it properly. May I request that you not complain to me about this problem, I am not responsible for it and cannot fix it.
terryswanb
Posts: 1
Joined: Wed 06 Jul 2022, 14:10

Re: Stargate arcade style game converted from RISC OS

Post by terryswanb »

Thanks for the full screen code Richard, I will add it to the two games, I am currently editing decrypt so that it runs
on a touch device, it currently works but you can't exit the game.

I had a thought about stargate demo mode I might add the option to press I or (tap the screen) to invoke invincible mode during the intro screen
, this would make the rocket invincible until level 10 and would allow the game to be tested to it's highest level without the stress of trying to stay alive. :-)
Hated Moron

Re: Stargate arcade style game converted from RISC OS

Post by Hated Moron »

terryswanb wrote: Thu 14 Jul 2022, 12:34 I had a thought about stargate demo mode I might add the option to press I or (tap the screen) to invoke invincible mode during the intro screen
, this would make the rocket invincible until level 10 and would allow the game to be tested to it's highest level without the stress of trying to stay alive. :-)
David Williams commonly included 'cheat modes' for testing and demonstration purposes, but often hidden behind obscure key sequences that couldn't be guessed without reading the source code. Here for example is an extract from his prizewinning Tyoob game:

Code: Select all

      REM Cheat modes: (1) Access all 4 levels. In the Title Page, keep Ctrl+F7 pressed for 5 seconds until beep,
      REM                  then press TAB once. Cheat% flag variable not modified.
      REM
      REM              (2) Permanent 100% Health. Kill count set to minimum required. 5 flags collected.
      REM                  Keep Ctrl+F1 pressed for 10 seconds until beep, then keep Down Arrow Key pressed until beep.
      REM                  Cheat% flag variable set to TRUE, otherwise FALSE.
(Again, sorry to those reading this at the Discussion Group for the mis-formatting. Please click-through to the forum post to see it properly).