MelSmits

Members
  • Content Count

    10
  • Joined

  • Last visited

About MelSmits

  • Rank
    Member
  • Birthday 08/13/1987

Profile Information

  • Gender
    Female
  • Location
    The Netherlands

Contact Methods

  • Twitter
    @MelSmits

Recent Profile Visitors

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

  1. Got it working, there was a type. Thanks loads!
  2. function wanderLeft(i){ j = npc.x - i; npc.animations.play('left'); tweenLeft = game.add.tween(npc).to( {x: j},(npc.x - j)*3000,null,true); tweenLeft.onComplete.add(stopAnimation, this); } Now the code is like this. And in the listener is the npc.animation.stop(); and the frame = 4 bit. The animation plays! But it doesn't stop. :S At least it's progress. Also I think turning off the body.moves for the tweening made the npc not collide with world boundaries anymore? At least he sometimes just zooms off the side of the screen, but I'll deal with that when the animation is fixed.
  3. Thanks! I'm more used to Java, so I had it all linear in my head! I'll try it out.
  4. Anyone? Could it be something to do with the "j" variable? Could I avoid using it somehow then?
  5. Are these two things not meant to be used together? The animation worked when I was using moveToXY, but using that function I found I couldn't easily stop the movement so after googling and searching this forum I decided to move to tweening. The object won't need physics in the future, so it should be fine. Here's what I have. The function is passed a value 'i', which is a random number. This is meant to determine how far it should move. 'j' is the calculated target destination. Current x + i. The tween should take longer if the distance is further, not some constant amount of time, hence the (npc.x-j)*3000. function wanderRight(i){ j = npc.x + i; npc.animations.play('right'); game.add.tween(npc).to( {x: j},(npc.x - j)*3000, null ,true); } When this function has completed, it moves on to: npc.animations.stop(); npc.frame = 4; 4 being the 'face forward' frame. I feel like this should work. What happens is that the npc does move to the right, like it should. Only it's not animating while it moves. It just stays on the frame it was on before the tween started. Can someone explain why this doesn't work?
  6. I think there are a few phases to a project. And in every phase you promote differently. Idea phase You've come up with a cool idea, maybe (depending on how often you've done this before) you've set up some basic functionality as a proof of concept. But all in all you're still very much thinking about the game and all the different stuff you want it to do and how that would work. How to promote: don't. Tell your family and friends if you want, talk about it on forums like these if you want, especially if you need help, but at this point nobody should actually be trying to play it or even looking at it. Coding phase You've got the basic ideas down and you're wokring on implementing them. This phase is usually pretty long. You're writing code, creating assets, all that. What you need to think about here are features and versions. What features will your game have? Which ones will you need to do first (can't work on enemy pathing AI if there aren't players or obstacles or enemies yet), and so on. Ideally, you need a list of which features go together to make something that "works". Doesn't have to be finished, just working and doing something probably unimpressive like showing the player walking around. Take that list of features. When that's done, that's v0.1. Then make a list of features that will be the next "done/working" thing, that's v0.2. Try to think 2 or 3 versions ahead. It's perfectly fine to end up at v0.76 before you release, the number police isn't going to bust you for it. Any time where you up the version number is a time where you can consider starting your marketing. v0.1 probably isn't that time, but v0.4 might be. During this phase, you should have a decent and developing idea of what your game is about. You need to work on some non-coding things: * Elevator pitch. If people ask you what you're doing, you need to be able to explain what your game is in 30 seconds or less. Without words like "sort of, kind of," or "like WoW but different". It only needs to state the important things, like "My game is a space MMO where everything is player-driven. The economy, the building of ships and spacestations, owning star systems or going pirate in the far reaches of space is all possible, but you'll need allies. And money. Lots of money. You can even pay for your subscription if you make enough in-game money." That's EVE online. Don't get into the tiny details. At this point I don't care that various systems have various levels of security, or that you can choose from a number of different races. Just the basics and some stuff that makes it different from other games. This is what you'd put as the account info for your game's Twitter account, for example. * Some art. Even if you're still working with placeholder images in your actual code, make at least: a user image you can use, and some basic splash images. You know those mobile games that show stuff in the trailer that's not really in the game, because the game looks pretty disappointing if they'd just show ingame footage alone so some concept artist came up with a cool artist's impression? You need something like that to make people look. *A decentlooking website. Design matters. *If you want a patreon or some other money-making scheme, here's where you set it up. Except for kickstarter, do that when you have something to show to people. How to promote: You've got the elevator pitch, some art, maybe some screenshots. You can start talking about this on social media now. Maybe even make an account just for your game (instead of you personally), but don't expect anyone to follow it just yet. At this point you're just talking, "Just implemented AI pathing in *game name!* Works better than I thought, enemies are navigating complex mazes! #gamedev #yourgame" Set up the website where people can find it if they google your game, but don't host the game on it yet. Alpha version coming soon. Alpha phase A couple of versions in you should have a decent working thing that demonstrates some of the key features in your game. It's not polished and it's far from finished, but it's something you can show to people. Now you can start actually promoting. At this point you need to decide what you actually want. Do you want a kickstarter? Do you want to release this as one finished thing like "BAM LOOK AT THIS GLORIOUS THING!" or do you want people along for the ride since alpha, like minecraft of dwarf frotress? How to promote: Blast it on social media. Spam about it on the forums for every site you can think of. PRobably best to phrase it like "I would like some feedback so I can take the opinions of the community into account during development", and not "check out this awesome thing!" because it is an alpha, it is not awesome yet. Your social media should all link to your website, preferably with each post. Every time you update or something significant happens (100 followers, one week since alpha release, etc.) you post about it on the website. It's important that your game seems alive. Reply to people on social media. Don't feed trolls. Beta phase Now your game should be almost ready for a release. Like if v1.0 is the finished game, you're at v0.8 now. Maybe the previous thing worked and you have followers. Maybe you have that kickstarter cash. Beta is a good time to actually make the game available to people, making sure they know it is a beta. You could think about steam greenlight at this point, for example. Put it on the app store. Put it on Kongregate, try and see if you can get it on Facebook, that sort of thing. How to promote: Send it out. Send it to reviewers, even/especially the big names. Spam it on every single gaming or gamedev related subreddit or forum you can think of. Send it to other devs with a bigger following. Send it to freaking Notch. Ask them what they think, whether they like it and if they do, could they post something about it and help you out (they were once just starting out, just like you)? Even if they don't want to promote it, they might say something like "It's looking pretty good, lots of promise!", ask them if you can put that quote on your website. Don't be afraid to actually start a conversation instead of writing one formal letter and one formal thankyou. Send it to your local newspaper ("local man makes indie game"), pay for google ads, pay for facebook ads, do whatever you can to make your shit show up at the top of the list EVERYWHERE. Many of these things won't generate a damn thing, but it doesn't matter. When people actually start playing it, keep a close eye on their reactions. They don't like it? Don't blast them, figure out what went wrong. They like it? Share it. They find something hilarious (even if it is a bug), share it! Funny is better than positive. Someone writes a review, share it, put it on your website. Someone makes fanart, share it! Final release Same thing as beta, actually. Contact all those people you contacted again, even if they didn't reply or like it the first time. Now you want to make sure people know what's in the future. Which features are still on your list? How often do you plan to update? Adress concerns from the community, put their input on your future feature list. Kerbal Space Program is a very good example here. Anyway, long story and I'm sure I missed a lot. But it should give you some pointers at least!
  7. MelSmits

    Game inventory

    I have a kind of "status window" on the website that displays some stats. I did this so as not to overcrowd my game canvas. So a bunch of my variables need to be visible outside the scope of the game. Just giving an example usage for variables that seem "way too global". Of course, the website only has that one page that does basically everything.
  8. Thanks drhayes, that did the trick! Stupid thing is I actually looked at that function as a possible solution but thought "nah that will just teleport the player there". But of course that's just player.x = whatever.
  9. I have a game where the player object is controlled by holding down the mouse to either side of it. The player then moves towards the pointer, and stops. However, I want this to work somewhat like Breakout, in that the player is not allowed to jump or move vertically in any way even if the cursor is above him. I can't seem to restrict y-movement, so I'm probably missing something! Here is my code for the player moving left. Right is exactly the same only opposite. if (game.input.mousePointer.isDown && game.input.activePointer.x < player.x) { game.physics.arcade.moveToPointer(player,400); player.animations.play('left'); if (Phaser.Rectangle.contains(player.body,game.input.x,game.input.y)) { player.body.velocity.setTo(0,0); } } Here are my player properties: player = game.add.sprite(32,game.world.height - 102, 'dude'); game.physics.enable(player); player.anchor.SetTo(0.5,0.5); //Player physics player.body.collideWorldBounds = true; //Walk animations player.animations.add('left', [0,1,2,3],10,true); player.animations.add('right', [5,6,7,8],10,true); With the current code, the player follows the cursor everywhere (as long as the button is down), until it hits a wall or platform with collision. I've thought about putting an invisible object over his head so that he can't move up, but it just seems like there should be another way! Can someone help me out?
  10. I'm starting work on a game where I want to be able to randomly generate NPCs. These NPCs could have different faces, haircuts, eye colors, outfits, etc. I'm wondering what the best way is to handle this situation. These are the options I've considered: Design a spritesheet for every possible combination of feature. Let's say there's only 4 heads, 4 haircuts, 4 outfits and 4 "held items", that's 4x4x4x4 sprites, each of which would need multiple frames of animation. No thanks. Design a spritesheet per feature. One for the heads, one for the haircuts, etc. all partially transparent. Then use z-layers in CSS to overlay them into one complete NPC. Maybe there's some framework that I'm not aware of that would handle this more elegantly? Currently I'm considering option 2. I'd use a javascript function to determine whether this guy gets haircut 1, 2, 3 or 4, and use that variable to get the correct sprite. But I'm wondering if there is a 'tried and true method' for this. I might be really overcomplicating or oversimplifying things. I've only just started designing this thing so I'm not stuck on any particular framework yet. Any input would be much appreciated!