Debugging help

0 favourites
  • 8 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • I've solved most of my debugging issues by adding a new GUI layer and checking various object properties and watching how they update in realtime.

    However, there is an issue I am not sure how to test, and that is why my enemies are sometimes rendering off the screen. Perhaps this is a Firefox issue, as I haven't seen it happen on Safari (yet).

    You can play the latest version of the game build here.

    Enemies spawn only at the beginning of a wave, and the code that spawns them is:

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

    I have boxed the spawning code, and yet they still sometimes spawn off the screen and never show up (they have pathfinding, but when they spawn off the screen they do not move). I am starting to wonder whether it may be a bug with C2 itself, as there are no other events that spawn them off the screen. There could be a rare case where an asteroid spawns on an enemy and physics causes the enemy to move off the screen, but the enemies have the Wrap behavior and should show up on the screen anyway.

    Speaking of Wrap, the Wrap behavior isn't working on my enemies. I had to manually implement wrapping events. Possibly a C2 bug?

    ImpulseCollision.capx

  • At least the spawning problem seems to be caused your layout scaling, instead of 'Scale' you should use 'letterbox scale' or similar, take a peek at layout scaling stuff at manual/soem tutorial. Seemed to solve the problem for me at least. I'd imagine the wrapping issue might be caused by this as well.

  • I'm not a fan of letterbox scale because it causes black borders to appear. Perhaps this could be changed by adopting a 16:9 aspect ratio? Currently I'm running at 900x600, and letterbox scaling causes black bars to appear.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm not a fan of letterbox scale because it causes black borders to appear. Perhaps this could be changed by adopting a 16:9 aspect ratio? Currently I'm running at 900x600, and letterbox scaling causes black bars to appear.

    Check this tutorial for more info: scirra.com/tutorials/73/supporting-multiple-screen-sizes/page-1

    You should probably adapt your game to support multiple fullscreen resolutions if that is your intention.

  • At least the spawning problem seems to be caused your layout scaling, instead of 'Scale' you should use 'letterbox scale' or similar, take a peek at layout scaling stuff at manual/soem tutorial. Seemed to solve the problem for me at least. I'd imagine the wrapping issue might be caused by this as well.

    Just tried letterbox scaling, still having the enemy spawn off-screen in Firefox.

    I created an event that checks for the enemy being offscreen. Basically the event looks like this:

    if Enemy is onscreen, set Enemy.IsOnScreen to 1.

    if Enemy.IsOnScreen = 0 (it's zero by default), then

    -Every tick, set enemy position to Enemy.X + 1, Enemy.Y + 1

    It doesn't seem to work, however, because when an enemy spawns off the screen it's not coming around. I have my own custom wrapping code that is supposed to bring the enemy to the other side of the screen once it exceeds WindowWidth/WindowHeight or if X/Y is less than zero, but those aren't working either.

    Maybe it's just an issue with the latest version of Firefox (version 19.0.2)? This doesn't seem to have problems on Safari.

  • I just played your game.   It was fun.   If there was a glitch, I did not notice it...too distracted by playing. cool music.

  • Maybe use a different method for spawning altogether if it is an unfixable issue.

    Could set invisible markers around the environment (one at each corner for example) and each round the ships spawn from these positions.

    In-game this could be covered up with a graphic showing a wormhole, ship spawns and is propelled 64 pixels into a direction towards the player with a random add to the angle of + or - 45 degrees.

    This whole mechanic inturn tells the player, "ships will always spawn from these 4 points - best to keep away from them in future" and the random angle the ships fly out of each wormhole at least prevents the whole thing feeling too "uniform".

    (Part of the reason I'm suggesting this is because multiple times the ships spawned on me/too close to me, inflicting massive damage)

    Otherwise love the game, reminds me alot of that astroids game Activision released a few years back :)

  • Excal would like to check it out, but file isn't correctly linked

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)