streaming in 2d map

Hi, after some general advice

I have this 2d game world I made a while back

It consists of 121 segments, each having 75x75 tiles, with each tile having the following variables:

12 bytes and 5 booleans (each tile has 4 ‘layers’) - blocked, and 4 each of: atlasX, atlasY, flipped, rotation (for the texture)

Each segment is stored as a .txt file currently, 1 line per tile, with either an ‘e’ (empty) or a ‘c’ (same as most common tile which is stored in the first line) or a number with all the data, e.g. 2206001918001918001918000. The total file size of all the ‘segment’ txts together is about 5mb. Each tile image is 16x16, and all 625 textures are packed into 1 image (texture atlas type thing - 512x512).

I was hoping someone could offer me some advice for making this into an android game, as while I’ve made plenty of 2d games in Java I have never tried for android (probably using Libgdx).

My intention is to ‘stream’ segments in so no loading screens, with 9 at a time, the the center and the 8 surrounding the player. I’m not sure if these are too big, and I should perhaps make segments say, 30x30 or something? Is this even a realistic aim for android?

Also, what is the fastest way to load data on the fly in your experience? I’ve read that serialization is extremely slow. Is my 512x512 image size going to be a problem? I’m gonna need another for player sprites, which will be 512x256.

Finally, any recommendations for how I should handle the file format of my maps?

To manage the maps the best thing you can do is use one of the tools supported by the framework/engine you are intended to use.
For libgdx you can use Tiled, and then simply use the libgdx tmx map loader. And your texture sizes are not a problem, they must work just fine.

Ty Endos. I am reluctant to use tmx though, as far as I’m aware It doesn’t allow me to rotate tiles, which I need.

its save to say that you will need to write something on your own

Tiled/tmx is not what you need here, you want customized stuff, plus the streaming…
I always write my own level editors.
This is our old one, working on a new one though, since this was still for slick and was never 100% ported to libgdx:

Vyl-B7aULOo

as for streaming, well, this is a tough one. But an obvious one.
I have never done a continuously streaming world ala GTA, but I was always intrigued to make one.

So lets have some other people comment that may have some experience

found this randomly

Yours looks really nice/professional. I made my world with an editor I put together when I first learnt lwjgl, its horrible but does the job.

Yeah I have done a streamed open world with TMX and libgdx before, but obviously using a PC made it possible; I had to have a seperate TiledMapRenderer object for all 9 segments. I’ve no idea of what balance I should be looking for in terms of how much world I store in RAM vs how often to load, #x#.

Anyway here is a picture for anyone interested

world map: http://i.imgur.com/frPkiyM.jpg (too big to post, pink is a hidden path)

this is the club in the bottom left

You can rotate tiles with Tiled, just so you know.

Oh cool, is that new? Do you happen to know if the TMX loader and renderer in libgdx allow it?

Wow, that is an epic map! ;D

It’s not new, and it works just fine in libgdx.

I didn’t know that, so thanks Endos. And ty liquid, I hadn’t done anything with it for ages, but figured it’d be a shame to not try and make it into something.