Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 17:22 26 Apr 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CMM2: Rocks in Space - Test Pilots Needed

     Page 1 of 2    
Author Message
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1082
Posted: 01:13am 19 Sep 2020
Copy link to clipboard 
Print this post

Sorry, no hazard pay.

The time has come to release a preliminary version of Rocks in Space!



As the image suggests, this is an Asteroids clone. Most functionality has been implemented and now it's time to let others help find more bugs.

Not done yet:
volume control,
high scores,
player/ufo collisions,
ufo sounds, although they may never happen

I am unsure how accurately I have recreated ufo flight and firing characteristics, particularly the little devil, who's aim gets better as your score increases.

As always, have fun, and let me know what you discover.

RocksInSpace_v0_10.zip
Visit Vegipete's *Mite Library for cool programs.
 
berighteous
Senior Member

Joined: 18/07/2020
Location: United States
Posts: 110
Posted: 03:21am 19 Sep 2020
Copy link to clipboard 
Print this post

sweet!
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3839
Posted: 08:23am 19 Sep 2020
Copy link to clipboard 
Print this post

Curse you for creating great stuff that I can't appropriate for the Welcome Tape; somehow I don't think Atari/Hasbro will be as accommodating to a request as Scott Adams was.

Lovely work,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
epsilon

Senior Member

Joined: 30/07/2020
Location: Belgium
Posts: 255
Posted: 01:21pm 19 Sep 2020
Copy link to clipboard 
Print this post

D'oh! This is exactly what I wanted to do as my first game project on CMM2. You beat me to it. Looks great! Congratulations!      

/Epsilon.
Epsilon CMM2 projects
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1133
Posted: 02:06pm 19 Sep 2020
Copy link to clipboard 
Print this post

Neat!  

I would like the opportunity to land on some special asteroids and have some cover for a few seconds.

Kind regards
Michael
 
Lurch666
Newbie

Joined: 01/08/2020
Location: United Kingdom
Posts: 4
Posted: 06:44pm 19 Sep 2020
Copy link to clipboard 
Print this post

I got as far as random rocks moving.
Nice one.
 
chris
Regular Member

Joined: 24/08/2020
Location: United Kingdom
Posts: 54
Posted: 07:46pm 19 Sep 2020
Copy link to clipboard 
Print this post

Absolutely brilliant port. Very playable.

I wasn't expecting it to feel this polished, but polished it was.

Out of curiosity alone - I wonder if running it in a lower res will push up the framerate (still very very playable at the current frame rate)?

I tried changing the mode and it didn't work (I thought it wouldn't). Just curious if there is a bottleneck at 800x600 on the blit throughput, or if it is bottlenecked elsewhere.

Even so, 20fps at 800 x 600 is excellent, meaning that there is tons of headroom at regular gaming resolution of 320 x 200 or 320 x 240.
 
Sasquatch

Senior Member

Joined: 08/05/2020
Location: United States
Posts: 296
Posted: 08:07pm 19 Sep 2020
Copy link to clipboard 
Print this post

Yeeeeah.  Well done!  This is a great remake of an Arcade Classic!  Seems quite playable from the keyboard.  The original used a vector graphics CRT, but at 600x800 this looks quite good.
-Carl
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1082
Posted: 01:34am 20 Sep 2020
Copy link to clipboard 
Print this post

I forgot to mention, the number displayed bottom left is the time to generate each frame, in milliseconds. The program keeps each frame at a minimum of 35 milliseconds, so when that number goes over 35, it will start to lag or stutter. 35ms is 28.5 frames per second. Pretty impressive frame rate for interpreted BASIC!

Painting the screen and performing game logic are fairly independent.
If you look at line 612, you'll see half of the print statement commented out. Remove the comment character (') to print the second time value.
The entire frame time is "timer - t1"
The game logic time is "timer - t2"
By extension, "t2 - t1" would be the time to paint the screen.
Generally, more time was spent doing collision checking than painting the screen, so changing resolution won't make a dramatic change to frame rate.

And sorry, I wasn't very diligent at making the program graphics mode independent. Screen resolution based magic numbers are all through the code. Often they are 5, 10 or 15 or whatever more or less than MM.HRES and MM.VRES.
Visit Vegipete's *Mite Library for cool programs.
 
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 07:36pm 21 Sep 2020
Copy link to clipboard 
Print this post

Very nice! It plays just like The Real Thing :)

Out of curiosity, what editor are you using to create MOD files?

I missed that whole “scene” the first time around, but it seems that rolling your own MOD files for BGM and sound effects is an ancient art that will be very useful for developing games on the CMM2.

Cheers,

Joe P.
Enjoy Every Sandwich / Joe P.
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1082
Posted: 12:03am 22 Sep 2020
Copy link to clipboard 
Print this post

I used a combination of Audacity and OpenMPT to create the MOD files.

With Audacity, I captured the wave form from whatever source, combined stereo to mono, set amplitude, trimmed as required, tweaked wave forms if necessary, re-sampled to 8kHz bit rate and saved as a .WAV file.

Then with OpenMPT, I started a new project and selected .MOD as the output type, with 4 channels. I left the initial single pattern blank and set the tempo to minimum. Finally, I created  a new sample for each sound and loaded the .WAV for each. Save and done. Sandwich time!  ;-)

This seemed to be the easiest way to get a collection of sounds that the hardware can play up to 4 simultaneously. Reducing the bit rate to 8000 was an effort to reduce audio overhead. I didn't test to see how important that was but the sound quality is sufficient.
Visit Vegipete's *Mite Library for cool programs.
 
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 08:04am 22 Sep 2020
Copy link to clipboard 
Print this post

Thanks for that - I’ve been using Audacity for years; great app.

8 KHz mono is probably the most authentic anyway for first-gen stuff like Asteroids, and should have the added performance benefits you mention.

OpenMPT seems to be the only tracker that can import a MIDI file (i.e. to “populate” an actual BGM track), but I find the user interface to be very confusing. Ah, well, what can you expect for free? :)

FYI, the best free Windows tracker I’ve found so far is “Fast Tracker II”. There is a very slick commercial tracker called “Renoise”, but for some reason it does not support legacy formats like MOD and XM.

Cheers,

Joe P.
Edited 2020-09-22 18:07 by RetroJoe
Enjoy Every Sandwich / Joe P.
 
hitsware2

Guru

Joined: 03/08/2019
Location: United States
Posts: 705
Posted: 05:48pm 22 Sep 2020
Copy link to clipboard 
Print this post

  vegipete said  I used a combination of Audacity and OpenMPT to create the MOD files.

With Audacity, I captured the wave form from whatever source, combined stereo to mono, set amplitude, trimmed as required, tweaked wave forms if necessary, re-sampled to 8kHz bit rate and saved as a .WAV file.

Then with OpenMPT, I started a new project and selected .MOD as the output type, with 4 channels. I left the initial single pattern blank and set the tempo to minimum. Finally, I created  a new sample for each sound and loaded the .WAV for each. Save and done. Sandwich time!  ;-)

This seemed to be the easiest way to get a collection of sounds that the hardware can play up to 4 simultaneously. Reducing the bit rate to 8000 was an effort to reduce audio overhead. I didn't test to see how important that was but the sound quality is sufficient.

Do you make a separate sample for each note ( of a voice )
or a single sample and the tracker gives the notes ?
my site
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1082
Posted: 06:56pm 22 Sep 2020
Copy link to clipboard 
Print this post

One sample for each sound effect.

Even the two alternating tones are separate samples because otherwise the tone duration would be unequal.

There are a total of 10 sounds in the MOD file, although the two ufo sounds are unused.
Visit Vegipete's *Mite Library for cool programs.
 
hitsware2

Guru

Joined: 03/08/2019
Location: United States
Posts: 705
Posted: 07:28pm 22 Sep 2020
Copy link to clipboard 
Print this post

So to do a scale .... I.E. 8 piano notes ( frequencies )
do re mi fa sol la ti do ...
you would need 8 samples ?
my site
 
PeteCotton

Guru

Joined: 13/08/2020
Location: Canada
Posts: 316
Posted: 08:36pm 22 Sep 2020
Copy link to clipboard 
Print this post

Wow! Awesome job. I love how authentic it feels to the original, even down to the way the space ship explodes when destroyed. Definitely a labour of love. Thanks.

P.S. Also thanks for explaining how you do the audio. It is still a bit of a mystery to me, and you've definitely helped clarify a few things.
 
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 09:21pm 22 Sep 2020
Copy link to clipboard 
Print this post

  hitsware2 said  So to do a scale .... I.E. 8 piano notes ( frequencies )
do re mi fa sol la ti do ...
you would need 8 samples ?


No - think of a MOD file as a fusion of a MIDI file (I.e. note-on / note-off messages, although the MOD format does not use MIDI - it has its own proprietary musical sequence representation) and a bunch of WAV files (I.e. PCM samples representing different instruments or sound effects).

A single PCM sample of say, a flute playing Middle C, can be modulated to play all the notes by varying the playback frequency, and setting a “loop point” if the desired note duration is longer than the sample.

MOD  “tracker” software enables you to load samples, set loop points, define what musical notes you want played with them (via a step sequencer kind of editor), as well as add effects like vibrato, etc, then save the whole enchilada as a single MOD file. On the other side, the CMM2 has the necessary “MOD player” to decode everything, which is obviously quite a substantial subsystem in its own right.

As far as I can tell, MOD files are the ideal way to play music and sound effects on the CMM2, as it is the only one that enables concurrent sounds to play via the “PLAY EFFECT” command.

Vegipete’s MOD file contains only sound effects, so the PLAY command is essentially a “dummy” as there is no music to play, but it does enable the “PLAY EFFECT” command(s) to work correctly.
Edited 2020-09-23 07:29 by RetroJoe
Enjoy Every Sandwich / Joe P.
 
TweakerRay

Senior Member

Joined: 01/08/2020
Location: Germany
Posts: 138
Posted: 10:40pm 22 Sep 2020
Copy link to clipboard 
Print this post

Hi ! Great game !
I would make the game over screen a little bit shorter... so you don't have to wait that long for the option "1" to come in again... (People have no patience ;- )

Sorry to interupt in this conversation with a soundquestion also... since
in the manual its not really good described and I love to work with sound a little bit more... I tried to implement samples via the mod method...into my drummachine but
when i try to do so it says that the samples play over a modfile if i not constantly reactivate the modfile over and over... that also will do clicking sounds...

What is the best way to play different sounds at the same time. (Like for a drum with 4 sounds ;-) )

What commands do I need to do.

I get only strange errors... and in the manual I can't find it... i read the code of this game and also find a command "play modsample" which isn't at all in the manual

But This method worked the best for me but - I can't get rid of that clicking sound of the restarting modfile....
when I try to just play wav samples I can't adress them and you can only play one wav file at a time...
http://tweakerray.bandcamp.com
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1082
Posted: 11:12pm 22 Sep 2020
Copy link to clipboard 
Print this post

You can press "1" immediately to play again. You don't have to wait for the message.

================
You need to find a newer manual to read about "play modsample"
It is in version 5.05.05
Visit Vegipete's *Mite Library for cool programs.
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3839
Posted: 03:12pm 17 Feb 2021
Copy link to clipboard 
Print this post

Hey @vegipete,

Was "RocksInSpace_v0_10.zip" the only version of this, or did you issue an update.

I'm asking so it can be linked from CMM2.fun.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
     Page 1 of 2    
Print this page
© JAQ Software 2024