Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 04:37 28 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 : PICO PETSCII

     Page 12 of 38    
Author Message
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4247
Posted: 05:40pm 04 Oct 2023
Copy link to clipboard 
Print this post

  matherp said  Don't use the library. Use the new FLASH DISK LOAD. You will have to find the start of the first CSUBs data and add it to the addresses but it will then be version independent. MM.INFO(FLASH ADDRESS n) gives you the start address of the flash slot n
Create the data as now and save it as a library but then load it to the flash slot. Save it on the smallest version (WEB) if possible, else VGA


I will play with this, what is the size of a flash slot ? I currently use 91kbyte of 100.

Volhout
Edited 2023-10-05 03:41 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4247
Posted: 08:44pm 04 Oct 2023
Copy link to clipboard 
Print this post

Demo of the sprites and tiles made by Martin.

pet14.zip

Health is already coupled to the game database, the weapons and items t.b.d.
Search "x" and move "m" are indicated by text.

Playing with the MSDOS version of the game, I conclude there are 2 phases in search, and 2 phases in move (target phase, and execute phase) that are both driven from the cursor cluster.

This would result in the "WASD" cluster only being used to shoot....





Volhout
Edited 2023-10-05 06:48 by Volhout
PicomiteVGA PETSCII ROBOTS
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4043
Posted: 09:24pm 04 Oct 2023
Copy link to clipboard 
Print this post

Nice.

I think the best possibility for controlling this with the Game*Mites 8-button controller is for SELECT to cycle through a small number of control modes (indicated by an icon somewhere) with the current mode determining the behaviour of the direction buttons and A + B.

e.g. In the default "run & gun" mode the direction buttons move the player unless A is also pressed in which case they fire in the given direction. B would cycle through the player's weapons.

YMMV,

Tom
Edited 2023-10-05 08:07 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 396
Posted: 09:42pm 04 Oct 2023
Copy link to clipboard 
Print this post

Wow, this looks really impressive! Great work!

Greetings
Daniel
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1114
Posted: 03:04am 05 Oct 2023
Copy link to clipboard 
Print this post

  Volhout said  Demo of the sprites and tiles made by Martin.

pet14.zip

Health is already coupled to the game database, the weapons and items t.b.d.
Search "x" and move "m" are indicated by text.

Playing with the MSDOS version of the game, I conclude there are 2 phases in search, and 2 phases in move (target phase, and execute phase) that are both driven from the cursor cluster.

This would result in the "WASD" cluster only being used to shoot....





Volhout

Great, unfortunately I won't get around to trying it out until this evening or tomorrow.

>Demo of the sprites and tiles made by Martin.

I've tweaked the look of the sprites and tiles a bit here and there, but the general design is unfortunately not mine.
Sprites and Tiles were transferred by me from the PSP/Amiga ones to a PICO VGA-compatible 121 format and converted them to Mite compatible spr Format.  

By the way...did you notice that there are already search and move sprites?



SP053
24,1,24
000000000000000000000000
000000000000000000000000
000000000000000000000000
000000000000000000000000
000000777770000000000000
000007700077700000000000
000077000000770000000000
000770000070077000000000
000770000070077000000000
000770000000077000000000
000770000000077000000000
000077000000770000000000
000077000000770000000000
000007700077777000000000
000000777770007700000000
000000000000000770000000
000000000000000077000000
000000000000000007700000
000000000000000000770000
000000000000000000077000
000000000000000000000000
000000000000000000000000
000000000000000000000000
000000000000000000000000

SP054
24,1,24
000000000000000000000000
000000000000000000000000
000000000077000000000000
000000077077077000000000
000000077077077000000000
000000077077077077000000
000000077077077077000000
000000077077077077000000
000000077077077077000000
000007077077077077000000
000007077777777077000000
000007077777777777000000
000007077777777777000000
000007777777777770000000
000000777777777770000000
000000777777777770000000
000000777777777700000000
000000777777777700000000
000000077777777000000000
000000007777777000000000
000000007777777000000000
000000000000000000000000
000000000000000000000000
000000000000000000000000

SP055
24,1,24
000000000000000000000000
000000000000000000000000
000000000077000000000000
000000000700777000000000
000000077700700700000000
000000700700700777000000
000000700700700700700000
000000700700700700700000
000000700700700700700000
000007700700700700700000
000070700700700700700000
000070700000000700700000
000070700000000000700000
000070700000000000700000
000070000000000007000000
000077000000000007000000
000007000000000007000000
000007000000000070000000
000000700000000070000000
000000700000000700000000
000000070000000700000000
000000077777777700000000
000000000000000000000000
000000000000000000000000

