Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Cheese Map  (Read 3183 times)

0 Members and 1 Guest are viewing this topic.

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Cheese Map
« on: August 27, 2023, 08:33:31 pm »


Cheese Map is a drawable layered tile map for SFML, designed to simplify drawing most 2D maps.

It's also fully header-only so no library compilation needed; simply just include it.

You can create multiple grid map (standard grid tile maps) and place them anywhere in space and Cheese Map will draw them all together. You basically give it the view you want it to fill and it draws the map that is needed to fill that view, automatically culling everything out-of-range.

You can also create layers of individual "free" tiles that are tiles that can be placed anywhere in space with no restraint to a grid. These are likely most useful for separate, individual objects that don't conform to a grid and/or need to be layered in front or behind without having to create another entire grid map in front or behind.

Whether it be a grid or layer, each one can have a z-order depth and is automatically sorted when drawn so you easily decide on the order things are drawn. Each one can also have a depth that offsets it in the 3rd dimension; it projects away from the screen towards the back and follows the rule of the perspective (the vanishing point of the map can be customised). Each one can also have its own colour, be activated (drawn) and de-activated (ignored), and given any offset/position that moves the entire grid/layer.

Each tile's texture can also be transformed: flipped/mirrored/rotated using flipx, flipy, and rotate (90 degrees).

Cheese Map makes it easy to move around by using the view: you can move, scale and rotate the view however you like and Cheese Map adapts. You can think of it as if the entire map is static and your view is your camera that you can aim at it however you want to. Cheese Map doesn't draw stuff it doesn't need outside of the camera/view.

To get started quickly, you can have a look at the Simple Example that - with very little code - produces this animation:

(click to show/hide)

There are also a couple of videos available that were created of tests during development:
Early Test Demo:


Initial Tests:




EDIT: fixed Simple Example link
« Last Edit: October 16, 2023, 07:40:40 pm by Hapax »
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*