Excal's Forum Posts

  • Here is a live preview of what I mean:

    Space Game

  • I've recently begun the transition into making my game support multiple screen sizes.

    However, when the game scales to fullscreen in the browser, the text gets repositioned. This is most evident in the title screen, where the text gets shifted left when previously (see the non-fullscreen version here) it was in the center.

    Does anyone know how to keep the general position of GUI elements?

    ImpulseCollision.capx

  • Copy one of the game's layers and events into the other one.

  • I've updated the game so it is more fast-paced (and exciting).

    Player ship turning is now faster, and asteroids do not have to be destroyed to move on to the next level - only enemies do.

    Still having some issues with the ally ship AI being not as good due to 'pick nearest' being kind of slow.

  • Added a new feature: an ally ship will now spawn at the start of each wave, starting wave 3!

  • I also have this issue with my space game, as I've seen enemy ships fly into asteroids and blow up even though they are updating their paths every second and should be going around.

  • Does that work for multiple instances?

    Find Path to Object.X, Object.Y doesn't work if that object has multiple instances. Does 'pick nearest' work for instances?

    If so, then perhaps this is simpler than I thought!

  • I've been reading through this thread about UIDs and selection, but I'm not sure how I would loop through all the UIDs.

    In particular, I am trying to determine the distance from an object to every instance of another object and then save the closest one. This involves looping through every UID of the object and checking the distance.

    Does anyone have any idea how to do this?

  • Right now I have each enemy update the instance variable upon creation.

    For example, when an enemy is created, the EnemyID instance variable is set to its UID.

    Now I'm not sure how I would check which enemy instances exist on the current level (since they can be destroyed). Do you have any ideas on how I could check for that?

    UPDATE 1: I'm currently running a For-Each loop that (from what I think) should run through each EnemyID that is currently on the level:

    <img src="http://i.imgur.com/8NIZEPf.png" border="0" />

    Is this correct? Would this run through each enemy on the level? If so, then the next step is figuring out how to determine which enemy is closest to the ally ship. I have a variable called ClosestEnemy but I'm not sure how I would actually check for the closest enemy.

  • I think I get a better idea of it now.

    Basically each instance would have an instance variable. Each time an instance is created, this instance variable would increase by 1, this way each different instance has a different number for this variable.

    So in this case I would need to:

    -Check which instances exist on the current level.

    -Check the distance between the ally ship and each enemy ship.

    -Find a path to the closest one.

    Does this sound right?

  • Is there a way to make pathfinding prioritize one or any instance of an object?

    For example, in my space game I have multiple enemies that will be in different locations. When I have an ally ship spawn, I want it to focus one or any of these enemies and start chasing it. I have it set to find a path to Enemy.X, Enemy.Y, but since there are multiple enemies in play, the pathfinding fails to work.

    Is there a way to have pathfinding pick one particular instance of an object to follow?

    <img src="http://i.imgur.com/LEI7v3x.png" border="0">

    ImpulseCollision.capx

  • You're right, I need to set a condition for the health power-up to appear so people can't just idle during a level to eventually refill their health.

    I like the idea of spawning more enemies during a wave. Most likely I will have half the number of original enemies spawn after some time in a wave, rounded down so it doesn't become too difficult.

    The comet idea is interesting, and I'll definitely think about including it!

  • Update: Power-ups are now working! As long as you are in an active wave, there is a 2% chance a power-up will spawn. Once it does, you will have ten seconds to grab it. Note that enemies can grab power-ups too!

    Right now the only thing power-ups give you is health back. However, if an enemy grabs one he gets health back instead of you!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What do you think of enemies being able to pick up power-ups? This would create an interesting dynamic where the player races with the enemy ships to grab the power-ups.

  • Start with a prototype. If you have big ideas for a game, write them down somewhere and set it aside. Get a working gameplay prototype working because that is more interesting than a title screen or dialogue.

    Making the prototype means you'll have something cool to share with others and also something to get feedback on for modifying your 'big' game plans as you develop more ideas later on or think of things to cut.

    Basically, dream big but start small and with the part you would enjoy the most.