Edited 2023-10-05 18:27 by Martin H.
'no comment
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4247
Posted: 12:59pm 05 Oct 2023
Copy link to clipboard 
Print this post

@Martin

Yes, I was aware

@Lizby (and other LCD users)

I will revoke changes in PET14.BAS. In PET14.bas I extensively use the L layer. And that is not needed with the new tileset from Martin. Newer versions will use the N layer for anything except player(*). This will simplify porting to LCD.

Volhout

(*)=the L layer was mainly used because of pixel scroll of the world map. The edges of the map on the N layer could hide UNDER the L-layer. Now we do tile scroll we can do everything in the N layer. I have a test version running where only the player is on the L layer. In the future also the robots will live in the L layer.

For the LCD version we could use actual sprites of the robots and player.
Maybe that is also an option for the VGA version, but I am currently not in the mood to convert everything back, I want to write the game engine first. It would save 38kbyte RAM though, but requires to re-do the library again, and use selected sprites (the pico only handles 31 sprites, and there are currently 83 designed by Martin. So we need som intelligence to use sprites carefully, loading on the fly.
Edited 2023-10-05 23:01 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1114
Posted: 01:35pm 05 Oct 2023
Copy link to clipboard 
Print this post

  Volhout said   I want to write the game engine first.

This is a good point.
We've seen that there are ways that the display engine can be optimized.
the priority, in my opinion, should be to complete the game engine little by little.
Verry good job so far.. @Volhout
When you wrote the post, did you expect how far this would develop in less than a month?
'no comment
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1114
Posted: 07:20pm 06 Oct 2023
Copy link to clipboard 
Print this post

How to Play the SFX in the Game

  Martin H. said  
IN GAME Sound FX

SFX.zip
Sounds in  one MOD File and as seperat WAVs


SFX Order in Mod File...

Sample 1 sounds_dsbarexp
Sample 2 sounds_dspistol
Sample 3 sound_beep
Sample 4 sound_beep2
Sample 5 sound_cycle_item
Sample 6 sound_cycle_weapon
Sample 7 sound_door_faster
Sample 8 sound_emp
Sample 9 sound_error
Sample 10 sound_found_item
Sample 11 sound_magnet2
Sample 12 sound_medkit
Sample 13 sound_move
Sample 14 sound_plasma_faster
Sample 15 sound_shock
Sample 16 sounds_dsbarexp

to play the Sounds, the SFX.MOD must be loaded
so load the MOD File first ..

play modfile "sfx.mod

which doesn't play anything because it has no playlist and no patterns, just samples.

then use the PLAY MODSAMPLE command.

PLAY MODSAMPLE 2, 1
plays thesound of the Pistol


PLAY MODSAMPLE 7, 1

Plays sample 7 (the door Sound) over channel 1
as long as nothing is played the Chanel number is not that important (valid is 1 to 4) but you can play the same sample on all Channels, to make it louder, or
play an different sound on the other chanels at the same Time.

So we can decide (or let the user choose) whether we want noise or music, both are not possible at the same time (at the moment).

However, I still have something to test: As far as I can remember use most of the INGAME MODs just  max 10 Samples, because a mod can contain up to 32 samples, there should be space to store the SFX Samples with in the Music Mods, and if we are lucky enough, we can reduce them to 3 Channels to keep one channel free for SFX...
But I have to investigate that first to be able to say whether that would be a possibility
Cheers
Martin
Edit: I looked with Protraker this morning, there are just 3 INGAME Mods,
The "Get Psyched", lose and Win mod are not used while Playing the game.
I have to shorten some of the Samples to stay in the 125k Modbuffer size, but I am optimistic. I Can try it tomorroe evening.
Edited 2023-10-07 21:04 by Martin H.
'no comment
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4247
Posted: 08:15pm 07 Oct 2023
Copy link to clipboard 
Print this post

A bit of gameplay added.

- With "z" you can search for hidden items ("z" is defined by PETSCII), these are shown in comment section, not yet added to inventory, no animation of the closed boxes yet.
- game loop indicator in top right corner, showing the time needed to do all the game play (in msec.).
- the game loop is processed every 150ms (variable: h_beat) to get more consistent reaction time.
- some optimization in the algorithms.

Enjoy...

Volhout
pet16.zip

P.S. for those who did not play the game on the MSDOS emulator yet: press "z" for search. Then the first arrow key press will determine the search direction (left/right/up/down). A magnifying glass with show where you are searching for items. The lander is a good place to start.
There is a technical challenge with the magnifying glass. You have the world map, on top of that the player, and the magnifying glass goes on top of that. Since there are not 3 layers, I alternate player and magnifying glass. This works, but is not very nice. We may need a player sprite with magnifying glass combined in one sprite.
Edited 2023-10-08 06:23 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1114
Posted: 06:51am 08 Oct 2023
Copy link to clipboard 
Print this post

  Volhout said  
There is a technical challenge with the magnifying glass. You have the world map, on top of that the player, and the magnifying glass goes on top of that. Since there are not 3 layers, I alternate player and magnifying glass. This works, but is not very nice. We may need a player sprite with magnifying glass combined in one sprite.

the magnifying glass should not be in the Players Tile-position,so they dont overlap.
But if it has to, for some reason
What if you use the magnifying glass and the "move-hand" as a regular Sprite, and use
SPRITE SHOW SAFE (Shows a sprite and automatically compensates for any other sprites that overlap it) to show the magnifying glass
and SPRITE HIDE SAFE (Removes sprite n from the display and replaces the stored background.) to make it disappear?
everything on Layer (L), so it just stores, whats under it, on the Layer
Edited 2023-10-08 16:59 by Martin H.
'no comment
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4043
Posted: 07:47am 08 Oct 2023
Copy link to clipboard 
Print this post

I don't understand why we are using more than 1 layer (F) plus the display (N) and why you need any "real" sprites.

Blit tile to x,y on F.
Blit player to x,y on F with appropriate transparent colour.
Blit magnifying glass to x,y on F with appropriate transparent colour.
(Blit all the other tiles and sprites)
Copy F to N
Repeat ad-nauseum

Best wishes,

Tom
Edited 2023-10-08 17:48 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1114
Posted: 08:32am 08 Oct 2023
Copy link to clipboard 
Print this post

  thwill said  I don't understand why we are using more than 1 layer (F) plus the display (N) and why you need any "real" sprites.

Tom

F is just used in the LCD Version, because access is significantly faster than serial communication with the display(n)
But lizby or Bleep can explain this better because they deal with the implementation on LCD

The VGA Version uses N and L, We agreed to get the game mechanics up and running first(This is mainly in the hands of Volhout), then we can see again, or in the case the memory is running out, whether we can do without the layer.
I'm currently working on making it possible to play background music and sound effects at the same time,for which I have to convert most of the MOD files.
If that is done, I look at the source code again.
Edited 2023-10-08 18:55 by Martin H.
'no comment
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4247
Posted: 10:40am 08 Oct 2023
Copy link to clipboard 
Print this post

Latest incarnation.

- found items are added to the inventory (press "i", "o" or "p" in this version.
- search opens boxes
- animation runs until player uses cursor cluster for search direction.

Next challenge is "move" mode....

pet17.zip


Volhout
PicomiteVGA PETSCII ROBOTS
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1114
Posted: 10:55am 08 Oct 2023
Copy link to clipboard 
Print this post

  Volhout said  
- found items are added to the inventory (press "i", "o" or "p" in this version.
- search opens boxes
- animation runs until player uses cursor cluster for search direction.
Next challenge is "move" mode....

Volhout

This is how it comes together piece by piece. Thank you.
I'll take a look at it later when I get home.
'no comment
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1114
Posted: 08:23am 09 Oct 2023
Copy link to clipboard 
Print this post

SUB Render Livemap
I've now found the right colors per Tile and optimised the sub from ~2 Seconds to 736 ms
(@CPUSPEED (KHz) 252000) to be merged to the Program  @Volhout






'test/Demo of the "renderLivemap" SUB
'read color values
Dim Col%(15):Restore colors:For f=1 To 15:Read Col%(f):Next f
'read Leveldata
Dim LV$(64) Length 128
Open "Data\level-a" For input As #1
'skip first 6 Lines of data
For f=0 To 5:LV$(f)=Input$(128,#1):Next
For f=0 To 63:LV$(f)=Input$(128,#1):Next
Close #1
MODE 2
'Call the Map Function
t=Timer
renderLiveMap
Print Timer -t
End

' -----------------------------------
' Level LiveMap Preview
' -----------------------------------
Sub renderLiveMap
 Local integer mx,my,mp,yy,CL(256)
 Local t$
 'Tile colors
    T$="00077777977770777770000A0000B0006740694B66EB60E777E722B724B66070"
 T$=T$+"0367000700770007770000700707077880000007776777077707770778888887"
 T$=T$+"7067700770000007700400000000000000000730073000000000000000000000"
 T$=T$+"0007700770898EEAAA233867772777677700A00AA0000000000000000000000"
 For mx=1 To 255:CL(mx)=col%(Val("&H"+Mid$(T$,mx,1))):Next
 For my = 0 To 64:mp=Peek(varaddr lv$(my)):yy=44+(my<<1)
   For mx = 1 To 128:Box 4+2*mx,yy,2,2,,CL(Peek(BYTE mp+mx)):Next
 Next
End Sub


colors:
'--Colorscheme accordung to Spritecolors
Data RGB(BLUE),RGB(GREEN),RGB(CYAN),RGB(RED)
Data RGB(MAGENTA),RGB(YELLOW),RGB(WHITE),RGB(MYRTLE)
Data RGB(COBALT) ,RGB(MIDGREEN),RGB(CERULEAN),RGB(RUST)
Data RGB(FUCHSIA),RGB(BROWN),RGB(LILAC)

Edit : now 649 ms
Cheers
Martin
Edited 2023-10-09 18:45 by Martin H.
'no comment
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9128
Posted: 08:55am 09 Oct 2023
Copy link to clipboard 
Print this post

When this is all working (VGA version) I'll send a complete PicoMiteVGA to the 8-bit man with the program loaded. I previously sent him the CMM2 which he reviewed so hopefully he will be interested in the Pico particularly if we can show Petscii robots working IN BASIC
 
Plasmamac

Guru

Joined: 31/01/2019
Location: Germany
Posts: 554
Posted: 09:05am 09 Oct 2023
Copy link to clipboard 
Print this post

Maybe it will become his Dreamcomputer 🥳
Plasma
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1114
Posted: 09:41am 09 Oct 2023
Copy link to clipboard 
Print this post

  Volhout said  Latest incarnation.

- found items are added to the inventory (press "i", "o" or "p" in this version.
- search opens boxes
- animation runs until player uses cursor cluster for search direction.

Next challenge is "move" mode....

pet17.zip


Volhout


Harm,
as I see you have now moved the "Layer.BMP" on the N layer. This gives us the possibility to use black as well, so it looks more similar to the original  .
If it stays that way, I'll changed the BMP for the "Layer" frame.





You still have the items and symbols for health with a black background?

layerb.zip
Fittingly, I was so brave and adjusted your Isting  

pet17f.zip
Edited 2023-10-09 21:28 by Martin H.
'no comment
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4247
Posted: 11:08am 09 Oct 2023
Copy link to clipboard 
Print this post

Should have those. That is how they are in the original artwork.zip.

Looking nice. You also ported the font.
Any chance you publish that version including the font. I will be away for few days, work... so go ahead and tune the codeto your liking. I will pick up where you left off. The only changes I have made are in the item handling. In case you want to port sound/music in this code: go ahead.

Volhout
Edited 2023-10-09 21:20 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1114
Posted: 11:30am 09 Oct 2023
Copy link to clipboard 
Print this post

  Volhout said  Should have those. That is how they are in the original artwork.zip.

Looking nice. You also ported the font.
Any chance you publish that version including the font. I will be away for few days, work... so go ahead and tune the codeto your liking. I will pick up where you left off. The only changes I have made are in the item handling. In case you want to port sound/music in this code: go ahead.

Volhout

just edited the last comment and uploaded a customized version of your listing

The SFX.MOD already includes all the required game sounds. I'm still in the process of adjusting the ingame music so that one channel always remains free for the SFX sounds.It is not always easy to decide what sound could be muted in order to keep the channel clear.
At the same time, I have to adjust some of the samples in the music so that they take up less memory to make it possible to put the SFX there.
Edited 2023-10-09 22:08 by Martin H.
'no comment
 
     Page 12 of 38    
Print this page
© JAQ Software 2024