Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 00:05 25 Nov 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 : PicoRocks - A Teaser

     Page 5 of 7    
Author Message
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 06:19am 30 Jul 2024
Copy link to clipboard 
Print this post

Hans, Martin, others...

To make the keyboard game play come closer to the NES controller gameplay, set the keyboard delay to minimum (the NES controller is far more responsive with the default keyboard settings).


OPTION KEYBOARD xx,0,0,0,0


Where xx = "UK" or "US" or whatever code you use.

Volhout

P.S. I have a version now where the PS2 keyboard is as fast as the NES controller, using MM.INFO(PS2). But... it only works with PS2 keyboard, and not anymore with the USB connection to the PC (console). So I am not even sure if it will work on the new CMM1.5 (Pico with USB keyboarrd). Maybe this is not the way forward...
Edited 2024-07-30 16:55 by Volhout
PicomiteVGA PETSCII ROBOTS
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4036
Posted: 10:42am 30 Jul 2024
Copy link to clipboard 
Print this post

  Volhout said  P.S. I have a version now where the PS2 keyboard is as fast as the NES controller, using MM.INFO(PS2). But... it only works with PS2 keyboard, and not anymore with the USB connection to the PC (console). So I am not even sure if it will work on the new CMM1.5 (Pico with USB keyboarrd). Maybe this is not the way forward...


I have a vague recollection that the PicoMite USB firmware's (and thus CMM 1.5) may include support for KEYDOWN like the CMM2 does.

Best wishes,

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

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 11:21am 30 Jul 2024
Copy link to clipboard 
Print this post

Hi Tom,

Thanks for the tip. I'll have a check.
I'll have to test that KEYDOWN. Not sure it is just as fast. I may have to build a CMM1.5 first...
It could be a solution though, because I could sure use a KEYUP function (MM.INFO(PS2) has that), to prevent the player to fire salvo's unintended.

Volhout
Edited 2024-07-30 21:24 by Volhout
PicomiteVGA PETSCII ROBOTS
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4036
Posted: 05:17pm 30 Jul 2024
Copy link to clipboard 
Print this post

I got rocks9 "working" on MMB4L, but it's complete chaos, too fast, sometimes asteroids just sit where they are and spin, sometimes the UFO is static, the ship's acceleration is ridiculous. Not sure which of this is MMB4L bugs, so will have to try and find time to dust off my PicoMiteVGA for comparison.

EDIT: ... it's got no rate limiting has it? hence MMB4L is saying 5-6 ms per frame (which I don't necessarily believe), what do you get on the PicoMite.

Best wishes,

Tom
Edited 2024-07-31 03:25 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 06:20pm 30 Jul 2024
Copy link to clipboard 
Print this post

Hi Tom,

This is the status of the game. Asteroids and saucers have random speed, so 0 is possible. The loop time is not controlled, so it can be ridiculously fast on mmb4l. It is on the roadmap to straighten this out. Als ufo moves are random, in real game they are flat, 30 degrees up or 30 degrees down. Ufos have limitted life. Have all of that on todo.

Volhout
PicomiteVGA PETSCII ROBOTS
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 05:40am 31 Jul 2024
Copy link to clipboard 
Print this post

  thwill said  

EDIT: ... it's got no rate limiting has it? hence MMB4L is saying 5-6 ms per frame (which I don't necessarily believe), what do you get on the PicoMite.

Best wishes,

Tom

Tom
on Picomite i get 15-40 ms/Frame depending on the number of rocks

cheers
martin
'no comment
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4036
Posted: 12:34pm 31 Jul 2024
Copy link to clipboard 
Print this post

Thanks @Volhout & @Martin H,

It sounds like (in this respect at least) MMB4L is behaving and I shall await further developments on Pico-Rocks.

Best wishes,

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

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 01:36pm 31 Jul 2024
Copy link to clipboard 
Print this post

Hi Tom, others,

Please try attached. This version should have 30ms per frame minimum, on MMB4L that will be a constant, on pico it goes up to 70ms.

It has additional sound effects implemented, the ufo's behave more like the arcade, but on a picomiteVGA it is not as responsive as the original arcade.

Bullets do not wrap around the screen. I have decided against that since I do not fancy the gameplay. I tried it, but like current better.

Hans: there is a single line to disable NES controller.

 NES_Controller=1    'set to 0 for keyboard control


