Hello all,
I stumbled upon this project whilst doing research for my current RPG and was really impressed. This spawned a few questions for me:
- How can I best contribute? I'm a reasonably good programmer and can provide german translations if that's any help. I'm not very familiar with github, so please forgive me if there's a page answering that question hidden somewhere...
- As I mentioned I'm currently working on a game of my own, and while I'd really like to help improve flare (or is it FLARE?), it'd be rad if I could also snag some solutions to help with my own work. I peeked at the code and though I think I have some basic understanding of what's going on, there are still questions arising. What's the best place to discuss such matters with fellow programmers (with probably a heap more experience than me), be it flare-related or elsewhere on the web? I snooped over at gamedev.net for a while, but didn't really like it.
I'm particularly interested in (and particularly don't understand) how the map is handled since I've never worked with tiled maps before. The map in the video really captured the look I'm aiming for, so I figure it's sensible to take a closer look at how flare handles this.
Okay, so that was only two questions. Thanks for reading and perhaps answering!
- Arivor
PS: I apologize should my English be bad, I'm not a native speaker. Please point out any mistakes :-)
Hi Arivor,
Below are some useful links for you to get involved with flare. Most discussions happen in these areas.
Ryan
Hi Arivor,
fellow german here: your english is great ;)
(or I am overlooking the typical german english errors)
The best way of contribution is generally to first find a topic which is most interesting for you, so you'll really love doing it.
We're most often discussing development either at the github site in the issues for a specific solution or via IRC these days.
(IRC: real time chat possible, github issues not so much)
You seem to be interested in maps specifically. Then I'd recommend to not look into the source code of flare, but rather in tileds source code. Flare rendering is highly optimized, see https://github.com/clintbellanger/flare-engine/blob/master/src/MapRender... how to render one map layer for example. I tried to comment it, but most likely not enough.
The tiled source code is in my opinion better readable as it actually puts more emphasis on readability than performance.
The same code (rendering a map layer) is here https://github.com/bjorn/tiled/blob/master/src/libtiled/isometricrendere...
So maybe as a general note:
A map is tile based and structured in layers. A tile is a small picture, such as a certain are of the floor or a throne or a piece of the wall.
A map consists of multiple 2D layers which are drawn above each other. In flare that is the background layer and the object layer. Additionally there is a collision layer, which you can see in tiled, but not in flare. The collision layer just defines on which tiles the hero can walk, where are walls, where there are obstacles, but i.e. arrows can still fly there.
The background layer is put into the background such as the floor where the hero and enemies are walking on. The object layer is on the same 'height' as the hero and enemies, so you need to care about the rendering order, i.e. the hero standing in front or behind a wall makes a difference in the rendering order.
Specially for mapping and tilesets there is this
http://www.flarerpg.org/tutorials/isometric_intro/
https://github.com/clintbellanger/flare-engine/wiki/Tile-Set-Definitions
Thanks for the replies! I'll check out the IRC channel when I find the time.
I seem to have completely missed the tutorials section of the site. Weird. Definitely gonna check it out. I always wondered about collision detection with tilemaps - I guess I know now! Can the tiles be altered at runtime?
Anyway, thanks and have a nice Easter or theologically unbiased random holiday! I think I'm going to take a look at tiled now.
-Arivor
The layers are read into an array when loading the map. The array or each layer can be altered at runtime of course.
For example have a look at the caves map east of the map with guill and ukonen. Once you enter the map, you are warned not to go south or the wall breaks down. If you go there however, both the collision layer (which you cannot see, but must be consistent to the visible layers) and the objects layer showing the walls change, so you need to find another way out.
If you want to checkout a tutorial on maps, please have a look at the devlab branch of my repository.
The devlab is a mod for flare to explain the flare engine and how it works to new contributors. It is however not yet completed and done. At my branch devlab however you find a decent amount of tutorial regarding maps and mapping in flare.
https://github.com/stefanbeller/flare-game/tree/devlab
I intend to get my devlab version merged after the upcoming release this weekend.