Author Topic: Import Tilemaps  (Read 5398 times)

b1tsh1ft3r

  • Guest
Import Tilemaps
« on: October 16, 2017, 03:19:18 am »
It would be nice to import tilemaps so they can be used in Jo-Engine. Maybe .TMX format (tiled map editor) since this seems to be a popular one. The current MAP format of  [filename], x position, y_position is ok, however converting to something like this that the saturn understands can be painful and time consuming if another map editor is out there that can be used. I think the purpose of jo-engine isnt to build a map editor, but provide an easy library to code on the saturn rather.

mindslight

  • Administrator
  • Full Member
  • *****
  • Posts: 189
  • Karma: +19/-3
    • View Profile
    • Jo Engine
Re: Import Tilemaps
« Reply #1 on: October 16, 2017, 01:05:09 pm »
I will check to integrate this format  ;)

mindslight

  • Administrator
  • Full Member
  • *****
  • Posts: 189
  • Karma: +19/-3
    • View Profile
    • Jo Engine
Re: Import Tilemaps
« Reply #2 on: February 18, 2018, 05:13:58 pm »
Thank you for this converter  ;)

I have so much thing to do on this project and not necessarily enough for the Jo map Editor :'(

I made a dedicated thread for your converter : http://forum.jo-engine.org/index.php?topic=859.0
« Last Edit: February 18, 2018, 05:19:34 pm by mindslight »

XL2

  • Sr. Member
  • ****
  • Posts: 360
  • Karma: +88/-3
    • View Profile
Re: Import Tilemaps
« Reply #3 on: February 20, 2018, 05:32:11 pm »
It wouldn't work simply because how the SGL workarea works.
You will need to cull the sprites that aren't on screen.
It should be quite easy using a simple grid, but since I never use the 2D functions I couldn't tell you exactly how you could do it.
The idea is that if each tile is like 32 pixels wide and your screen is 320 pixels wide, you only show tiles that are within 5 or 6 units of the screen's center.
Perhaps a new map rendering function would need to be create as I don't think the current functions cull-away the sprites that aren't onscreen.
SGL will discard the sprites that aren't on screen, but they will still get processed and fill the workarea quickly, so you need to do culling on your end too.

mindslight

  • Administrator
  • Full Member
  • *****
  • Posts: 189
  • Karma: +19/-3
    • View Profile
    • Jo Engine
Re: Import Tilemaps
« Reply #4 on: February 20, 2018, 06:00:48 pm »
You can load large maps in the engine without any problem and no slowdown (I already used 10000x10000 maps !)  ;D

I don't use SGL for this part but a custom implementation.

Look at the "demo - map" sample.

Besides, the Jo Engine is way more powerfull in 2D than 3D today (but it will change).

XL2

  • Sr. Member
  • ****
  • Posts: 360
  • Karma: +88/-3
    • View Profile
Re: Import Tilemaps
« Reply #5 on: February 20, 2018, 06:33:40 pm »
Good to know!
2D on Saturn is indeed very interesting, sadly I don't have the patience to create sprites and deal with animations, so I'll stick with 3D for while. ;)

 

Sitemap 1 2 3 4 5 6 7 8 9 10