Still a lot to do.

Volhout

rocks11.zip
Edited 2024-07-31 23:37 by Volhout
PicomiteVGA PETSCII ROBOTS
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 03:46pm 31 Jul 2024
Copy link to clipboard 
Print this post

I changed the bullets because I couldn't see the bullets
sub DrawBullet
 local i
 for i=0 to 5
   'if bult(i,0) then pixel bult(i,1),bult(i,2)
   if bult(i,0) then box bult(i,1)-1,bult(i,2)-1,3,3,1,rgb(white)
 next
end sub

more visible and doesn't slow game play that's noticeable
Edited 2024-08-01 02:05 by stanleyella
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 04:37pm 31 Jul 2024
Copy link to clipboard 
Print this post

I thought this would get rid of stationary rock but it didn't

 for i = 1 to 8'10
   trock(i)  = 1 + (k and 3) ' rock type (0=doesn't exist)
   rock(i,0) = 2 + int(rnd*6)' rock size @Volhout *2
   do  'initial place rocks 100 pix away from ship
     rock(i,2) = rnd*MM.HRES   ' x location
     rock(i,3) = rnd*MM.VRES   ' y location
   loop while ((rock(i,2)-MM.HRES/2)^2 + (rock(i,3)-MM.VRES/2)^2)<100*100

   do
   rock(i,4) = 1-rnd*2   ' x velocity
   loop until rock(i,4)<>0

   do
   rock(i,5) = 1-rnd*2   ' y velocity
   loop until rock(i,5)<>0

   rock(i,6) = rnd*360   ' starting angle
   rock(i,7) = 3-rnd*6   ' rotation speed
   inc k
 next
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1109
Posted: 04:47pm 31 Jul 2024
Copy link to clipboard 
Print this post

I wonder.

The PIXEL command accepts arrays. What would the speed be like if the array version were used to draw all bullets each time, with non-existent bullets drawn at, say, 0,0? Then the entire loop structure and the IF statement could be removed. (This should work with the BOX command too.)

Also, we have the available the command MATH C_ADD array1!(), array2!(), array3!(). This would allow updating bullet and asteroid positions in one statement (each), removing another pair of loop + if structures.
Visit Vegipete's *Mite Library for cool programs.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 05:42pm 31 Jul 2024
Copy link to clipboard 
Print this post

  stanleyella said  I changed the bullets because I couldn't see the bullets
sub DrawBullet
 local i
 for i=0 to 5
   'if bult(i,0) then pixel bult(i,1),bult(i,2)
   if bult(i,0) then box bult(i,1)-1,bult(i,2)-1,3,3,1,rgb(white)
 next
end sub

more visible and doesn't slow game play that's noticeable


Are you sure you are running the latest code ?
This is the "rocks11.bas"

sub DrawBullet
 local i
 for i=0 to buls
   'if bult(i,0) then pixel bult(i,1),bult(i,2)
   if bult(i,0) then box bult(i,1),bult(i,2),2,2
 next
end sub


Version "rocks11" already uses a box command for larger bullets.

Volhout
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 05:46pm 31 Jul 2024
Copy link to clipboard 
Print this post

  vegipete said  I wonder.

The PIXEL command accepts arrays. What would the speed be like if the array version were used to draw all bullets each time, with non-existent bullets drawn at, say, 0,0? Then the entire loop structure and the IF statement could be removed. (This should work with the BOX command too.)

Also, we have the available the command MATH C_ADD array1!(), array2!(), array3!(). This would allow updating bullet and asteroid positions in one statement (each), removing another pair of loop + if structures.


Very good suggestion. I am looking for ways to save time, since the loop slows down more and more.
Would you be willing to experiment with that Pete ? Please do so.. I appreciate the help. If you need to re-define the 2D arrays for the bullets to multiple 1D arrays, that is fine with me. But you may be able to use MATH SLICE to get the X and Y coordinates from the 2D array.

I also tried checking coordinates in a square around the target (in stead of vector magnitude which in essence checks a circle), just to save time. Some remains of that may still be in the code. But also time is lost in USB/serial. The NES controller is much faster and PS2 using MM.INFO(PS2).

Volhout
Edited 2024-08-01 03:50 by Volhout
PicomiteVGA PETSCII ROBOTS
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 05:58pm 31 Jul 2024
Copy link to clipboard 
Print this post

  Volhout said  
  stanleyella said  I changed the bullets because I couldn't see the bullets
