Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 01:51 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 4 of 7    
Author Message
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 12:08pm 26 Jul 2024
Copy link to clipboard 
Print this post

  Volhout said  Wauw ! That is fast.... 64 characters is fine.

However.. there is a drawback to your font. It is 8x8 pixels. To match it in the game it should be 16 or 20 pixels high.
But when you use the scale in the TEXT command, it also double the line width, making it very different from the "vector" style in the game.

See these screenshots (not very clear, but they did for me). I guess the font should be something like 20x12 or 16x10. Note also the somewhat strange "G".

as.zip

Volhout


I have enlarged the font and adapted it to your template as best I could, including the “G”


' asteroids16
' Font type    : Full (64 Characters)
' Font size    : 16x16 pixels
' Memory usage : 2048
DefineFont #10
40201010
0000000000000000000000000000000000000000000000000000000000000000
0002000200020002000200020002000200020002000000000002000200000000
2008200820082008401040100000000000000000000000000000000000000000
00000000100810081008FC3F1008100810081008FC3F10081008100800000000
800080008008FC0780108010F007800808010801F03F00010003000300000000
0030003030CC30CCC030C03000030003300C300CCC30CC303000300000000000
000F000FC030C030003000300C0F0C0FCC30CC3030303030CC0FCC0F00000000
C000C000C000C000000300030000000000000000000000000000000000000000
C000C00000030003000C000C000C000C000C000C00030003C000C00000000000
000C000C00030003C000C000C000C000C000C00000030003000C000C00000000
000000000003000330333033C00FC00F30333033000300030000000000000000
000000000003000300030003F03FF03F00030003000300030000000000000000
00000000000000000000000000000000000000000003000300030003000C000C
000000000000000000000000F03FF03F00000000000000000000000000000000
0000000000000000000000000000000000000000000300030003000300000000
0C000C0030003000C000C00000030003000C000C0030003000C000C000000000
0420FC3F0420042004200420042004200420042004200420FC3F042000000000
8000800080008000800080008000800080008000800080008000800000000000
0400FC3F04000400040004000020FC3F0020002000200020FC3F002000000000
0400FC3F04000400040004000400FC3F0400040004000400FC3F040000000000
0420042004200420042004200400FC3F04000400040004000400040000000000
0020FC3F00200020002000200400FC3F0400040004000400FC3F040000000000
0020002000200020002000200420FC3F0420042004200420FC3F042000000000
0400FC3F04000400040004000400040004000400040004000400040000000000
0420FC3F0420042004200420FC3F04200420042004200420FC3F042000000000
0420FC3F0420042004200420FC3F042004000400040004000400040000000000
0000000000030003000300030000000000000000000300030003000300000000
00000000000300030003000300000000000000000003000300030003000C000C
00000000F000F000000F000F00300030000F000FF000F0000000000000000000
0000000000000000FC3FFC3F00000000FC3FFC3F000000000000000000000000
00000000000F000FF000F0000C000C00F000F000000F000F0000000000000000
F00FF00F0C300C300C000C00F000F00000030003000000000003000300000000
F00FF00F0C300C30CCC3CCC3CCCCCCCCF0C3F0C300300030F00FF00F00000000
400180001004200204100808041004100410FC1F041004100410041000000000
1020E03F04200820082004201020F03F0420082008200420E03F102000000000
0020FC3F0020002000200020002000200020002000200020FC3F002000000000
4020803F1020202004200820042004200820042020201020C03F402000000000
0020FC3F00200020002000200020F03F0020002000200020FC3F002000000000
0020FC3F00200020002000200020F03F00200020002000200020002000000000
0420FC3F04200420002000200020002004207C2004200420FC3F042000000000
0420042004200420042004200420FC3F04200420042004200420042000000000
0001F83F0001000100010001000100010001000100010001F83F000100000000
100010001000100010001000100010001000100010101020F007100800000000
8020402000220021002800240028003000220024802000212020402000000000
002000200020002000200020002000200020002000200020F03F002000000000
0C30042024241428842144220420042004200420042004200420042000000000
043004200424042804210422442084201420242004200C200420042000000000
0420FC3F0420042004200420042004200420042004200420FC3F042000000000
0420FC3F04200420042004200020FC3F00200020002000200020002000000000
1020F03F102010201020102010201020102110224020A020103FA02000000000
0420FC3F04200420042004200021FC3F40208020102020200420082000000000
0020FC3F00200020002000200400FC3F0400040004000400FC3F040000000000
0001F83F00010001000100010001000100010001000100010001000100000000
102010201020102010201020102010201020102010201020F03F102000000000
081004201008100820081008200420042004200440024002C003400200000000
04200420042004200420042004200420442284211428242404200C3000000000
0840048020101020800440080003000340088004102020100480084000000000
1010082040042008000180020001000100010001000100010001000100000000
0400FC3F1000080040002000000180000004000200100008FC3F002000000000
C00FC00F000C000C000C000C000C000C000C000C000C000CC00FC00F00000000
00C000C000300030000C000C00030003C000C000300030000C000C0000000000
C00FC00FC000C000C000C000C000C000C000C000C000C000C00FC00F00000000
00030003C00CC00CC00CC00C3030303000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000FFFFFFFF
End DefineFont


