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 1 of 38 | |||||
Author | Message | ||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4238 |
All, Have spend 1 evening in toying around with my idea's about a basic implementation of PETSCII ROBOTS on the picomite VGA. This is VERY inmature. Just a scrolling landscape dynamically created from a world map. No animations yet (opening doors, AI robots), just a player walking the map. Some tiles (sprites) are based on commodore PET artwork, some are plain trials using color (with mixed success...pink...auch!!). I will update the status in this thread. Volhout P.S. the "player" is pasted in since SAVE IMAGE will save the active layer only. And player and world map are in different layers. P.P.S. Thanks to Martin.H who's sprite editor (SPRED version 102) is very usefull. Edited 2023-09-14 21:51 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
That looks promising. I'm excited to see how it plays 'no comment |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4040 |
That is good progress. Whilst (as discussed elsewhere) I can't commit to collaboration I am very enthused about this project so please reach-out if there are stumbling blocks. If you can get it running but the performance isn't up to snuff then I think it worth sacrificing BASIC purity with some targeted CSUBs. Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9119 |
Harm Please try the attached PicoMiteVGA.zip It is completely untested but "should" merge the layer with the background when you SAVE IMAGE IFF 1./ You are currently writing to the main display (FRAMEBUFFER WRITE N) 2./ the layer is previously set up (FRAMEBUFFER LAYER) Edited 2023-09-14 22:59 by matherp |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
Nice look but, if you are allready use Sprites, how abut using them in Color .. Like a mix between the C128 and the Amiga Version.? You can find the Amiga source (As an inspiration for your own sprites) on GitHub 'no comment |
||||
Amnesie Guru Joined: 30/06/2020 Location: GermanyPosts: 396 |
WOW I am really impressed and curios, it looks great! Greetings Daniel |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4238 |
@peter, SAVE IMAGE "file.bmp" still gives the active layer only I am on FRAMEBUFFER WRITE N I have FRAMEBUFFER LAYER also tried: SAVE IMAGE IFF "file.bmp" gives "expected a string" error Volhout PicomiteVGA PETSCII ROBOTS |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4238 |
Hi Martin, I have taken the short route to getting some tiles. Create them myself from the youtube video on PETSCII ROBOTS part 1 and your character set. When the game is funrther ahead, me, or you, or any volunteer can create a marvelous tiles set.... Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9119 |
One more try PicoMiteVGA.zip |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4238 |
YES, that does it. Thanks ! PicomiteVGA PETSCII ROBOTS |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
The Tiles on Amiga and here, how the Tiles could look in the 16 Pico Colors... not so ugly at all Edited 2023-09-14 23:42 by Martin H. 'no comment |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4238 |
The pico has memory for roughly half the tiles the amiga has. But we may not need to since robots and player (and maybe explosions) are on a different layer. So I do not need a player on tarmac, a player on carpet, a player on grass etc... Layer "F" (the framebuffer) can hold 130 tiles (24x24). Volhout Edited 2023-09-14 23:47 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
Using the F layer cost you another 36k of Memory Maybe better buffer the Tiles on A: as it is much faster than the SD Card B:. If you now map the score and health display to a 64x240 area on the edge only on the layer, you can temporarily save 14 tiles you need on the N screen below without them becoming visible. --edit-- You can also consider halving the resolution and reducing the size of the tiles from 32x32 to 16x16 the Space under the Layer would last for 60 Tiles :-) Edited 2023-09-15 00:17 by Martin H. 'no comment |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4238 |
Hi Martin, I though about using the area under the score and health display. That could hold 20 tiles when it is larger than 48 x 240 (tiles are 24x24). And this area is for free. So.. When the game has 0...20 tiles all could find a place on N hiden behind the score and health on L 21...84 tiles, you could use SPRITES (up to 64 sprites) + tiles on layer N. This option uses 64k (each tile as a sprite consumes 1k). 85 tiles and more ... either load dynamically from A: or use Framebuffer F as storage. It will hold 13x10=130 tiles in 38k. That is pretty good actually. Together with N that would be 150 tiles. Maybe the tiles on layer N can be used for the "overlay" on L, and the F for the world map tiles on N. I like the framebuffer F use since it is simple. You provide a 38k BMP file, load that in 1 line of code, and have all the graphics you need for the tiles. The L layer could also be a 38k BMP you load (same as MAXITREK) with nice PETSCII graphics from the 8bit guy's artwork, with just a window that shows the scrolling world map.. All thoughts... Volhout Edited 2023-09-15 00:34 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9119 |
The tiles could be stored in program space as a pseudo CSUB and memory copied to the display. If the CSUB is in the library the memory usage is minimal MODE 2 a%=Peek(cfunaddr test) b%=MM.Info(writebuff) x%=10 'x coordinate for blit in 24x24 tiles y%=8 'y coordinate for blit in 24x24 tiles Box x% * 24 - 1, y% * 24 - 1 , 26 , 26 'create a box to test the blit y% = y% * 24 * MM.HRes \ 2 'scale the y coordinate by the number of bytes in a line x% = x% * 12 'scale the x coordinate by the number of bytes into the line Timer =0 For yy% = 0 To 23 'loop though the lines of the tile Memory copy a% + yy% * 12, b% + yy% * MM.HRes \ 2 + y% + x%, 12 Next Print Timer CSub test '24x24 sprite (should be saved in the library) 00000000 FFFFFFFF 88888888 44444444 22222222 66666666 88888888 CCCCCCCC FFFFFFFF 55555555 FFFFFFFF 88888888 44444444 22222222 66666666 88888888 CCCCCCCC FFFFFFFF 55555555 FFFFFFFF 88888888 44444444 22222222 66666666 88888888 CCCCCCCC FFFFFFFF 55555555 FFFFFFFF 88888888 44444444 22222222 66666666 88888888 CCCCCCCC FFFFFFFF 55555555 FFFFFFFF 88888888 44444444 22222222 66666666 88888888 CCCCCCCC FFFFFFFF 55555555 FFFFFFFF 88888888 44444444 22222222 66666666 88888888 CCCCCCCC FFFFFFFF 55555555 FFFFFFFF 88888888 44444444 22222222 66666666 88888888 CCCCCCCC FFFFFFFF 55555555 FFFFFFFF 88888888 44444444 22222222 66666666 88888888 CCCCCCCC FFFFFFFF 55555555 End CSub Edited 2023-09-15 00:40 by matherp |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4238 |
Nice idea, Above sprite would be 288 bytes. 16k library would hold 55 sprites. It is an option to keep in mind. Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9119 |
It's also fast. 1mSec at 378MHz and that is without any optimisation. The library on the PicoMite takes a full program slot and doesn't impact the rest of the program so there is basically no realistic limit on number of sprites Here is an optimised version MODE 2 a%=Peek(cfunaddr test) b%=MM.Info(writebuff) x%=10 'x coordinate for blit in 24x24 tiles y%=8 'y coordinate for blit in 24x24 tiles Box x%*24-1,y%*24-1,26,26 y%=y%*24*MM.HRes\2 x%=x%*12 w%=MM.HRes\2 Timer =0 Inc b%, x%+y% For yy%=0 To 23 Memory copy a%, b%,12 Inc b%,w% Inc a%,12 Next Print Timer Edited 2023-09-15 00:49 by matherp |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9119 |
Final contribution a subroutine that can plot any sprite in any tile MODE 2 Do plot Rnd*3,Rnd*14,Rnd*10 Loop ' Sub plot(s%, xin%, yin%) Static w%=MM.HRes\2 Static c%=Peek(cfunaddr test) Local y%=yin% * 24 * w% Local x%=xin%*12 Local b%=MM.Info(writebuff)+x%+y% Local a%=c%+s%*288 For yy%=0 To 23 Memory copy a%, b%,12 Inc b%,w% Inc a%,12 Next End Sub ' CSub test '24x24 sprite (should be saved in the library) 00000000 'sprite 0 FFFFFFFF 88888888 44444444 22222222 66666666 88888888 CCCCCCCC FFFFFFFF 55555555 FFFFFFFF 88888888 44444444 22222222 66666666 88888888 CCCCCCCC FFFFFFFF 55555555 FFFFFFFF 88888888 44444444 22222222 66666666 88888888 CCCCCCCC FFFFFFFF 55555555 FFFFFFFF 88888888 44444444 22222222 66666666 88888888 CCCCCCCC FFFFFFFF 55555555 FFFFFFFF 88888888 44444444 22222222 66666666 88888888 CCCCCCCC FFFFFFFF 55555555 FFFFFFFF 88888888 44444444 22222222 66666666 88888888 CCCCCCCC FFFFFFFF 55555555 FFFFFFFF 88888888 44444444 22222222 66666666 88888888 CCCCCCCC FFFFFFFF 55555555 FFFFFFFF 88888888 44444444 22222222 66666666 88888888 CCCCCCCC FFFFFFFF 55555555 'sprite 1 FFFFFFFF 88888888 44444444 FFFFFFFF 88888888 44444444 FFFFFFFF 88888888 44444444 FFFFFFFF 88888888 44444444 FFFFFFFF 88888888 44444444 FFFFFFFF 88888888 44444444 FFFFFFFF 88888888 44444444 FFFFFFFF 88888888 44444444 FFFFFFFF 88888888 44444444 FFFFFFFF 88888888 44444444 FFFFFFFF 88888888 44444444 FFFFFFFF 88888888 44444444 FFFFFFFF 88888888 44444444 FFFFFFFF 88888888 44444444 FFFFFFFF 88888888 44444444 FFFFFFFF 88888888 44444444 FFFFFFFF 88888888 44444444 FFFFFFFF 88888888 44444444 FFFFFFFF 88888888 44444444 FFFFFFFF 88888888 44444444 FFFFFFFF 88888888 44444444 FFFFFFFF 88888888 44444444 FFFFFFFF 88888888 44444444 FFFFFFFF 88888888 44444444 'sprite 2 CCCCCCCC FFFFFFFF 55555555 CCCCCCCC FFFFFFFF 55555555 CCCCCCCC FFFFFFFF 55555555 CCCCCCCC FFFFFFFF 55555555 CCCCCCCC FFFFFFFF 55555555 CCCCCCCC FFFFFFFF 55555555 CCCCCCCC FFFFFFFF 55555555 CCCCCCCC FFFFFFFF 55555555 CCCCCCCC FFFFFFFF 55555555 CCCCCCCC FFFFFFFF 55555555 CCCCCCCC FFFFFFFF 55555555 CCCCCCCC FFFFFFFF 55555555 CCCCCCCC FFFFFFFF 55555555 CCCCCCCC FFFFFFFF 55555555 CCCCCCCC FFFFFFFF 55555555 CCCCCCCC FFFFFFFF 55555555 CCCCCCCC FFFFFFFF 55555555 CCCCCCCC FFFFFFFF 55555555 CCCCCCCC FFFFFFFF 55555555 CCCCCCCC FFFFFFFF 55555555 CCCCCCCC FFFFFFFF 55555555 CCCCCCCC FFFFFFFF 55555555 CCCCCCCC FFFFFFFF 55555555 CCCCCCCC FFFFFFFF 55555555 End CSub |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
On the Amiga, the Playfeeld is just 266x168 (AmigaScreen is 320x200) So, I repainted the Mask for the Layer and reduced the Tilesize to 24x24 PicoTiles.zip Edited 2023-09-15 01:33 by Martin H. 'no comment |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
wow, that's great 'no comment |
||||
Page 1 of 38 |
Print this page |