SoldjahBoy's Recent Forum Activity

  • Bound your enemies or objects with events instead of using solid objects to bounce from.

    If they exit the viewport by 1 pixel then have them change direction by something like (self.angle-random(170,190))

    Is this what you want to happen?

    ~Sol

  • Getting a 404 error when trying to download your capx

    ~Sol

  • I think you may be hitting hardware limits here. Most keyboards are only designed to accept the buttons being pressed simultaneously under a certain limit.

    A cheap keyboard may only allow 3 at once, where a gaming keyboard may allow 8 or 10... if you have multiple people using the same keyboard (local multiplayer) then that could be affecting your problem here.

    ~Sol

  • Yeah maybe test for overlap at offset with the wall tile - so you might need to check in a radius or each direction in a square.

    If offset is compared at say X + 1 (or even X+2) then move light to self.X-1

    Do this for each direction or use some trigonometry to calculate the radius

    That should work, I think!

    ~Sol

  • What device are you testing this on? It doesn't look like it should be causing ANY problem for fps, at least as far as I can tell from the events you've shown.

    What size are the sprites you're using? Is this all lo-fi graphics or more HD style?

    ~Sol

  • With a state machine you can jump to any portion of the sate machine you want.

    Using my dirty-example above all you need to do is have a couple of extra conditions on the state change like;

    [On Touch]

    [Room1State=0]

    --- Activate room

    [On Touch]

    [Room1State=1]

    [Touch is on power-up object]

    --- Collect Power-up

    --- Set Room1State to 0

    [ELSE]

    --- Set Room1State to 0

    I guess my pseudo code isn't exactly accurate to your specific circumstance, but it would be the method that I would use if I were trying to achieve what you're trying to build.

    Basically by having a state machine - and comparing the touch position (is it within X distance to the powerup) you can control which "thing" the player is actually touching on. You may also find this can be solved by making the bounding collision box of your power-ups larger - because from memory, it shouldn't "click through" anyway - but it's been a million years since I've made anything for a touch device (so I wouldn't go by my terrible memory of things).

    Think of the state/gate system as a fail-safe. If the power-up exists in a room then the state is 1... but if the player presses on the room and the power-up coordinates are far away from the touch position, then set state to 0 and the player is activating the room itself, otherwise it stays as 1 and collects the power-up then goes to 0.

    I hope this makes it a little clearer.

    ~Sol

  • How close do you have to get to the wall before it pushes through?

    Maybe you can extend the collision box for your character so you can't get super close... or move the light object "back" a couple of pixels?

    ~Sol

  • Wow that's a pretty nice effort, and a lot of data analysis...

    Good job!

    It's always going to be difficult to get exact frame rate independence with behaviours - since by default the behaviours use some built-in form of 'dt'.

    I think the only REAL way to do this is to create a COMPLETELY custom movement system (moving, jumping, crouching - everything) without using ANY behaviours at all. You then have complete control over your fps independence.

    ~Sol

  • How are you creating your enemies? In a loop? One at a time over X seconds?

    How complex are the enemies? Are they made of several parts, or just a single sprite? Are they effect heavy?

    How many other objects are in your layout? Are those effect heavy or doing complicated movements/animations? What is the total object/sprite count?

    To give more accurate information we need to know more specifically about the problem. There is likely a bunch of ways to optimise the events to make it run smoother - but without knowing more, or having a capx or even an event sheet screenshot to look at, it's difficult to really say for sure.

    ~Sol

  • It's probably my bad explanation, sorry guys.

    I'll try and explain best I can.

    Imagine a top down view of a building (including garden around it) where you can tap on a room to set it to active to kill monsters that are trying to get into that room from the garden. The idea being you have to chose carefully which room you want active when others could be under attack as you can only have one room active at a time, so keeping the chosen room as active is really important.

    Now, randomly spawning anywhere on the map are power ups that the player can store and use in emergencies. They tap on these, the sprite disappears and their power up total gets increased. They can then tap on the use power up button and apply it to whereever they see fit.

    The problem is, when a power up appears over the top of an inactive room if the player taps the power up to collect it it also activates that inactive room, which spoils the game horribly if you've set a certain room active to defend the house. Flip side is I still want the player to be able to select that or any other inactive room, which means disabling room selection isn't an option. This is cause sometimes you need to activate a room first before collecting the power up when under pressure (or to not collect the power up at all if you've reached the power up storage limit).

    I think that should all make sense

    Thanks!!

    What I said above still applies. Making a logic gate or state machine for your room selection would solve your problem.

    ~Sol

  • Yes the "default" direction (angle 0) for any sprite is facing to the right. If you create your sprite facing any other direction to this, then it won't move facing the direction you want it to.

    ~Sol

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • [quote:1fpk7ntn]We are not here to make your game for you.

    You hurt my feelings guy. LOL <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    [quote:1fpk7ntn]Make the level and fill it with blocks to avoid then make an invisible Sprite that travels up the screen at a set speed and give it the behaviour scroll to

    You helped a lot. Thank you all.

    Sorry for bad grammar.

    Here is my little contribuition for the community: An example showing how do it.

    https://drive.google.com/file/d/0B-StK2 ... sp=sharing

    Sorry to be the bad guy, but it wasn't so hard was it?

    Good work!

    ~Sol

SoldjahBoy's avatar

SoldjahBoy

Member since 2 Apr, 2008

Twitter
SoldjahBoy has 3 followers

Trophy Case

  • 16-Year Club
  • Email Verified

Progress

17/44
How to earn trophies