Maybe you can use both (9 and 10)because some of the pictures you posted also show smaller numbers for the High Score

btw: Would you mind to insert a
box0,0,640,480,,0
before the Framebuffer copy?
This avoids the painting artifacts of the rocks that are drawn beyond the edge of the screen
Edited 2024-07-26 23:02 by Martin H.
'no comment
 
Volhout
Guru

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

Hi Martin,

This is with just #10 implemented, showing a score when you hit a asteroid.
This is just a quick test, 10 points per hit. Not even sure if that is actually so.

rocks6.zip

Volhout
PicomiteVGA PETSCII ROBOTS
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 01:22pm 26 Jul 2024
Copy link to clipboard 
Print this post

Looks like a Game    
'no comment
 
stanleyella

Guru

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

It's looking good. I can't find playmod sample in the manual only playmod file.
RISsound is with rocks6 but I missed the playmod sample files
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 07:21pm 26 Jul 2024
Copy link to clipboard 
Print this post

  stanleyella said  It's looking good. I can't find playmod sample in the manual only playmod file.
RISsound is with rocks6 but I missed the playmod sample files

Page 90  :
  Quote  
PLAY MODSAMPLE
Samplenum, channel [,volume]
Plays a specific sample in the mod file on the channel specified. The
volume is optional and can be between 0 and 64. This command can only be
used when there is a mod file already playing and allows sound effects to be
output whilst the background music is still playing.


In this game a MOD file is used which does not contain any music data, it only serves as a container for the soundFX. The advantage is that these do not have to be reloaded every time, as with Play Wav, and you can play up to 4 channels simultaneously. So a sound does not interrupt the sound that is currently being played if it uses a different channel
Edited 2024-07-27 05:25 by Martin H.
'no comment
 
Hans

Senior Member

Joined: 18/10/2022
Location: Canada
Posts: 116
Posted: 02:04am 28 Jul 2024
Copy link to clipboard 
Print this post

Hi All;

The game plays well but I had to rem out all the play modfile lines.

Runing PicoMiteVGA 5.09.00RC5.

The first time I ran the game it received an error on line 69.

[69] Play modfile "RISsound.mod"
Error : Mod playback not enabled

I am using the VGA board from Land-boards.com PIPicoMite03.

Does this require a special OPTION setup or hardware? The audio is on gp6,gp7 and playing a tone works.

What am I missing?

Hans...
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 03:34am 28 Jul 2024
Copy link to clipboard 
Print this post

   The manual said  OPTION MODBUFF
ENABLE/DISABLE [sizeinK]  Creates or removes an area of flash memory used for loading an playing
.MOD files. If enabled then a mod buffer is created with a size of
128Kbytes. This can be overridden with “sizeinK”.
The default is that no mod buffer is available


Edit.
Taking such a big chunk of flash might affect flash slots or A: .
To be safe backup everything.
Edited 2024-07-28 13:40 by phil99
 
Hans

Senior Member

Joined: 18/10/2022
Location: Canada
Posts: 116
Posted: 03:53am 28 Jul 2024
Copy link to clipboard 
Print this post

Thanks for that phil99

The only reference to this is in the option definations.

In the next manual I would suggest putting a small one or 2 liner about this before using the play modfile command.

Again thanks,

Hans...
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 213
Posted: 02:20pm 28 Jul 2024
Copy link to clipboard 
Print this post

Added control from the NES controller to the game, and the game runs much faster on it.
(Your NES controller ports can be configured with constants in the program)

Replaced the graphics and the game suddenly acquired a modern meaning, it is no longer rocks in space, but tanks on the battlefield and you can destroy it and ram it with a drone! ;)
Would it be necessary to think through the design of such a game to the end in detail?

2024-07-28_Rocks.zip
 
Volhout
Guru

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

Hi Javavi

I'll try your version later, when I have my NES controller.
Looks promising...

Meanwhile I have not made much progress. I am fighting something I don't understand yet.
The loop time is depending on then number of rocks. So when you shoot the big ones, you get many more smaller ones. But these smaller ones are exponentially more difficult to hit. Not only because they are smaller, but it feels also as if the shots are further appart on screen (looks like it).
I am not sure if my eyes deceive me, but the shots further appart is strange. The LCD screen runs 60Hz (16ms) and thus is far faster than the loop time. Each loop time should be shown. At the fastest (18ms) and slowest (80ms). But why are the bullets further appart ? They move "bspd=4" pixels per loop.

So I am puzzled....

Anyway, here you get the version with progressive more difficult levels. My high score is 13860 (so when I implement the correct game mechanisms, I would get a new ship at 10000).


rocks7.zip


Volhout
Edited 2024-07-29 06:39 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Martin H.

Guru

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

  javavi said  
Your NES controller ports can be configured with constants in the program


For Pico Game Board NES on port A

