GLBasic forum

Codesnippets => 2D-snippets => Topic started by: GarBenjamin on 2015-Aug-11

Title: Tiled Map Loader and Generic Tile Map Renderer
Post by: GarBenjamin on 2015-Aug-11
Hello GLBasic developers.

I recently came to these forums in my quest to try out GLBasic (one of many frameworks on my list).

Although I did not spend much time with the language I wanted to give something back to this community. I appreciate you answering my questions about web development support in GLBasic and just being all around nice folks.

So... I have released the code I created to load Tiled Maps and to render those maps (or any maps for that matter).

You can download it from here (bottom of the page):

Keep on coding! :)
Title: Re: Tiled Map Loader and Generic Tile Map Renderer
Post by: kanonet on 2015-Aug-11
Hi and thank you for your feedback. I did not try your code, but I did read your review. I want to add a few points (that you probably found out since you started anyways, but who knows):

hope this will help you, in case you decide to stick here for some more time.
Title: Re: Tiled Map Loader and Generic Tile Map Renderer
Post by: GarBenjamin on 2015-Aug-11

I will grab the 123Basic compiler from GitHub and check it out.

As much as I am tempted to actually dig into the source and try to upgrade it I really don't want to go down that rabbit hole. I originally started my quest to check out other 2D game development frameworks so I could get more done (game dev wise) in less time.

So I will try to just download test it out and leave it at that!
Title: Re: Tiled Map Loader and Generic Tile Map Renderer
Post by: erico on 2015-Aug-11
Nice code!

If your primary reason is a search for web dev only, as you stated a few times, there sure are other tools to specifically fit your bill, code and object wise.
Each and every tool with its own problems as you shall discover, but coding is the art of going around ;)
One main feature on GLB is its native support, so knowledge goes on as you switch tools.

GLB has a bootstart on html5, but it is limited on what its use can do in comparison with what GLB can do on other more native platforms.
The full GLB+html5 is still unknown to most of us, specially on the testing level.
I have seem some advanced users here doing nice stuff with it, not final projects, but ´demos´ that gets there.
By that I´m convinced that it works, how, is another question (that also includes the debugging framework you talked before and how to embend it on a page).

If you decide to stick around and put some time into it, we may all figure it out.
Otherwise, I heard some LUA based coding tools for html5 are ok, and some users here do so on multiple coding tools (and we all came from other tools(me=AMOS)) and they may be able to share more alternatives to your current case, as you probably saw on the off topic subject, where we once in while talk about newer/older dev tools.

Here is Albert´s post of html5 version of Wampu´s absolutely marvelous code:

Of course take a read on the original thread should you want:


edit: be aware that this GLB html´s code is from april 2013...some configs in app may not be supported on today´s browsers as they constantly change stuff. Click on the red stripes to pull down configurations.

edit2: That rabbit hole you stated does not need to be that deep as looking into the 123´s source, surface testing GLB´s html5 stuff should do, but I think you may need the help of the more html5 coders here to boot should they be around.
Title: Re: Tiled Map Loader and Generic Tile Map Renderer
Post by: GarBenjamin on 2015-Aug-12
I am just trying to find the best all around 2D game development framework.

For me "best" is defined as:

Basically the reason I am looking for web support is because these days it is the easiest most common way of sharing demos, previews, examples and so forth. Maybe 1 in a 1,000 people will download a game (or demo) compared to perhaps 1 in 10 being willing to try an online version of the very same thing. Web apps are just seen as way more accessible requiring far less investment on the part of the user.

When it comes to actually releasing stuff for sale I would use the desktop platforms. Getting the people's interest and the "try before you buy" comes from the online version.

I just spent an hour messing around with the compiler and never was able to get it to actually work. I think mainly because I do not know what arguments to feed it. More than that I went into the source and hard-coded the information specific to the test I was trying to compile and it made it past that part and failed on something else.

At this point I am going to continue on my list and check out one or two more items.

If I get some more time it might be an interesting project just to mess around with HTML5 in GLBasic. Right now I just don't want to get sidetracked from what I set out to do originally. :)

Title: Re: Tiled Map Loader and Generic Tile Map Renderer
Post by: erico on 2015-Aug-12
Your call.

I lately stumbled into this other engine:

I did not read much about it yet, was thinking about asking people around here for such as a friend of mine, mac owner, was interested.
Maybe it fits you as well.