BatteryCheck PS1 - DevBlog: The beginnings of a tilemap!

All this time I was under the impression that the level and tilemap would be to big to fit in the PS1's RAM all at once. Just because the first BatteryCheck level is so immensely big! I really had it stuck in my head that the level was about 1MB or more in memory. And this added with the TileSet, spashscreen etc....that it would just be to big you know! And that I would have to maybe stream the level data in a preprocessed form from the CD-ROM at a later stage. Until I actually looked at the size of the real uncompressed data in the level file!

The actual file for the level "Binnen.j2l" is just 26KB in it's compressed form. Fully uncompressed that expands into just 295KB! That includes the event map of where all objects are placed, the configuration per layer, animated tiles and finally the tilemaps for 8 layers. These tilemaps use something clever to sort of compress the used space even more. Instead of describing each tile of the map it does this in groups of 4 and references to a group in the layer maps. Let's just say it makes the required space a lot smaller. The exact format can be found here if you're interested (https://www.jazz2online.com/wiki/J2L_File_Format)

Having the uncompressed data made it easy to include that into the PS1's demo EXE and have a go at it. I copy/pasted some of my existing code over into it but it's barely enough to parse the configuration and get the tileid's. And I messed up some of the calculations too which made it not work for a long time...so I did some tricks with the help of the linux version to know where it went wrong. The offset into the tilemap for layer 8 (which is the background) is now hardcoded...but at least drawing it works perfectly now!

screen-21.png

And overlayed on top of this is still the fixed hand drawn platform from before. Because the "drawlayer" functions is also quite limited and not capable of drawing the other layers yet for various reasons. But mostly because I can't trust the current offset calculations. I could have the Linux version dump those numbers for now and just have it drawn...and fix it later. Except that "fixing it later" usually never really happens. ^_^

Hopefully I get an even more recognizable screenshot soon....the start of the level! :D


EDIT: And as I had hoped here is a nice screenshot of the start of the level!!!!
screen-22.png
It is still a static position as no controller input is processed at all! But it's using the real tilemap as explained above.

Comments

Nice!
That game really should be on PS1.

Thinking of the similarities (engine, files):
Jazz Jackrabbit 2 always looked like a PS1 game to me. They should have released it officially for the console.
 
  • Like
Reactions: Archerite
Nice!
That game really should be on PS1.

Thinking of the similarities (engine, files):
Jazz Jackrabbit 2 always looked like a PS1 game to me. They should have released it officially for the console.
Thanks. Well I am getting closer and closer and at the current stage...even if it's just a "level browser" just like the Wii version once was 5 years ago I really see it happening. It does take a lot of sacrifices on the graphics though. Because...while this result is better than what I had expected they are still rescaled tiles from 32x32 pixels into 16x16 pixel tiles! This is only really necesarry because the PS1 has just 1MB of VRAM which is shared with the frame buffers as well. That leaves very little for actual 2D art work to be in VRAM at once!

I have never played Jazz 2 for long enough to really know much about it. I never get past 1 or two levels in the way it's meant to be played. I know how to load specific levels by hand though so I have seen most of them and played it a little. On a technical level the jazz2 engine is quite powerfull for back then. It has many great features and I am sure if they had put the effort into it they could have made an official Jazz2 release on the PS1. But they would have to deal with either resized graphics or REALLY zoomed in gameplay.

Right now I just want to get it working in 16x16 tile mode and get the core of the engine rewritten and functional. Once that's done I can look into making a special "mode" that does the actual zoomin kinda like how it is on the 3DS. Another option that's even more difficult is making it a real 640x480 game on the PS1! The most difficult part is memory management! As I said VRAM is just 1MB and a 640x480 framebuffer is 614KB...which might actually mean that it's not even possible. At the very least it's not going to be double buffered because there is just not enough VRAM to store that! There are other slightly bigger resolutions than the 320x240 I am stuck with for now.

I should really turn of the CRT filter next time I record a video of the current state....but it looks so amazing with it turned on! :D

I actually can't wait to get my CRT from storage in a few weeks, it's going to look beautiful I think! But I need to move my 3D printer to make room for the TV first. ^_^

NOTE: And the transparency issues that are still visible in the video are solved already too.
 
  • Like
Reactions: KleinesSinchen

Blog entry information

Author
Archerite
Views
401
Comments
3
Last update

More entries in Personal Blogs

More entries from Archerite

General chit-chat
Help Users
    BigOnYa @ BigOnYa: There is black rice flour, and its really black colored