Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:22 26 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 : PicoMiteVGA Alien Syndrome

     Page 1 of 3    
Author Message
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 10:48am 15 Jan 2024
Copy link to clipboard 
Print this post

Hi
it had become a bit quiet from my side the last few weeks. But that doesn't mean I've been idle.  I'm still pursuing the idea of building an "Alien Syndrome" or Commando-like game for the Pico.
Since the sprites and tiles are not available on Github, this means that I have to draw everything from scratch.
Painting the whole thing from videos and screenshots is a very time-consuming task. Here is my worksheet of the last few days:


and a little Scroling Demo and Test of the Player-Animation
demo.zip

The next task is to draw more tiles and create the level maps based on pictures.
So it may well be that I need support at some points

Cheers
 Martin
Edited 2024-01-15 20:56 by Martin H.
'no comment
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4233
Posted: 11:27am 15 Jan 2024
Copy link to clipboard 
Print this post

Hi Martin,

Always willing to support...!!

Did you find a "world map" somewhere ? I think the PETSCII ROBOTS gameplay is for a large part defined in the world map and it's associated tile atrtributes.

If that is available, we can re-use part of the PETSCII code, or at least use way it is implemented.

Volhout

P.S. When I have found the FLAPPY BIRD sfx in MOD format, can I ask you to combine them with the sound track ? The sound track is a 87k mod file. But I currently have the 3 SFX's that are not in MOD format, but in MP3 or in WAV.
PicomiteVGA PETSCII ROBOTS
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 11:43am 15 Jan 2024
Copy link to clipboard 
Print this post

  Volhout said  
Did you find a "world map" somewhere ?

I found the Maps for the Levels but just as Pictures, so I have to draw the Tiles and then create the map files with a text editor based on the placing in the image.
like this Map1: (looks like the NES Version)


I think it could be a good way to use Excel for this Job using a Table with this Picture as Background.

For your Flappy Birds, it doesn't matter if you only got mp3 for the SFX. I can convert them to 8Bit Mono 16kHz Waves and Add them to the MOD (as ususal).
Cheers,
Martin
Edited 2024-01-15 21:46 by Martin H.
'no comment
 
Martin H.

Guru

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

WIP...
After pixelpainting most of the Map1 Tiles, I think I finaly found a usual Tile Map Editor
Tiled, a flexible 2D level editor for games.
Two advantages that I have discovered so far, 1. you can change the tile template with a painting program, then it changes automatically in the tile, so you don't have to reload it in the Mapeditor.
2. The map can be saved as a CSV file, which can later be easily converted into a PetRobot like format



Have a nice Sunday
Martin
Edited 2024-01-22 00:08 by Martin H.
'no comment
 
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 479
Posted: 03:56pm 21 Jan 2024
Copy link to clipboard 
Print this post

Hey Martin,

Tiled is the software I'm using to create the Knightmare maps as well. I wrote a small JS script (I have a python version as well) to convert the JSON to binary map-converter.js

How is the petrobot map format? I'm curious to know how the map data is stored
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 05:20pm 21 Jan 2024
Copy link to clipboard 
Print this post

Hi Leo,
the Mapdata in Petscii Robots is stored binary, so could have a max of 256 different Tiles
but you need just 1 Byte per Tile in the Map. We loaded the required map into a String array.
As we used the Tilesheet in the same order from the maps as published on Github. Every Byte in the Map could be direct used as the tile/sprite Index which point to the adress, they stored in Flash memory as a CSUB. Peter (matherp) posted a little Program, which translated every *.spr File in a Folder to one CSUB. Harm (Volhout) was responsible to write them to flash, better ask him how he made it
Using the new Sprite Memory Command was/is the fastest way to draw them from Memory to screen.
Fast enough to redraw the Background every "Frame".
The method of redrawing the background for each Frame instead of just scrolling allowed me to create the animated tiles simply by changing the index addresses (let them point to the next animation state).

