Alternative to Tilemap


(MrKayu) #1

Greeting,

I’m developing an action RPG platformer using FlashPunk, I have all the map graphic done in AI, can anyone suggest how can I implement the map? I look through the Internet all is using Tilemap, is there an alternative to Tilemap? Eg. Using CS5 as level editor and load the .swf into game?

Thanks.

Regards,
Milo


(Bora Kasap) #2

so, now, you have a tileset right? then you want to create maps easy with this graphic files, and you don’t wanna use tilemap? or you mean you created whole of each map as single graphic files?


(MrKayu) #3

Hallo, I created a whole map, layer by layer as a single AI files, like this : http://puu.sh/5BJx3.ai

Now I have no idea how can I put this in my game >< Should I cut out the platform one by one? How I implement the background then? @_@


(Bora Kasap) #4

oh man, you worked hard, good job… but that file doesn’t works like that. if you don’t wanna use tilemap, you need to create single entities for objects like cliff or background or just ground. Now or later, you’ll need to do that… So, i think, do it now…

Or, you can use your AI file as a JPEG or PNG and put it into game, then you can use invisible collision entities to create collisions… But that doesn’t work for a longplay game…

And the other way, hard to initialize but it is perfect when you put it into your game. You can find someother gameengines using “collision by colors or complex collision mask” type of colliision, so then you can convert your AI file into a COLLISION MASK OF LEVEL, then you can put it over gameworld then collision OK!, but i don’t know is it good at performance, maybe flashpunks pixel collision too will be enough for you.

So anyway, you’ll need a Alpha Image of colliding areas or you need to create whole collidabloe objects as entities(without ground)


(MrKayu) #5

Thanks bro! I was thinking to export all platform that going to have collision to PNG and use the collision logic described here : Click me

But not sure how to implement this, there are someone who posted a code sample down there but I can’t seem to get the “Physics” part >< Can you advice?

And what do you mean by collidable objects without ground? What is the best and easiest approaches? The game have only 4 Stages, all stages are going to use same collision detection~

Thanks!


(Bora Kasap) #6

Oh, you cannot implement that to your game if you don’t create collidable entities… By the way, it is not hard, you just need to export cliffs as another AI files, that is not so hard, you can use pixel collision or anyother collision to make it done. I think your game “doesn’t need” a “convex enabled” collision type. You just need some concave collisions, that is not so hard, you can use hitboxes for the first step. No need to try complex collision systems. Add some entities and apply the graphics, then set hitboxes automatically. ALso you don’t need to collide to cliffs from above, i think you just need collision from top side of cliffs, so actually you don’t need a collision function :smiley: you make it with easy x , y coordinate functions… I think, you should start to doing something, then you’ll see how easy it is in flashpunk…


(rostok) #7

i would suggest using Gleed2d (http://gleed2d.codeplex.com/) a multi purpose level editor with layers and stuff. it does not support tilemaps of any sort, so all objects are placed quite arbitrary (editor has snapping though). this is both good as gives freedom tiled based maps lack and bad as this solution will need some extra customized code.

for collisions i would do just simple segment vs segment and segment vs rectangle collisions.

if you want to follow this check out my sources for simple platformer game http://rostok.3e.pl/Krupki/ you will find gleed’s XML level loading (Game.as) and simple collisions (Utils.as).


(rostok) #8

one more thing. once upon a time Noel Berry wrote APE - advanced platform engine which was simple framework to be put on top of flashpunk. don’t know the status of this, but maybe it is worth checking out


(MrKayu) #9

I just tried to implement using what you suggest, but if I have over 50 platform, I need to put in one by one using code? This is going to be very time consuming task >< Do you have any suggestion that can make it like drag and drop the platform, then load it into the game? I know using tilemap is another solution, but as you can see my AI file will that be very time consuming to put it into tile? Thanks!


(MrKayu) #10

Hi! I tried to download Gleed2D but it doesn’t work in my PC, nor my friend’s PC, it just wont run, is that a problem? I’m using Windows 7~ P/S : Your daughter is smart :stuck_out_tongue:


(rostok) #11

well, gleed2d is XNA based. i don’t know exact requierments but maybe you should download and install XNA Framework. and XNA requires .NET


(Bora Kasap) #12

Oh, you were said there’ll be only 4 stages with same collisions… Anyway…