procrastinator's Forum Posts

  • dl.dropbox.com/u/666574/crudemilk%20-%20light%20distance%20opacity.capx

    I've been having brainfarts all day, so I was lucky to get that far! It's not perfect, but it's a start I guess.

    Suffered a huge brainfart when trying to factor in a custom distance the player should be before it starts to activate. Maybe tomorrow, I'll figure it out, if you or someone else doesn't first!

  • You're welcome. Now go read some tutorials! Any problems, ask away. ;)

  • Yep variables. I did mention variables in my post but must've deleted that after editing to make it simpler to understand.

    You'd probably have a setup like..

    global constant variable TOOL_AXE = 1

    global constant variable TOOL_SCROLL = 2

    global variable toolSelected = TOOL_AXE

    Then you can test with..

    If toolSelected = TOOL_AXE ..

    It's practically as simple as that ;)

    EDIT> Although, I've simplified with just 2 "tools", you'd group tools together, like if you had a hammer, you'd probably set that to 2 and scroll to 3 or whatever.

    The constant means the variable can't be changed at runtime and makes for easier reading.

    And in the example above, toolSelected would actually just store the value of TOOL_AXE which is 1. It's much easier to read your code (as well as debug) that way rather than..

    global variable toolSelected = 1

    if toolSelected = 1...

  • ^ that's exactly what I was going to say! (yeah right) ;)

  • 1 & 2 - Simplified - "if player is overlapping block at offset (5, 0 )" and "toolSelected = axe" and "on mouse click" then start to destroy the block. 5 would check 5 pixels to the right on player, and -5 would check 5 pixels to the left.

    3 - Again, simplified - "if toolSelected = scrollScreen" and mouse down then scrollTo...

    4 - Of course it's possible ;) but right now, just get the basics in before going into advanced stuff like that. Create a prototype level of blocks and get everything working. Procedural generation can be implemented after everything is working. You're wanting to do stuff that seem to be more advanced than your capabilities. I mean, if you can't figure out how to smash a block, then you need to learn all that first. Check out the tutorials on this site. You'll learn loads from those in no time.

    5 - I think there's a multiplayer plugin, but haven't bothered with MP myself so can't really offer advice.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • GeometriX, no worries. I recognised the "stuck in a loop" grey box from stuff I was doing last night ;p

  • GeometriX, I did try to help not long after you created this thread, but it required the gravitation plugin, which I couldn't be bothered to search, download and install at the time. So, yeah, Joannesalfa is right, the plugin probably deterred a lot of people from helping out. I did install the plugin last night, but got distracted and forgot to check your capx doh!

    When I first ran it, it was stuck in a loop and crashed my browser... you might want to disable that WHILE event first. I'll let you know how I get on now that's fixed ;p

  • Whiteclaws, tsk tsk. How much help have you been getting over arrays from a lot of people? ;) I know you like to joke a lot, but it didn't seem so here. Besides, he wasn't asking people to make the game for him, just HOW it was done.

    I'd definitely have pinned that game as using arrays (thanks Wink for proving me wrong ;p). A nice little game actually that could be worked on more to produce something much more fun and challenging.

  • Happy hunting ;)

  • Yep, correct. It's just a single image with all the frames laid out in grid fashion.

    If you have 6x 64x64 images, you can lay them out how you want, 3x2 = 192x128, 6x1 (384x64), or even 1x6 (64x384) if you wanted. The importer just divides the image size by how many columns and rows you give it, thereby cutting the sprites precisely.

    Any art software will do. It's all about how the frames are laid out, the size of the image, and the columns and rows you give the importer.

  • The one what im trying to port was Braid's time rewind, isn't possible for HTML5?

    Of course it's possible ;) Instead of replaying the array forward, you step backwards, but it does come with complexity since you need to save time delays, animation frames etc.

  • If memory serves, your capx from before showed you understood them fine. What is it you don't get?

    Or are you looking for things to show their use? Like for example what you asked there, procedural generation with arrays? If you don't understand arrays, then you'll have a hard time with something like that, as you'd be trying to learn 2 things at once... unless you already understand PG.

    Let's start with what you understand about arrays eh? ;)

  • haha I'm only a PRO at procrastinating. You're welcome though. Glad it's what you wanted!

  • Yeah but you say your player disappears, so it sounds like something is up with your events and would be very hard for someone to reproduce.

    Are you sure you don't have the space bar assigned to do something with the player?

  • To keep it working with physics, set velocity is your only way really, apart from apply force which you've tried.

    Sprite Set Velocity to (Sprite.Physics.VelocityX, 9.1) would apply gravity.

    Gravity with events is essentially the same as set velocity, except physics would be messed up (collisions and whatnot).