Sairahcaz

Does MelonJS fits my game requirements?

Recommended Posts

Hi folks,

first of all I'm german, so excuse me cause my english is not the best.

I need to know if MelonJS is the right framework for my new game. I googled around an checked out the old google groups forum, but can't find a such specific answer.

So I have some questions:

1. We have created a relativ big isometric map with Tiled (its 120x120 and each tile ist 360x180px). Is it possible to only draw fragments of the map? In the examples I checked out the framework tooks the tmx file and draw all tiles, but I want to draw lets say only from 50-60x30-40 (depending on the size of the users screen and position on the map).

2. Is it possible to repeat the map in x and y direction when the user reaches the borders?

3. Is it possible to give each tile an individual title and border (or any individual stuff when hovering it)?

Some code examples would also be very great!

Thanks a lot,
fishbone

 

 

Share this post


Link to post
Share on other sites

I have never worked with melon.js but I am pretty sure you can do what you need with it. What you are asking doesn't seem like an exclusive framework functionality. 

As for the map what would you want is to get the screen relative position and its view. Joining that with your map info (let's say a simple map array) you can see what you should render or not. You get the screen info and loop through the map array and see what you should be rendering based on that info. The same for "repeating" the map in x and y. The screen and the world are different things.

To give a special tile attribute, if you could call that, you can give an id to that specific tile. Then add all the properties you want to it like the borders you talked about. When you want to interact with tiles you check for ids and activate the properties of that specific tile according to your needs.

Share this post


Link to post
Share on other sites

Hi PhasedEvolution,

sure in theory I also know this is makeable. But I want to do this stuff with melonJS cause its good support for the Tiled Map Editor and I just think this framework could save me some time. I hope here are some melonJS experts who can show me the base functions I need to do these things with melonJS!

Thanks,
fishbone

Share this post


Link to post
Share on other sites
16 hours ago, fishbonebob said:

1. We have created a relativ big isometric map with Tiled (its 120x120 and each tile ist 360x180px). Is it possible to only draw fragments of the map? In the examples I checked out the framework tooks the tmx file and draw all tiles, but I want to draw lets say only from 50-60x30-40 (depending on the size of the users screen and position on the map).

2. Is it possible to repeat the map in x and y direction when the user reaches the borders?

3. Is it possible to give each tile an individual title and border (or any individual stuff when hovering it)?

Hi, welcome to our forum :)

So to give a first answer to your questions :

1. Yes, melonJS will only render the part of the map that is visible through the viewport. We also had people using crazily large maps in the past, and as far as we saw melonJS was able to render ti without any problems

2. we do not support a "repeat" features for tile layers. I suppose it should not be difficult to add but nobodyhad the need for it so far in our team, and we never had a pull request for it. A related topic has been discussed though here, and same technique could be applied I guess from within your game to achieve the same result (unless you want to propose a patch for melonJS)

3. yes. see for example here , it;s really a basic example, but it highlight the current tile when hovering over the map with the mouse, source code for the hovering part is visible here. You can then add specific properties to any tile in Tiled, and retrieve them in melonJS (through the returned Tile object).

finally we had a few projects over the years using isometric maps, and I encourage you to check our "made with melonJS" page that list. GIK is certainly the last one I remember, it's not open source, but it definitely looks professional and well done.

 

Cheers,

Oliver.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.