Waltuo's Forum Posts

  • Hi, I have two problems.

    1) I need to check if there's sufficient free space for a sprite to spawn another object right next to it (horizontal, vertical and diagonal directions). So, if there's enough space and no existing sprite in that area, sprite will be spawned. If there is already a sprite in the immediate 64x64 pixel area (size of each sprite) next to the spawner sprite or there's not enough space for spawn in that direction in the layout, object cannot be spawned. Something like this: https://dl.dropboxusercontent.com/u/163 ... roblem.png

    Spawner sprite (also 64x64 px) should first try to spawn another sprite horizontally to its side (in its facing direction), then if that's not possibly try to spawn diagonally, then last vertically. I should mention game is not locked to a grid-based movement. How would I go about achieving this? I've been trying to solve this for two days now so any help would be greatly appreciated:)

    2) I have a sprite that's moving using platform behavior that I need to attach a weapon to. I can do this either by pinning it to the platform behavior sprite or setting the position of the weapon each tick. I don't want the weapon sprite to pass through walls, so I've given it a solid behavior. However, it still passes through the walls anyway and the solid behavior also creates another problem, preventing normal movement to the direction weapon is attached to. Here's an example capx:

    https://dl.dropboxusercontent.com/u/163 ... oblem.capx

    What would be the best/recommended way to fix this and have the weapon not affect the normal movement and also stay within the wall boundaries. I need a solution to have the platform sprite "respect" the collisions of the weapon and not be able to move any further in the direction weapon is about to overlap with a wall. Any ideas?

  • mattb thanks for sharing, it's appreciated!

  • How would one go about creating a button/switch tile in chipmunk physics that is pushed down when another physics object is on it and lifts back up after other object is not on it anymore? Do I need to set up some kind of joint for it to bounce back up or what would be the best approach?

  • LittleStain Thanks, I got closer and the angle is now correct but I can't get the end/width of the line to match with Object2 position. I must have something setup wrong here, can you elaborate a little more on how to implement it?

    Here's a capx of my attempt: https://dl.dropboxusercontent.com/u/163 ... rline.capx

  • How would one go about creating and maintaining a line between two objects on different layers with different parallax scrolling values?

    Currently I'm using code:

    System: Every tick -> LineSprite : Set position to Object1 (image point 0)

    System : Every tick ->

    LineSprite set width to distance(Object1.X, Object1.Y, Object2.X, Object2.Y)

    LineSprite set angle to angle(Object1.X, Object1.Y, Object2.X, Object2.Y) degrees

    Object 1 and LineSprite are on layer1 (parallax 100,100) while Object2 resides on layer0 (parallax 50,50) When the viewport scrolls the Object1 end of the line stays where supposed to but the Object2 end doesn't. Any ideas how to get this to work and how to adjust the line angle/width to get it to attach to correct Object2 position (even when the layout is scrolling)? Thanks!

  • mattb That looks great and will no doubt help me in understanding how to use physics instead of platform behavior in my project! I will definitely be studying this, thank you!

  • Thank you R0J0hound and Prominent . I'll try and compare both methods, but I think you're probably right and going physics all the way is the best way to go. I'm new to Chipmunk Physics so it's all quite intimidating and I will need to find good tutorials / examples to get started, but if I can get it to work it should help fix a couple of other problems I'm currently facing with my game idea. Thanks again!

  • I will eventually, but I just updated to r214 like 4 days ago and I have some urgent work to do for today, so that will have to wait for now:)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I can't open the capx by RamPackWobble right now (on r214 here) so I don't know if this was already suggested, but one thing you could do to give it a nice little extra is to adjust the glow sprite size/opacity by either events, animation frames or giving it sine behaviors (maybe even mix of them). So it'd vary from full size to 85 percent, from opacity 15 to 10 etc.. depending on the look/lamp type and strength you're going for.

  • Are there any examples of switching between chipmunk physics and standard platform behavior (for player character) as needed? Is this feasible or is it just best to forget it and stick with either no physics at all or try to build everything with physics objects and have them enabled all the time?

  • Ok, I understand what you're saying and you're right, features and implementation are what counts here and not the gameplay (which should be adjusted by users to fit their own projects anyway). The template looks good, I was just tempted to try it out after seeing the video. Good luck with the project, it's obvious a lot of time was put into this and you deserve to see some sales!

  • Just a quick confirmation, the Store link is now working!

  • I second that, playable demo would be nice.

  • Are you sure your collision box/points for anim frames (and wall) are set up to proper size?

  • Thanks for the reply. I've come to conclusion it's probably best to just try put all the objects needing opacity change on the same layer to get the desired effect (without them showing through each other if overlapping)..