Jump to content

Does MelonJS fits my game requirements?


Sairahcaz
 Share

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

 

 

Link to comment
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.

Link to comment
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

Link to comment
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...