The Values in Line 19-21 are
Const NES_A_CLOCK = MM.Info(PinNo GP3)
Const NES_A_LATCH = MM.Info(PinNo GP2)
Const NES_A_DATA  = MM.Info(PinNo GP1)
'no comment
 
Volhout
Guru

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

Javavi,

Yes! The game works much better with a NES controller (or other changes you made) I will anlyze your version, and combine it with my features.
I do think the asteroids looks are refreshing new, bt not close to the original...
I may leave them as an option to choose from....

Thank you

Volhout

P.S. I just found the official game rules/limits/score system and will start to implement that first. The major benefit is that the official game only allows for 26 asteroids simultaneous on screen, of 3 sizes (now 6). That helps. When the screen is cluttered with 50 small asteroids (the current limit), the loop gets slow. 26 asteroids allows for more bullets on screen (the loop delay is partially due to check each bullet against each asteroid for a hit).
Edited 2024-07-29 20:09 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

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

Martin, others,

For what is implemented, is adapted to the official rules.
Max 4 bullets, max 26 rocks, score 20,50,100.

Javavi's NES controller changes implemented, but GPx pins for PicoGameVGA board from Mixtel90/thwill. Use controller port A for NES controller.

There is a whole list of things to do, from small changes to large:
- limit max speed ship
- stabilize the loop speed (sometimes too fast now)
- create small and large saucer, and make them fire (large at random, small aimed).
- Show level
- Start and end text

I think the saucers are the most essential, I'll work on these first.

Javavi, sorry forgot to copy your artwork for the asteroids. I will in next revisions.

Volhout

rocks8.zip
Edited 2024-07-29 21:42 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 01:07pm 29 Jul 2024
Copy link to clipboard 
Print this post


Runs with NES Controller on PicoGameVGA board
changed line 238


   Box 0,0,640,480,,0:Text 0,0,Str$(score,6,0)

This avoids the artifacts of the stones that are drawn beyond the edge of the screen.
cheers
Martin
Edited 2024-07-29 23:11 by Martin H.
'no comment
 
Volhout
Guru

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

Hi Martin,

Thanks, will add to the game.

Did you (or anyone else) ever play the arcade version ? Stan ?

In Wikipedia it says that shots do NOT wrap around the screen edges. That is what I implemented. And they talk about a fix from Atari to stop an exploit, and made Atari update the ROM's.

In my detailed game description (not Wikipedia) they say the shots do wrap around the game field edges, and they actually promote using that feature to get high scores, into the millions. That may be the "exploit" that Atari fixed by sending new ROM's.

So I am not sure what to implement ....

Volhout
Edited 2024-07-29 23:32 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 01:38pm 29 Jul 2024
Copy link to clipboard 
Print this post

  Volhout said  Hi Martin,

Thanks, will add to the game.

Did you (or anyone else) ever play the arcade version ? Stan ?

In Wikipedia it says that shots do NOT wrap around the screen edges. That is what I implemented. And they talk about a fix from Atari to stop an exploit, and made Atari update the ROM's.


Well I played it those days  and the Emulated Mame Version.
As far as I remember, the shots wraped auround the edges.
You can try it here online
Looks like they used the original roms
'no comment
 
stanleyella

Guru

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

The missiles did wrap around. Position your ship at the bottom/right and when only a few rocks remaining shoot the saucer using the wrap around.. lots of points and bonus ships :)
There was another x/y vector graphics game called "Tempest" only it was colour.
 
Volhout
Guru

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

Thank you all for your help.
I will implement shots wrap around in the next revision of the game.
This revision does not have them yet.
But it will change the game significantly. Now you fire a salvo, but when bullets/missiles travel long time (wrap around) you must focus more on single shots. On the other hand, many will hit something in the end....

This version has the basics of UFO's.
Not tuned (so they may be too easy) and the small UFO does not aim its fire yet.
the speed at which they move may also be too slow (easy prey).
But it is becoming more and more a game..... fun to play...

rocks9.zip

Volhout

P.S. this version is so easy to play you can easy get over 10000 points in one level.
Just shoot small saucers. Leave the 4 big rocks as they are. They are almost harmless...
Edited 2024-07-30 05:30 by Volhout
PicomiteVGA PETSCII ROBOTS
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 08:02pm 29 Jul 2024
Copy link to clipboard 
Print this post

The saucers shot missiles :(
the ship missiles went about half the vertical screen height.
it had the same bass as space invaders that got faster as more rocks shot.
the original game play was the ship moved and rotated fast.
does using a usb keyboard slow the game. would a i2c port expander be faster?
 
Hans

Senior Member

Joined: 18/10/2022
Location: Canada
Posts: 116
Posted: 08:25pm 29 Jul 2024
Copy link to clipboard 
Print this post

@Volhout

Could you please add a question (or some fancy coding) to bypass the Nes controller for KB use only, if no controller.

When I ran rocks9, for the 1st time, it was very challenging to control the rocket as it increased to warp speed on it's own and shoot by itself.

Thanks so much for the game it is lots of fun!

Hans ...  

PS: I coded my own bypass to the controller, but I am sure your coding would be more elegant.
 
     Page 4 of 7    
Print this page
© JAQ Software 2024