sub DrawBullet
 local i
 for i=0 to 5
   'if bult(i,0) then pixel bult(i,1),bult(i,2)
   if bult(i,0) then box bult(i,1)-1,bult(i,2)-1,3,3,1,rgb(white)
 next
end sub

more visible and doesn't slow game play that's noticeable


Are you sure you are running the latest code ?
This is the "rocks11.bas"

sub DrawBullet
 local i
 for i=0 to buls
   'if bult(i,0) then pixel bult(i,1),bult(i,2)
   if bult(i,0) then box bult(i,1),bult(i,2),2,2
 next
end sub


Version "rocks11" already uses a box command for larger bullets.

Volhout


no.I figured this myself.
search for rocks11
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4036
Posted: 08:24am 01 Aug 2024
Copy link to clipboard 
Print this post

Hi @Volhout,

rocks11 is definitely an improvement.

Items for your consideration:

1. The bullets don't always hit the small asteroids as @stanyella pointed out.
2. Why is there a strange "clown with a hooter" noise for the UFOs   ?
3. The real Asteroids machine only seems to have 3 bullets in flight at any one time.
4. I would say that all the "sprites" are 20-30% too large, the real Asteroids had more open space.
5. It would be nice to have the "proper" pixel explosions.
6. The real Asteroids has a dum-dum-dum backing noise like Space Invaders that gets faster the more Asteroids you destroy.

Anyway, those that can do, those that can't criticise, so despite my comments well done .

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

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 09:08am 01 Aug 2024
Copy link to clipboard 
Print this post

Hi Tom,

I have added your comments to the todo list. They are not addressed in this version yet.


rocks12bf.zip


Just some remarks:

1/ fixed in this release

2/ I have never played the game in my life, so if someone could "map" the 11 samples inside the RISsound.mod file to activities, I would welcome that.

3/ this game has 5 bullet slots. Assuming the ufo fires one shot, the player can have 4 bullets in game. And that is what is in the game description I read.

4/ Yes, I have noticed the same. The size is like 30% to big. But note that the player can aim in 5 degrees rotation angle. Making the size smaller, would force to rotate in smaller steps, making rotation slower. It is a balance. I'll look what I can do.

5/ The pixel explosions are in VegiPete's CMM2 game, and I have this on my todo list.  

6/ The "dum dum" sound is in the mod file as sample 1 and 2. Waits for implementing.

Volhout
Edited 2024-08-01 20:03 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 10:18am 01 Aug 2024
Copy link to clipboard 
Print this post

  thwill said  Hi @Volhout,

2. Why is there a strange "clown with a hooter" noise for the UFOs   ?

Anyway, those that can do, those that can't criticise, so despite my comments well done .

Tom

Hi Tom
I'm not sure where this MOD file came from. I already found samples of the Arvade version, let's see if I have time tonight and Volhout doesn't mind, I'll create an alternative MOD file using the new samples.  
@Volhout    good job

Cheers
Martin
Edited 2024-08-01 20:20 by Martin H.

Footnote added 2024-08-01 23:00 by Martin H.
Arcade not  Arvade  
'no comment
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 11:06am 01 Aug 2024
Copy link to clipboard 
Print this post

Hi Martin,

Appreciate your help !! Thanks in advance...

Volhout
PicomiteVGA PETSCII ROBOTS
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 02:21pm 01 Aug 2024
Copy link to clipboard 
Print this post

the Samples:
01.fire
02.saucerBig
03.saucerSmall
04.thrust
05.bangSmall
06.bangMedium
07.bangLarge
08.extraShip
09.beat1
10.beat2

sfx.zip
there are 2 Modfiles,the pure SFX, only contains the noises, so it doesn't do anything when starting.
The sfx_BG version plays this monotone hum sequence.
Say if you are still missing something, then I can go looking for it or import it from the original mod
Cheers
Martin
'no comment
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 03:35pm 01 Aug 2024
Copy link to clipboard 
Print this post

Hi Martin,

I'll pick this when I am back from holidays. The tent is not a good place for monitors and laptops...

Will be monitorin the thread on the phone though.

Volhout
PicomiteVGA PETSCII ROBOTS
 
     Page 5 of 7    
Print this page
© JAQ Software 2024