Lazernaut's Forum Posts

  • Hello everyone. I'm looking for input.

    I want to see if it's possible to create a game similar to this old game for Nokia phones:

    youtube.com/watch

    I want to have clouds, birds and other things in the level though. I've been thinking that I'd make every sprite have a variable that determines its position:

    x = horizontal position, relative to the frame

    y = vertical position, relative to the frame

    z = altitude

    I was thinking it might be possible to set all objects' position and size (the further away from the player's view, the smaller the object).

    Even with no scrolling involved I would have to take distance into consideration. If an object is far away it won't move so much on the x and y axis, but if it's closer it has to move a lot.

    I'm stumped so does anyone have any good tips in that might help?

  • You're welcome :)

    In case you're curious, this is how I did it:

    <img src="https://dl.dropbox.com/u/2776515/c2_bugs.png" border="0" />

    I learned something from you as well. I hadn't considered the thing you've done, taking a large image and scaling it down for the sake of better graphics when the sprite is rotated.

  • Here's a different approach.

    The short version is that every tick a small infection "zone" is created on top of each infected bug and then destroyed after 3 ticks (determined by infectionSpread's "life" variable). If the infectionSpread object overlaps a bug it's infected.

    It's probably also a poor way of doing it, but I think it's better than my first idea.

    Hope you can use it!

    dl.dropbox.com/u/2776515/Bug_test%20%28ebbc%29.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ah now I understand completely what it is you want to do, and I also understand why you're having problems.

    What about simply having 2 sprites? One that's infected and one that isn't. Then, when an infected one hits another, you simply destroy the healthy one and replace it with an infected one and transfer the healthy one's angle, position etc. to the new infected one?

    It's crappy code but it might work :P

  • I'm not sure. If a deflated ball hits an inflated ball which ball decides what should happen to the other ball?

  • This should work:

    <img src="https://dl.dropbox.com/u/2776515/c2_pick.png" border="0" />

  • Perhaps you could make an HTML file with 2 frames. Have the top from include your game, and the bottom one the Facebook part.

    For help with that you should check Facebook's documentation as I don't really think it's a Construct 2 issue.

  • How is your facebook application hosted? If I remember correctly you have to tell Facebook where your files for your application are stored. For example, I would probably host my files at ebbc.dk/fbapp . Then Facebook knows that files from this place are ok. Since your game is hosted at a different place than your other files Facebook likely thinks there's a security breach. I have no idea if there's a way to fix it. Maybe if you host the game on your own server?

    Not sure if this will help in any way, but I tried :)

  • This isn't a definte answer but hopefully something you can use. You may want to look into containers. A container is something that contains other objects. When you create the parent object, its children are created as well automatically.

    I'm thinking maybe you can make a parent object that's invisible (like just a box or something to make collision detection proper), and then have each body part be a child.

    You could add a behaviour for the body parts using physics, but only have the physics be enabled if the body part is hit, so as to make it fall off or something.

    Hope that was the least bit helpful :)