I hope this explains more than it confuses

Cheers
 Martin
Edited 2024-01-22 03:51 by Martin H.
'no comment
 
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 479
Posted: 07:11pm 21 Jan 2024
Copy link to clipboard 
Print this post

Thank you Martin

I also use 1 byte per tile but with 1 bit for solid objects. The second byte is for power-ups, objects, enemies, etc. Something like this:


   /**
    * 2 Bytes per tile
    * 0000 0000 0000 0000
    * |  |      ||-------> 7 bits: Tile Id
    * |  |      |--------> 1 bit : Solid bit
    * |  |---------------> 5 bits: Objects, enemies, power-ups
    * |------------------> 3 bits: Object properties
    */


Where does the game store enemies and items position?
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 396
Posted: 07:59pm 21 Jan 2024
Copy link to clipboard 
Print this post

Commando-like game sounds really interesting! :) Cool demo!

Greetings
Daniel
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 07:42am 22 Jan 2024
Copy link to clipboard 
Print this post

  LeoNicolas said  Thank you Martin

I also use 1 byte per tile but with 1 bit for solid objects. The second byte is for power-ups, objects, enemies, etc. Something like this:


   /**
    * 2 Bytes per tile
    * 0000 0000 0000 0000
    * |  |      ||-------> 7 bits: Tile Id
    * |  |      |--------> 1 bit : Solid bit
    * |  |---------------> 5 bits: Objects, enemies, power-ups
    * |------------------> 3 bits: Object properties
    */


Where does the game store enemies and items position?

There was about a KB of data at the start of each Map, which stored that information. It was mainly Volhouts work to figure that out. We wanted to use the map files as they were available on Github, written by David Murray(The 8-Bit Guy).
  Quote  Martin,

I downloaded the user manual for the game. It shows (some of the) the maps.
Maps are 128 x 64 tiles (8kb when 1 byte per cell).

To make life easier, I suggest

The tiles (you are converting) should be grouped in 2 groups
1/ static tiles (floor/walls/grass/water/etc), there should be 127 of these maximum
2/ dynamic tiles (explosions, movements (opening doors), player, robots, etc..)

On the world map any number < 128 will directly translate into a tile
Any number > 128 will be an AI unit. The AI unit has a attribute list. In this list is the related tile number(s) depending on it's state. The AI tile can be any tile 0...255).

Volhout


Here is a proposal from the Tile table which I made for the Game

Edited 2024-01-22 17:57 by Martin H.
'no comment
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 07:27pm 31 Jan 2024
Copy link to clipboard 
Print this post

Here again a "sign of life"



After I cut a march through video of the arcade version into single frames to get the MAP and the graphics. I'm about to create the tileset for MAP2 in RGB121 for the Pico.
You wouldn't believe how much time you can spend pushing pixels until you get a usable result
'no comment
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 396
Posted: 07:37pm 31 Jan 2024
Copy link to clipboard 
Print this post

Like always, I am really impressed by your artwork and eye for detail!

Greetings
Daniel
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 04:31pm 10 Feb 2024
Copy link to clipboard 
Print this post

WIP
I managed to get 2 Level Maps ready and wrote a little MMB4W Program, which converts the TileEd exported CSV Files into Binary Map Files.
So here is another early proof of concept of the game mechanics.
Just a Demo, Interaction with the game is not yet available

AS02.zip





you can switch between the Levels by Changing the 1st Line

Dim integer level=1  
to
Dim integer level=2

The tiles are currently stored in the framebuffer, as I have not yet converted them to CSUB and Lib File. In my opinion there are still changes and extensions necessary, which I still have to draw.

Next steps
1. extend the scroll routine for diagonal movements
2. save the tile attributes in units
3. drawing the enemies/aliens and hostages
4. drawing the tiles for further levels and maps

Have a nice weekend
Cheers
 Martin
