Creating levels for my game easier.

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
Ducktor Cid
Prole
Posts: 18
Joined: Wed Oct 05, 2016 8:08 pm

Creating levels for my game easier.

Post by Ducktor Cid »

My game's levels are a hexagonal grid. Currently, I use a 2D array to set data for the grid (each hexagon has: type (water, fire, earth or wall) and a value for who's controlling it (player or AI))

This is the 2D array for my first level:

Level.gridData={
{0,0,0,12,12,12,12},
{0,0,12,12,12,12,12},
{0,12,12,13,13,12,12},
{24,24,24,24,24,24,24},
{23,23,23,23,23,23,0},
{23,23,23,23,23,0,0},
{23,23,23,23,0,0,0}
}

One of the things I want to do with future levels is expand the size/diameter of the grid. Which will, obviously, enlarge the 2D array and make it hard to type in directly to the table.

Does anyone have a good solution?
Nelvin
Party member
Posts: 124
Joined: Mon Sep 12, 2016 7:52 am
Location: Germany

Re: Creating levels for my game easier.

Post by Nelvin »

You could give https://www.mapeditor.org/ a try
bobbyjones
Party member
Posts: 730
Joined: Sat Apr 26, 2014 7:46 pm

Re: Creating levels for my game easier.

Post by bobbyjones »

Yeah tiled should work great for that. You can use it in conjunction with STI to load the levels.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 3 guests