Jump to content

Mr TwinkleToes


Recommended Posts

Have started to design a platformer game have world 1 designed, now starting to create enemies spawn point triggers at the moment it’s a WIP if you want to see the first world then go to www.silverhawk.co.uk for the moment only works on desktop PC if you have any suggestions or graphics that you think would improve the game then contact me at email: [email protected], have default character just to test  mechanics of the platforms, but am going to use maptiled to create different enemies spawn areas

Link to comment
Share on other sites

at the moment have just made the resolution high so as to encompass a large view of the lvl, but when playing the resolution will only so a small part of the lvl, have been making changes to the game on my PC, so have not uploaded the new version to my site, just working on the mechanics of the character movement before I start to add enemies, also going to try to add spawn triggers to the lvl to activate enemies when your character move over point in the lvl, also having trouble trying to load different sprites to the character as the jump sprites are 57x56 and the walk sprites are 57x22 s o need to change the framewidth to the new value, but not finding any solution the problem at the moment

Link to comment
Share on other sites

how exactly are you changing the sprite right now ? if manually or using a fixed size spritesheet there is no api for it to be honest (as then it expect all frames to have the same size), but as a workaround you could modify the current frame size by accessing the private "current" property : 

this.current.height = 56;

but the most easy way would be to use a texture packer to be honest, as it contains size information for each of the frame, and it that case melonJS will adjust the sprite size automatically.

note that in the current master 8.0 release (to be release soon as I'm putting the final touch to it), I added support for a free texture packer tool : http://free-tex-packer.com/app/, if you want to give it a try without waiting for the release have a look here, and the latest build is here



Link to comment
Share on other sites

been trying to change the this.body.shape to the new this.body.addshape(0,0,[0,0,50,0,50,31,0,31]), but does nothing to change the size which is the size of the crouch animation, have the animations in a texture, but when loading the graphics the crouch animation displays to high on the screen and I don't know why the graphics come from a texture file created by texturepacker so and have looked at the json file contains all the correct sizes for each of the animation frames, but the walk frames display fine but the crouch frames don't




as you can see from the displayed running image



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.

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.


  • Recently Browsing   0 members

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