Edited 2024-02-11 02:44 by Martin H.
'no comment
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 02:35pm 12 Feb 2024
Copy link to clipboard 
Print this post

I have converted a complete [full walkthrough] video with Virtual Dub into individual images. Based on the images, I am in the process of creating the map for level 3  


Edited 2024-02-13 00:37 by Martin H.
'no comment
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4233
Posted: 03:17pm 12 Feb 2024
Copy link to clipboard 
Print this post

Hi Martin,

Played a bit with your AS02 version. I am not completely happy with the background scolling. On my monitor it is not fluent, and I see artefacts. But I see you played with framebuffer write and commented them out (*). So I guess this is the best you can do.
You made provisions for diagonal scrolling.

Am I right to understand that you scroll the background with SPRITE SCROLL and (behind the black frame) add next row of tiles ?
As far as I can tell you are doing this every scroll (4 pixels). But it is only needed every border frame width (border frame width = tile width?). Correct ? An dthe you past a whole row (or column) from the world map.

Impressing graphics. Look better than the PETSCII graphics.

Regards,

Volhout

EDIT: OOPS, now I understand. You use FRAMEBUFFER F to store all the sprites in absence of a LIBRARY or FLASH binary.
Edited 2024-02-13 01:23 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 03:35pm 12 Feb 2024
Copy link to clipboard 
Print this post

  Volhout said  Hi Martin,
Am I right to understand that you scroll the background with SPRITE SCROLL and (behind the black frame) add next row of tiles ?
As far as I can tell you are doing this every scroll (4 pixels). But it is only needed every border frame width (border frame width = tile width?). Correct ? An dthe you past a whole row (or column) from the world map.

Impressing graphics. Look better than the PETSCII graphics.

Regards,

Volhout

no I only redraw the row/column once every 16 pixels, but at the moment I'm using the framebuffer to store the tiles...
When the tiles are ready, I will change it to SPRITE MEMORY, which is even faster, just because it needs less parameters.
I will probably have to load a separate tileset for each level, as the backgrounds of the levels are very different.
Eventually I will also draw the background completely new every time, like in Petscii Robots. This would also make it easier for me to use animated tiles. That depends on how smoothly the game runs later.
If it's really not fast enough, I can still implement it like on the SEGA MAster System. Here the player always moves to the edge and then the screen freeses and scrolls.  Not quite as nice, but it would definitely work. It's also very easy to see that the enemies only "live" in the player's visible area. If it scrolls out of the screen and you go back, the alien has disappeared.  This also makes programming easier, as you only have to worry about the enemies on the screen.
Edited 2024-02-13 01:39 by Martin H.
'no comment
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4233
Posted: 03:47pm 12 Feb 2024
Copy link to clipboard 
Print this post

Hi Leo, Martin,

I think many of the questions are answered in the documents about graphics I released.

As Martin explained:

In PETSCII there are up to 256 different tiles (24x24) and each tile has 8 attribute bits.
The attribute bits are in a separate file "tileset.amiga" that is stored in the "data" folder, together with the maps.

The maps contain:
1/ Unit attributes (units can be robots, but also doors and hidden items, where they are on the map at program start)
2/ Destruct paths. This appears to be data that determines how bombs explode. But this is not used in our version of PETSCII, nor is it used in the source we found on github.
3/ Map data (what tile to use at what location). Together with the "tileset.amiga" this determines where you can walk, what you can shoot, where you can see through.

In the map file there are also 256 unused bytes (blank), so it is entirely possible that the data "tilset.amiga" once existed inside the map file. But that is was removed for flexibility reasons (adapt attributes is easier than generating new map files at every change).

UNITS are linked to sprites (in case robots and player) in one of the attributes. In PETSCII I dynamically change the attribute to make the units (player) walk. In the later versions the attribute of robots is not changing unless they die. It was almost not visible and since we did not pixel scroll, completely unimportant.

Volhout
Edited 2024-02-13 05:33 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4233
Posted: 08:06pm 12 Feb 2024
Copy link to clipboard 
Print this post

