Greetings all,
as my QL continues to sit in a cupboard and I find more fun to play with QPC2 and SMSQ/E, I developed an alpha version of a "missile command"-type of game under QPC2.
It should adapt to various resolutions. It only uses COLOUR_QL so it can run in virtually any resolution and screen depth. For some reason 1920x1080 triggers a QPC bug that crashes the system (with FILL 1, shapes that go over the bottom of the screen probably spill into system memory and crash QPC).
The "game" isn't optimized at all, it just relies on the speed of the machine running QPC. The fun in programming it is in the game system that uses an array to animate up to 400 objects. The logic is quite common for a game loop: animate (update coordinates, check lifetime of objects, create/kill objects based on animations e.g. particles), show (just update the visuals with OVER -1), check collisions (kill objects / trigger explosions). In the absence of Classes/Structures, object parameters are stored in a integer array. Had I not coded it a bit at a time with no planning, it could have been much more optimized, e.g. the allocatio of new object is done quickly by keeping a stack-type list of unallocated object entires, but I didn't use a similar list of allocated object, hence the game loop goes through all 400 array entries at each loop, skipping the unallocated ones, and such... so please forget the style and good efficient game programming, the idea was just to have fun in creating some animations with simple 2d shapes and QL colours and stipples.
I don't even know if I'll ever finish it... last addition today was the APUS MEGABEAM (accented 'u' on the Italian keyboard, or KEYROW(1)=32)... explanations in REMark statements, for those interested.
Enjoy!
developing a SBASIC sort-of-game on QPC2 for fun
developing a SBASIC sort-of-game on QPC2 for fun
- Attachments
-
- missileattack-0.9a.zip
- (6.81 KiB) Downloaded 81 times
Re: developing a SBASIC sort-of-game on QPC2 for fun
I dont play shoot'em ups as they stress me out! However, many others do..
Your game looks well written and runs fast and smooth (I only tried it on QPC2 1920x1080x16). Nice demo of what is possible to achieve with our limited graphics!
Yes, the FILL "bug" can be a bloody nuisance. It seems the buffer was never adjusted for larger screen sizes. I dont know the exact limit, but > 1280x768 it is liable to crash the system. With any luck it will be fixed one day, especially if people like you keep writing new software, helping to keep SMSQ/E alive!
So keep 'em coming!
Your game looks well written and runs fast and smooth (I only tried it on QPC2 1920x1080x16). Nice demo of what is possible to achieve with our limited graphics!
Yes, the FILL "bug" can be a bloody nuisance. It seems the buffer was never adjusted for larger screen sizes. I dont know the exact limit, but > 1280x768 it is liable to crash the system. With any luck it will be fixed one day, especially if people like you keep writing new software, helping to keep SMSQ/E alive!
So keep 'em coming!
Per
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen