Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 23:49 28 Mar 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: Space invaders

Author Message
capsikin
Guru

Joined: 30/06/2020
Location: Australia
Posts: 341
Posted: 02:49am 13 Aug 2020
Copy link to clipboard 
Print this post

I've done a rough conversion of Space Invaders to the Colour Maximite 2.
(not the Colour Invaders version with coloured sprites for aliens)


invaders-CMM2.zip


I've only set the font in one place, but it lets you see the aliens.

I've added controller support using my controllers library.

I've changed the movement keys from inkey$ to keydown, but it should be easy to change back if you are using a terminal. (search for keydown in the code)

The sound's kind of off, and I'm not sure if the dark blue colour I see is right.

I might do some more controller testing with it, but I've probably done all the porting work on it I'm going to. Others are welcome to improve it and fix bugs.

Thanks to TassyJim for the font files.

  TassyJim said  
Here are the fonts files, converted to CMM2 format

SPACEInvaders.zip

Jim


mcclout999, were you still looking at converting colour invaders? That would be good to see on the CMM2

  mclout999 said  
  TassyJim said  
  mclout999 said  
Yah I think is was not clear because I brought up 2 issues when I was mostly interested in why so many of the programs for the CMM1 error out saying you have exceeded the number of sprites. I look at the spr file they are trying to load and it seems like there are less than 64 in the file. I am not sure what is happening there and because I was getting that error I was asking if there where different max # of sprints. I want to understand how I can fix the games when I get one of those errors.

Give us a clue.
What program are to have trouble with?
Pick one, preferably not too big and start with it.

Jim


A game of Space invaders  File name Col_inv.bas

The error it throws is [40] Error: Maximum of 64 sprites
I got it somewhere I can't tell you where. When I come across any more gain(now I cant find them.  I have literally downloaded every MMbasic code I have found and I search high and low.


SPACEInvaders.zip

(from previous thread NEXT STEP- To start converting all the archive of programs. )
 
Atomizer_Zero
Senior Member

Joined: 04/07/2020
Location: United Kingdom
Posts: 134
Posted: 10:05am 13 Aug 2020
Copy link to clipboard 
Print this post

Pretty fun to play! The sound for the invaders moving was a little annoying... so I made a small adjustment...


dim integer sfx = 300

'General game loop
Do While 1
'check if we draw a new level
If NextLevel = 1 Then GoSub DrawNextLevel
'check if we have to move the Invaders
If Counter1 >= InvInterval Then

 play tone sfx,50
 pause(50) 'remove pause and play stop if you want smooth tone transitions
 play stop 'rather than "classic" invaders dub- dub- dub- dub-..

 Timer = 0

 sfx = sfx - 50
   if sfx <= 100 then
     sfx = 300
   end if

 GoSub MoveInvaders
 
capsikin
Guru

Joined: 30/06/2020
Location: Australia
Posts: 341
Posted: 04:18am 15 Aug 2020
Copy link to clipboard 
Print this post

  Atomizer_Zero said  Pretty fun to play! The sound for the invaders moving was a little annoying... so I made a small adjustment...


dim integer sfx = 300

'General game loop
Do While 1
'check if we draw a new level
If NextLevel = 1 Then GoSub DrawNextLevel
'check if we have to move the Invaders
If Counter1 >= InvInterval Then

 play tone sfx,50
 pause(50) 'remove pause and play stop if you want smooth tone transitions
 play stop 'rather than "classic" invaders dub- dub- dub- dub-..

 Timer = 0

 sfx = sfx - 50
   if sfx <= 100 then
     sfx = 300
   end if

 GoSub MoveInvaders


I couldn't hear the sine waves very well on my speaker so I changed them to square waves using play sound, and they all needed pause and play stop, so I put it in a function.

invaders3.bas in the zip file.


invaders.zip
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024