@Martin,

There is not much I can see to improve. The only thing is that at diagonal walking you redraw all tiles in the viewport. In horizontal and vertical you only redraw the needed tiles.

EDIT: after seeing the Sega video

I do have worries however. I saw the video from the game and there are many enemies possible inside the view window. (EDIT: maximum 4, all the same sprites, there are never 2 different (active) enemy types in viewport) With a 30ms screen update rate it is going to be a challenge. And I assume these also would move with 4 pixel steps, possibly every 30ms.

In PETSCII 70% of the loop time (around 60ms) is consumed in 'non graphics' gameplay. We have to bring that back to 20ms to make it work in AS with this frame rate.
Currently you have all graphics in F, that is RAM. Flash is also fast, but not as fast. So we may take a little hit there.

In PETSCII the unit attributes are scanned often to determine where the robots go. But these bots move every 2-4 loops (200-400ms) one tile. With 4 pixel movements that should be brought back to 50ms (essential either 30ms or 60ms).

Are there doors (EDIT: NO animated doors, only exits), and (hidden) items (EDIT:YES) in this game ? Can you move interior pieces (EDIT: NO)? Are enemies deterministic, or random moving ? Looking for things to gain time.

And even more important. Is the 4 pixel scroll just for smooth movement, and does the main game cycle work in 4x30=120ms loops ? Does the player stop an act/shoot at 30ms, or only at grid locations (EDIT:YES, firing is at any location and 8 directions, although the SEGA system stops player movement (background scroll) when shooting). That helps in building the gameplay. It is either walk, or shoot.

Volhout

P.S. I noticed the SEGA game has no animations. The only things that move are aliens and player (and explosions). That helps...
Edited 2024-02-13 06:46 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 09:03pm 12 Feb 2024
Copy link to clipboard 
Print this post

Hi Harm,
I believe Martin said he moves 16 pixels, not 4 pixels.
"no I only redraw the row/column once every 16 pixels" from his post 3 back, which hopefully will make it more doable.
Regards Kevin
Edited 2024-02-13 08:10 by Bleep
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 04:38am 13 Feb 2024
Copy link to clipboard 
Print this post

  Bleep said  Hi Harm,
I believe Martin said he moves 16 pixels, not 4 pixels.
"no I only redraw the row/column once every 16 pixels" from his post 3 back, which hopefully will make it more doable.
Regards Kevin

Both is correct.
I scroll a distance of 4 pixels to keep the movement smooth, but the drawing of the newly appearing (15 or 20) tiles only happens every 16 pixel (the width/height of a complete tile) hidden under the borders. For the diagonal movement (45 degrees), both edges must be redrawn with tiles (i.e. 35 tiles newly appears). This shouldn't be too much of a problem, but I haven't integrated it yet. Since I won't have time for programming again until Wednesday, I decided to draw more maps and tiles first, which also takes a lot of time.
the animation of the sprites happens at every frame, but to simplify things one can write the game mechanics so that changes in direction only happen at tile boundaries.

My MAP format is now similar to the one used in "PetsciiRobots", except that the tiles start from the 6th byte.
The files start with "MAP" as identifier and one byte each for width and height of the map.
This means that a maximum theoretical size of 255*255 tiles is possible. With 16 pixel tiles, this results in a height/width of 4080 pixels for a map.
Edited 2024-02-13 16:05 by Martin H.
'no comment
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4233
Posted: 06:31am 13 Feb 2024
Copy link to clipboard 
Print this post

Background in PetsciRobots consists of 77 tiles. In AS 300 tiles.
There is time involved in blit,but majority of time in determining what tile.
So a full repaint(for animated tiles) is a no go.
Adding tiles at the edges is all you can do.

Volhout.
PicomiteVGA PETSCII ROBOTS
 
     Page 1 of 3    
Print this page
© JAQ Software 2024