farflamex's Forum Posts

  • Outworld

    A vertical scrolling shooter with a bit of strategy thrown in. You must fend off the enemy bombers while simultaneously keeping your eye on your colony supplies. Mined ore can be spent on ship upgrades, oxygen supplies or new crew.

    This is my second C2 game, again a rewrite of a game that I'd written in code a few months ago. Another massive thumbs up to Scirra as this only took about 10 hours over a few evenings to put together (the graphics were already in place from the previous write of course).

  • Hi everyone,

    Been here a while, but never introduced myself and I'm keen to get the 25 extra points so that I can post links on the forum <img src="smileys/smiley36.gif" border="0" align="middle" /> . Mainly because I have 2 finished games already and I put one of them up on the arcade without a proper link and it never even got rated due to lack of plays.

    Have to say I'm hugely impressed with C2. Very easy to use, but the clincher is, it's powerful as hell. The two games I've written were already written in code a few months ago and I simply converted them over to C2 for practice. Since the graphics and ideas were already in place, it was incredibly easy and each only took a few hours to throw together, but most importantly, one of them actually runs far smoother than the code version I did. Currently working on a far more complex game although I may have got carried away and I think it may slow down a bit on older PC's

    <img src="smileys/smiley36.gif" border="0" align="middle" />

    Anyway, my name is Glynn, I've been coding since 1984 and have used many game creators along the way, but never stuck with one because they've all been so bad. Hurray for C2 <img src="smileys/smiley4.gif" border="0" align="middle" />

  • Works perfectly. Glad I asked on here because I'd gone stupid and was coming up with all sorts of bizarre solutions in my head. This is the obvious and simple way, thanks :)

  • Just thinking, would there a performance hit with this? Having an inactive layer sitting around in the background, while it's being processed, I assume the graphics are effectively ignored, even though the objects keep moving around?

  • Ah yes, layers, I didn't think of that. What I basically need is both screens to be 'active' at the same time. So I guess what I'd do is have everything for my menu screen on it's own layer and simply have it invisible while the main screen is visible, and vice versa? Whew, I was worried that I'd come across a real problem, but I think that will work :)

  • Am I right in thinking that whenever you switch between layouts, everything in the layout starts with it's starting values? I have a situation where I want to be able to switch between my main screen and a sort of 'management' screen. When I switch back to the main screen, I want everything to continue as it was. Is this possible, or will the switch go back to the beginning and if so, is there some way I can restore the positions etc back to how they were? I'm guessing I might have to use globals or arrays or something like that to save and reload the information?

    Also, when I'm on the main screen, I want to be able to take information from the management screen. Again, is this possible or does the management screen effectively not exist while the main screen is up?

  • Thanks, I couldn't really have individual events for each shield as it was more complex than just those calculations, so I needed to group them. After an evening of scratching my head, I finally worked it out. For anyone in the same position, the answer was indeed to use the 'For Each' command, although I had tried that earlier but couldn't work it out.

    My answer was...

    System : Every 0.1 seconds - No action

    Shields : Strength < 100

    (sub event)

    System : For each shields - No action

    (sub event)

    If enough energy, recharge the shields.

    The double sub-event solved it. Basically nothing happens until it gets through to the final event, and that event is specific to each individual shield, but now runs 4 times (or however shields need recharging) instead of just once, and recharging all shields in a single action.

  • Having trouble getting my head around this one.

    I have a spaceship, with 4 shields, aft/bow/port/starboard. I've put all of these into a family, with a family variable of health.

    10 times per second, I want to check these shields, and if they're not at full strength, they recharge, if there's enough power to recharge them.

    So my condition has 'Every 0.1 seconds. Shields - Strength < 100. Power > 1'

    Then the action is to recharge each chosen shield and drain the power from the ship. It works in one respect - each shield does recharge. However, the power is only drained once, even if all 4 are recharging. What I assume it does is, if the conditions pass, it does the action once - so if 2 shields are recharging, it recharges each shield, but it still only does the power drain once because it's only one action.

    So how do I get it to drained once seperately for each shield? I'd like to do them one by one, so that if for example, there's enough power to charge 1 up, but 2 require recharging, one will recharge but the 2nd won't.

  • I'm doing a space game. I've made a very nice background image with a bit of gas and some nice colourful stars. Since my game needs to scroll, I'm trying to work out the best way to add some parallax movement to that. When there are other objects on the screen, it's no problem because the movement against those objects give the illusion of movement, but when there are no other objects, everything appears static.

    I assume people have some experience with this, so I'd appreciate any thoughts on how to achieve the illusion of movement. I've tried a scrolling image of stars ontop of my background, but it doesn't look very good and it ruins the background image a bit. Also, because some of the stars are online 1 pixel across, they seem to flicker badly when the movement is <1 pixel.

    Another idea is to have some larger objects such as rocks which could continually fly past the screen, but I'm not sure how many would be needed to make it look nice.

    Does anybody have any examples or ideas?

  • Just to say that I've solved this. In case anybody has similar problems, the vectors are accessible, so you can use those directly. So in my case, I can move my background objects in the opposite direction as the vectors, which has the same result. E.G Set position of each object to 'Self.X-Ship.SpaceShip.VectorX' and the same for the Y coordinate.

  • If anybody is using this behaviour plugin, I need a bit of help. It's ideal for my game - I was attempting to use car movement for my spaceship but it's not really right. So I tried this and I like it, but I have a problem.

    For my game, my ship is always staying at the centre of the screen. Instead of moving the ship, all the objects around the ship are moved instead to give the illusion of movement. I just group them into a family and move them in the opposite direction and speed as the ship.

    This worked fine when using the car movement, but there's something about the spaceship behaviour I don't understand. Not sure if it's a bug or intentional or what to do about it.

    When you point your ship to the right and move right, you have a facing of 0 degrees, but a movement angle of 180 degrees (i.e the opposite direction). Similarly, when you move left, you face 180 degrees and move at 0 degrees. I think this is similar to some of the platform behaviour built in too. In other words, the movement angle isn't the direction you moved in, but the direction you came from.

    That would be no problem, except with the spaceship movement, when you move up or down, it's not reversed. When you move up, you have a facing of -90 (or 270) degrees and also a movement angle of -90. Down is 90 facing and 90 movement degrees.

    So I don't know how to translate this to my objects. I can't just move them in the opposite direction or the same direction as my ship as neither translates correctly.

    Any advice would be appreciated :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I know this is an older behaviour, but I think it's really promising for my game. I've come across a problem though.

    When my spaceship moves, I actually want the background to move, not the ship itself (the ships stays at the centre of the screen and the background objects move instead, to give the illusion of movement). This is fairly easy to do with normal movement - I just put all the objects into a family and move them along the angle of the ship. With the spaceship behaviour, I need to move them along the movingangle, but there's a problem.

    The moving angle is mirrored when you move to the right or left (right gives 180 degrees, left gives 0 degrees) but it's not mirrored when you move upwards or downwards (straight up is -90 or 270 degrees, straight down is 90 degrees). These are the same as the standard directions. So it's mirrored along the horizontal but not mirrored along the vertical. I have no idea how to translate that to my background objects.

    Is this a bug or is it supposed to behave like this?

  • It's because I was using a third 'else' event, to clear the text. The idea being, if event 1 or 2 fire, then it displays the object name, else is clears the text. But I guess I wasn't using else correctly as I was just using it as a seperate event at the bottom.

    Solved it by just clearing it at the top on every tick.

  • But if the mouse is only over the top of one of the objects, then surely only that event would fire? What's happening is, if the mouse is over the top of the object in the first event, it never fires at all.

    I understand that if the mouse is over both objects, it will simply fire on each event and the 2nd event will be the one that was executed last.

  • I'm trying to get a line of text to display text when the mouse is over certain objects. The event is fairly simple, just 'Cursor is over object', 'Set text... '. It works, but if I then put an identical event below the first one, only one event responds (the lower line). Any ideas why?