Jump to content

soulVampire

Members
  • Content Count

    12
  • Joined

  • Last visited

About soulVampire

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I have an emitter in the game that called when the player moves left as a test of dust particles the code for calling the emitter is as follows /************************/ /* left player movement */ /************************/ case player_states.player_facing_left: this.body.setMaxVelocity(2, 10); this.body.force.y = 0; this.body.force.x = 0; // update the default force this.body.vel.x -= this.body.maxVel.x * me.timer.tick; // flip the sprite on horizontal axis
  2. how do you use the melonjs response.b.body.collisionType.bInA to check if player is in ladder tried but not working, doing something wrong with the assignment of the object
  3. I have a healthBar entity given by the code below which is in a separate file called health_bar_entity.js(melonjs code base) game.HealthBar = me.Renderable.extend( { init: function(hitPoints, maxHitPoints) { this._super(me.Renderable, "init", [0, -24, 48, 6]); this.z = 100; this.hitPoints = hitPoints; this.maxHitPoints = maxHitPoints; this.health = 1; this.currentHealth = 1; this.setHealth(hitPoints); this.borderColor = '#000'; this.alwaysUpdate = false; }, draw : function(renderer) {
  4. soulVampire

    Mr TwinkleToes

    have a WIP at www.silverhawk.co.uk it has moving platforms and pass through platform at certain location within the game, the ladders are currently not working, but as I am testing it on my domain to see how it runs in a browser will be adding destructible platforms that break when you stand on them, but at this time have the level designed and finished, the additions will be added later , this will be world 1, area 1(castle level) the next area will be world 1, area 2(forest)..... there will be a total of 4 worlds each with 4 area's so in total 16 large maps each area being equal to about 70
  5. having a problem with the collisionbox for the moving platform it moves but does not change the size to be the size of the image, its the size of the area then the platform has to move through(left to right) here is the image with the hitbox bounds on now here is the code don't know why its not doing what it should do /*---------------- floating Plataform ----------------- */ game.movingPlatforms = me.Entity.extend({ init: function(x, y, settings) { // define this here instead of tiled settings.image = "platform_2"; //v
  6. soulVampire

    Mr TwinkleToes

    have a moving platform created in the lvl, but need to create a collision area so the my player can stand on it, when i use the this.body.kinematic = false;, the platform can be moved out of the way, not what i wanted need to be able to jump on it removed the this .body.kinematic = false; from the code now can not interact with the platform in any way, so need to have a way to have a collision body so that can stand on object, but when add the kinematic the platform behaves in a way that is not what i want, the code for what i currently have is given below /** * moving platforms Entit
  7. 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 r
  8. 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
  9. 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: graphicsideas@silverhawk.co.uk, have default character just to test mechanics of the platforms, but am going to use maptiled to create different enemies spawn areas
  10. trying to create two types of players sprites one for walking which is width 22px, height 57px the other images are for crawling and are width 50px height 32px, been trying to use add the new sprite to the code but having no success this code is for walking, init : function (x, y, settings) { // call the constructor this._super(me.Entity, 'init', [x, y, settings]); // max walking & jumping speed this.body.setMaxVelocity(1.5, 11); this.body.setFriction(0.4, 0); // set the display to follow our position on both axis me.game.viewport.follow(th
  11. soulVampire

    Mr

    how do you create jump through platforms in meleonjs using maptiled program....looked at the platformer example on github, but does not explain how to create a flag or a bitmask to specifiy which parts of the platform the player can jump through.....was thinking of a 4 bitmask 0000 = solid platform for 1000=leftside pass through, 0100 top pass through, 0010=rightside pass through, 0001=bottompass through....but can't find a concrete example of how to do this
×
×
  • Create New...