scheffgames

Members
  • Content count

    122
  • Joined

  • Last visited

  • Days Won

    2

scheffgames last won the day on March 15

scheffgames had the most liked content!

1 Follower

About scheffgames

Profile Information

  • Gender
    Male
  • Location
    Land of Biting Bytes
  • Interests
    Programming, Photoshop, Design, Games
  1. As far as I know the spritesheet approach it's the best in terms of performance since the GPU has to deal with only one image instead of lots of little ones.
  2. The best teacher for architecture structure is experience. Just start coding it and keep the desired goals in mind. In my experience - with Phaser and Unity and SDL - the best thing to do it's to have each object as self-sufficient as possible and with very little or no dependencies to other objects. A "shy" object if you like - just exposes the minimum amount of properties and methods to other objects. Each object manages drawing and logic for itself. It might seem a good idea to defer the drawing to other master/manager objects but you'll end up with a big furry mess.
  3. Also don't forget exercise and eat healthy. Keep crunch at minimum levels. Socialize. Don't abandon project mid-time just because the code it's a mess and you "can do it better if you start over". Remember to shower.
  4. You should probably do the loading in a previous state or in preload section - if you're already doing that and you still have issues there's a few tricks you could employ. The first would be to create the images before the player enters the level selection menu, place them somewhere off screen and when the player enters the levels menu simply position them as needed. Or you could create the images as needed - I'm assuming the player scrolls over them - only 10 or 20 to cover the upper portion of the screen and as the player scrolls down create additional 10,20 images.
  5. There's no reason this shouldn't work - maybe something in the code that's not showed here? Also, how do you create your zombie objects? something like should work: function Zombie(x,y,texture){ this.obj = game.add.sprite(x,y,texture); this.obj.anim = this.obj.animations.add(texture,[0,1,2,3,4,5]); this.obj.anim.currentFrame = 3; var frameRate = 10; this.obj.anim.play(frameRate,true); } and create it like this; var zombie1 = new Zombie(0,0,"myTexture");
  6. Not tested but maybe you could set the currentFrame property to a different value (say 2 or 3 instead of 0) and then hit play().
  7. Nice game. Love the mechanics and the whole Super Meat boy feel. Making the first levels a bit easier might be something to consider though.
  8. Nice game. I do like the simplicity of the overall graphics but I'm thinking that a bit of spice would be nice - maybe make an agressive neon look with sci fi elements? I was the only player sadly so I can't say much about the overall gameplay experience. One thing I noticed and liked was the debris (when a static element is shot at) being directed at an inverse angle from the shot direction (like a pool ball).
  9. That's an impressive collections of images/textures. They're also quite professional and I can see future uses for them. Congratulations and thanks for sharing! PS: are you using by any chance Texture Maker to create some textures? Just asking because some electronic/scifi texture looked similar to what texture maker can produce.
  10. I'm guessing a ratio between total posts and user's content likes. Minus warnings.
  11. That's very interesting, thanks for the links.
  12. Ok, so first of all you can't do game.physics.enable (droid, Phaser.Physics.ARCADE). Enable works on sprites only and droid it's a constructor function, not a sprite. droid1.obj and droid2.obj are sprites - and you should do game.physics.enable(droid1.obj, Phaser.Physics.ARCADE). Also you're trying to acces other properties on your droids (body, animations) but you're doing it wrong. droid its' a constructor function and it doesn't have body or animations properties. Your instances of droid - droid1 and droid2 - have an obj property (which is a sprite) and that obj property has body and animations properties. So you should do droid1.obj.body.bounce.y = 0.1. I reccomend that you improve your JS knowledge to at least a basic level before attempting to make games with it - otherwise you're in for a world of frustration.
  13. 1 out of 2 services running happens to me sometimes too. The only solution that works it's a pc restart.
  14. Use a constructor function and instantiate new objects with "new" keyword. From the top of my head, unoptimized for real life usage but works as an example. function Droid(x,y,texture){ var speed = 100; this.obj = game.add.sprite(x,y,texture); this.update = function(){ this.obj.x+= DELTA_TIME() * speed; } } And use it like this in your create function var droid1 = new Droid(100,200,"myTexture"); var droid2 = new Droid(0,0,"myOtherTexture"); And in update function update the two objects: droid1.update(); droid2.update(); Things you can do to make it better: 1)Have a master droid holder object that will update and remove droids automatically so you will only have to call update only once. Then you can simply tell it to instantiate and update a droid on all itself. 2)Droid function should have a destroy method that will clean up you code and call destroy on the instantiated sprite (this.obj.destroy) Also you should be extremely aware of the "this" keyword and in what context you're calling it - basically you have to really understand JS scope - otherwise you'll have unexpected behaviours.
  15. From a theoretical point of view that's correct - things should be done well in one place before using them somewhere else. However you have to consider the practicalities which may arise sometimes. 1)Not every animator works the same way - the end results may vary. It's up to the end user (game developer) to go blindly with the end result or adjust it. 2)If you bought the graphic asset (animation) maybe you can't contact the original artists to fix that boring animation. If there are no major flaws you can adjust yourself. 3)The animation software doesn't offer you the option to skip frames when rendering - if you have a 12 frame animation in it you can't tell it to export it as a 6 frame animation skipping every other frame. Sure, you can make the animation in 6 frames to start with but chances are it will be harder to do and the end results might not be as good. 4)You have one master animation file with a smooth 24 frame animation. It looks well, altough a bit boring. You might use it in some places (like a majestic butterfly flapping it's wings). But then you decide you want to also have a more frantic/snappy butterfly. You can redo the whole animation - this will take significant time - or you can just delete frames by hand and if the results are good enough you're good to go. 5)We're not all master 2d animators. If we can create decent results but not perfect in the animation software why not improve them any way we can afterwards? What I'm saying is that this is a technique/tool to be used as needed, when needed, considering the time investment and the end results.