!Stargate new game for RISC OS
Pages: 1 2
Terry Swanborough (61) 152 posts |
Just in time for Christmas ! Download Stargate for RISC OS take your frustration out on invading Aliens from another dimension they are coming through stargate portals its your job to eradicate as many as possible. The game needs AMplayer for the music I have included a zip file containing the audio modules if needed. Stargate is a new game I have been writing in BASIC just to see how The program makes great (not so great) use of global variables mainly to keep the speed up. I did some timing on PROC statements and there is an overhead to using them , also passing variables can take time, so this is not a demonstration of how to write structured programs :-) The program is crunched but I have included the source so anyone can have a play. You can define your own levels look for PROCSet_Level Ive been playing it for a while so cannot tell how difficult it is?. Hitting the centre of the gates is meant to be hard as this increases your shield energy. I timed a single screen on the Titanium and it took somewhere between 2mS and 9ms depending on screen contents so the worst case is :- a 50Hz screen time is :- The program will sample the screen refresh rate 5 seconds into the intro screen this gives it time to stablise, it will then use this value to try an adjust the game speed for different screen refresh speeds?. Let me know what you think? Also what machines it runs on? It can be quite hypnotic to watch the intro screen with just the music playing :-) You can download Stargate from :- |
Willard Goosey (5119) 257 posts |
Wow that’s fun! and crazed!! |
Doug Webb (190) 1158 posts |
Plays well on my ARMX6. Thanks for the free game and the explanation about it. Good to see RDSP being used as well. |
Terry Swanborough (61) 152 posts |
Thanks for the replies It will be interesting to see how well it works on different machines. |
Paolo Fabio Zaino (28) 1855 posts |
Nice job Terry! Downloaded and will fire it up on all my RISC OS 5 boards! :) |
Andreas Skyman (8677) 170 posts |
Good job! The game freezes slightly on my Pi 3 when the music track changes, but other than that runs smooth. |
John Rickman (71) 645 posts |
ARMX6 no problems surprisingly “in your face” with a large screen and amplifier for the music. |
Terry Swanborough (61) 152 posts |
@Andreas I noticed when I tried it on a Pi that the music caused a slight freeze. I copied the game to RAM disc and had no problems. @John the music can be quite addictive. |
Doug Webb (190) 1158 posts |
Hi Terry ARMBook fails to load with message: `Screen mode not available at line number 19540` Most likely due to the ARMBook having only two screen modes availabe as in 1920 × 1080 or 1366 × 768. Hope that helps with testing. |
Terry Swanborough (61) 152 posts |
@Doug Thats to be expected at the moment the games calls Everything helps with testing :-) |
Terry Swanborough (61) 152 posts |
@Doug If your feeling brave look inside the !StarGate Directory and load the crunched file into an editor. Line No. 19540 change Q4%=640:R4%=480 I just tried 1360 & 768 as thats the monitor def I have here and it works to some extent |
Terry Swanborough (61) 152 posts |
I did try it on the Iyonix and it plays but the games Your right its not worth trying A3020 levels. |
Terry Swanborough (61) 152 posts |
The original files were in wav format and they were I was using !PlayIt to play back the wav files but it did not work as well in conjuction with the RDSP sound effects. So unless you have a better idea MP3 seems the way to go?. |
Terry Swanborough (61) 152 posts |
Well the source code is in the directory, so if your feeling creative you can always add your own music or playing system to the game , your quite welcome. |
David Williams (2619) 103 posts |
Congrats on the release. It’s nice to see a new RISC OS game since they’re so few and far between nowadays. I scored 7410 on my 2nd go, somewhat below the high score of 10000. By that point I was starting to worry about the possibility of repetitive strain injury setting in! :-) Here’s an idea for your consideration: Every so often, have the game produce a collectable ‘auto fire’ token which lasts a certain amount of time. It would afford the player a bit of a rest (especially when the action gets really frantic), reduces the RSI risk, and is kinder to the fire key’s keyswitch. On the other hand, I appreciate that auto fire can take some (or a lot?) of the fun out of games of this type. I played it on a Raspberry Pi 2 running RISC OS Direct. It performed well. No glitches as far as I could tell. |
Terry Swanborough (61) 152 posts |
@David Thanks for the comments, it was looking at some of your demos that lead me to believe that it was possible to write a game that was playable in BASIC some of your graphic demos are impressive. I’ll think about adding some extras to the game but I’m supposed to be designing printed circuit boards during lock down but writing this has been a fun distraction. I forgot how fluid working in BASIC can be so quick to correct errors. I realise that BASIC has a bit of negativity associated with it but it is really easy to pickup where you left of and continue. I do program in C but sometimes it can be so frustrating not the language but it can takes ages just the get the build environment up and running and don’t get me started on the error reporting :-) miss matched pointer to a pointer that might need this or that, just missing a } can sometimes have you searching around. I have thought about writing a game that works within the desktop I realise that all the graphic would have to be changed for the wimp using colourtrans and you can plot a sprite to the window area but how do you handle vsync does the wimp only update windows after vsync? You can’t hang around waiting for it to happen? Perhaps you could use graphicsV vector? It’s not something I’ve looked at closely any ideas? Anyway thanks for the comments and if the game was easy it would be boring right :-) |
Steve Fryatt (216) 2103 posts |
This old chestnut. At least it warns you; BASIC won’t actually notice the missing
Having the compiler syntactically check everything and refuse to play until you’ve got it correct is comforting: you know that there can only be semantic problems remaining. |
Terry Swanborough (61) 152 posts |
Calm down I did’nt want to start a language war I’m sure all languages have there pros and cons :-) this is just a game after all :-) |
Steve Drain (222) 1620 posts |
You do not mention that it will continue to search for an |
Andrew McCarthy (3688) 605 posts |
Thank you for the Xmas treat! I gave it the game a spin on a Pi4, it works, but it’s way too quick. Hit (x) ships move to the far right and hit (z) moves immediately to far left. BTW love the music. |
Doug Webb (190) 1158 posts |
Did that with the same error on the ARMBook. Also tried 1920 × 1080 with the same error and line number. Think it is because the ARMBook will only do 16M colours? Anyway enjoying it on my ARMX6 so thanks for a great little game. |
Terry Swanborough (61) 152 posts |
@Andrew If you wait for 5 seconds then the intro screen will increase the speed of the game for lower refresh rates. Give it a try. |
Terry Swanborough (61) 152 posts |
@doug |
Terry Swanborough (61) 152 posts |
Just A quick update:- Fixed some bugs not major ones so if your happy with how the game runs then I have changed the game to search for a screen mode it can use :- If you have a screen mode of 640 × 480 256 colours then you will see no difference. If 640 × 480 is not available the game will try the modes below in order. If you have one of these modes and enough memory it will run no scaling is @doug you may find it now works on the ARMBook (I cannot test it here though) You can also now press F to toggle a display of the current FPS and screen mode being used. REM --------------- Try 256 colour mode first -------------------- bitsPP%=0 IF bitsPP%=0:bitsPP%=FNAllocateAndChangeMode(640,480,"256") IF bitsPP%=0:bitsPP%=FNAllocateAndChangeMode(800,600,"256") IF bitsPP%=0:bitsPP%=FNAllocateAndChangeMode(1024,768,"256") IF bitsPP%=0:bitsPP%=FNAllocateAndChangeMode(1280,960,"256") IF bitsPP%=0:bitsPP%=FNAllocateAndChangeMode(1280,1024,"256") IF bitsPP%=0:bitsPP%=FNAllocateAndChangeMode(1360,768,"256") IF bitsPP%=0:bitsPP%=FNAllocateAndChangeMode(1366,768,"256") IF bitsPP%=0:bitsPP%=FNAllocateAndChangeMode(1368,768,"256") REM ---------- if no 256 colour modes try 16M colour ------------- IF bitsPP%=0:bitsPP%=FNAllocateAndChangeMode(640,480,"16M") IF bitsPP%=0:bitsPP%=FNAllocateAndChangeMode(800,600,"16M") IF bitsPP%=0:bitsPP%=FNAllocateAndChangeMode(1024,768,"16M") IF bitsPP%=0:bitsPP%=FNAllocateAndChangeMode(1280,960,"16M") IF bitsPP%=0:bitsPP%=FNAllocateAndChangeMode(1280,1024,"16M") IF bitsPP%=0:bitsPP%=FNAllocateAndChangeMode(1360,768,"16M") IF bitsPP%=0:bitsPP%=FNAllocateAndChangeMode(1366,768,"16M") IF bitsPP%=0:bitsPP%=FNAllocateAndChangeMode(1368,768,"16M") IF bitsPP%=0:bitsPP%=FNAllocateAndChangeMode(1920,1080,"16M") IF bitsPP%=0:PRINT"Cannot Find a Compatible Screen Mode":END REM ------ Give up if you cant find any of these modes ! --------- you can download the new version from |
David J. Ruck (33) 1629 posts |
I don’t think there are any machines which don’t support 256 colours, so a fall back to 16M should be unnecessary. It’s more usual to have to fall back from 2/4/16 colours to 256. |
Pages: 1 2