Messing with Morphing

Anything QL Software or Programming Related.
stevepoole
Super Gold Card
Posts: 716
Joined: Mon Nov 24, 2014 2:03 pm

Re: Messing with Morphing

Post by stevepoole »

Hi Per & everyone,

Gunman_bas proved to be quite slow when tested on SGC. The problem seemed too be due to using four arrow keys, with range testing.

To reduce such sluggging, a minimalist 'platform' game seemed ideal, needing only ENTER to achieve jumping. so less code in the inner loop.
UNZIP, LRUN or ESCape. When the athlete reaches the jumping-block, Press ENTER (long) to leap, but NOT beforehand ! Score, top left...

So the simplest game was a (Quantum) Leap through QLympic loops. Yet the result was even slower on SGC, because of many image details.

Memory usage would be reduced by integerising the code. But using morphed animation seems to require quite low definition drawings.

Next, I may attempt a longer platform game scenario, with some surprise special effects ! As QBits said, we need to explore new ground.
Hurdle.zip
(4.42 KiB) Downloaded 28 times
Capture d’écran (334).png


stevepoole
Super Gold Card
Posts: 716
Joined: Mon Nov 24, 2014 2:03 pm

Re: Messing with Morphing

Post by stevepoole »

Hi Folks,
Well, here is a much better (two level) platform game as promised. Just UNZIP, LRUN or ESCape. Ok on QPC2 :(Too slow on SGC or less).

Avoid the verttical moving bars, (which will disappear when hit), but hit all of them and the game is over !

kick the moving balls to score, (shown in top left corner). Use arrows up to jump, down to fall or space to reverse direction.

Four balls hit give a fresh screenfull. See how many balls you can kick before 'game over'. Please report any quirks...

The code will be optimised and tidied up for the final version. (And maybe with some added effects ?) Regards Steve.
Platform.zip
(4.39 KiB) Downloaded 15 times
Platform.zip
(4.39 KiB) Downloaded 15 times
Attachments
Capture d’écran (336).png


stevepoole
Super Gold Card
Posts: 716
Joined: Mon Nov 24, 2014 2:03 pm

Re: Messing with Morphing

Post by stevepoole »

Hi everybody,

Platform2_bas now correctly shows your scores ! Several quirks have been eliminated. The game gets progressively faster as you play...

Ball and bar movements are now better. The game can get fast and furious ! The aim is to stay alive for as long as possiible.

Tetsed on QPC2. My attempts to make it useable on SGC have so far failed, but some optimisation will be achieved soon.

It shows that animated games are possible with just five 40-point drawings... thanks to morphing.

How long would a sprite equivalent take to write, using assembler ? (This version took just one day to adapt). Regards, Steve.
Platform2.zip
(4.48 KiB) Downloaded 22 times


stevepoole
Super Gold Card
Posts: 716
Joined: Mon Nov 24, 2014 2:03 pm

Re: Messing with Morphing

Post by stevepoole »

Hi all,
The program has just been tweaked : Now crashing into gates reduces your score by half a fruit-point. Much more interesting !

So you need to be far more agile, adding spice to the excitement... (Modification to be included in the final version).

Still looking for any necessary improvements. (The code is actually being optimised and commented). Regards, Steve.


stevepoole
Super Gold Card
Posts: 716
Joined: Mon Nov 24, 2014 2:03 pm

Re: Messing with Morphing

Post by stevepoole »

Hi,
Here is the (hopefully) final version. With commented code, and optimised as far as morphing allows ! (Tested on QPC2).

The interpolated frames were temporarily reduced from 16 to 4, pauses and panning removed, but still too many overheads for SGC to handle.

Alter line 3860 to adapt to your processor speed. Change the number 1E-5 to say 1E-3 for more speed or to say 1E-6 for less. (Experiment...)

Will four platform levels, with more balls and bars, be feasable on QPC. I will report back...

The next program may have a more interesting scenario, with special effects, when inspiration allows it. Regards, Steve.
platform3.zip
(4.95 KiB) Downloaded 19 times


stevepoole
Super Gold Card
Posts: 716
Joined: Mon Nov 24, 2014 2:03 pm

Re: Messing with Morphing

Post by stevepoole »

Hi again,

Here is the big test : a four-level game. (Same controls). But now, if you hit a moving bar, you lose a whole point! (Challenging).

Morphing seems to be ok for strategicaally challenging games... More original scenarios would be far better. Regards, Steve.
Platform4.zip
(5.92 KiB) Downloaded 12 times
Capture d’écran (339).png


stevepoole
Super Gold Card
Posts: 716
Joined: Mon Nov 24, 2014 2:03 pm

Re: Messing with Morphing

Post by stevepoole »

Bonjour,

Is there any way to include a video screen capture, apart from the youtube option ? Steve.


stevepoole
Super Gold Card
Posts: 716
Joined: Mon Nov 24, 2014 2:03 pm

Re: Messing with Morphing

Post by stevepoole »

Hi,
here is a screen-captured video of the 4-level platform game in action, showing the five morphed images.

Unfortunately, as you record the screen the keyboard is inactivated, so apart from moving horizontally, jumping cannot be shown...

As mentioned before, as you get fresh screenfulls, the animation gets faster and faster ! Good luck.... Regards, Steve.
Enregistrement 2024-03-20 084622.zip
(5 MiB) Downloaded 16 times


stevepoole
Super Gold Card
Posts: 716
Joined: Mon Nov 24, 2014 2:03 pm

Re: Messing with Morphing

Post by stevepoole »

Hi Folks,
The next morphing program is a graphical adventure game called QLeopatras Quest, set in pharaonic Egypt....

To finalise all the graphics, I need a 'pantone' routine to select QPC2 COLOUR_NATIVE hues. Has anyone done such a routine ?

The game is 85% ready, and is being de-quirked before release, to fine-tune the detailed transformations. Regards, Steve.
______________


User avatar
BSJR
Trump Card
Posts: 186
Joined: Sun Oct 18, 2015 12:53 pm
Location: Amsterdam
Contact:

Re: Messing with Morphing

Post by BSJR »

stevepoole wrote: Wed Apr 10, 2024 5:46 am ...
To finalise all the graphics, I need a 'pantone' routine to select QPC2 COLOUR_NATIVE hues. Has anyone done such a routine ?
If you mean picking a colour and finding the numbers you can do that with this QL-Colour Picker.
https://home.hccnet.nl/b.spelten/ql/qcp.html

BSJR


Post Reply