Asmodeus's Forum Posts

  • I've switched computers so I'm setting up C2 again; my system is missing the Sprite Button plugin and I've been on the site for almost an hour, unable to find the plugin again.

    Anyone got a link?

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I answered my own question.. In that capx I provided, just change Touch.Y to Touch.Y("HUD")

  • The following capx file is just a scrollbutton and a camera that you can move with the arrow keys. Can someone explain why setting the Scrollbutton.Y (which is on the HUD layer) to Touch.Y is being offset when you use the arrow keys to move the camera along the Y Axis?

    dl.dropboxusercontent.com/u/7439411/scirra/scrollbar%20example.capx

    Note: With the new Debugger feature, look at the global variables, the touch variables, and the Scrollbutton.Y and compare.

    I've tried LayerToCanvas and CanvasToLayer and nothing seems to fix this issue.

  • As a seasoned programmer I find it difficult to accept this kind of setup where, in a loop, you create multiple objects but you can only apply changes or reference the variables of the first one that is created until the next top-level event.

    This effectively means that we need to waste CPU cycles re-picking and reiterating over the collection just to get an "atomic" action done such as initializing a collection.. I know it's not really atomic but I think of that as a single conceptual unit of work in game development.

  • Very clever implementation Zatyka. I think I might prefer it over a plugin if the performance is good.

  • Ahh, I'll try that out thanks.

  • It seems like a common game object in most projects, but neither Text nor TextBox really provide the functionality of a scrolling text object.

    Let's say you're making an RPG like Baldur's Gate and you want a text log of all the events as they happen in the game:

    Wizard casts magic missile at the darkness.
    Darkness takes 0 damage.
    A Pit Fiend emerges from the shadows.
    

    As text continues to fill the window, you run out of space and suddenly need a scrollbar. Is there a straightforward way to do this in C2?

  • Is there a preferred socket technology to use with Cocoonjs / Android?

    We have a super simple node.js server using websockets, and it works perfectly with the Scirra desktop app, but both Android phones crash shortly after the app is run. The app was able to send a couple of messages, but it doesn't display any received messages before the crash.

    The Android phones we are using run Gingerbread and Jelly Bean OS's.

  • Hey RangerJim, which language do we set the repository to? Javascript? XML? Thanks :)

  • Alright, so if I spawn an "itemdrop" object that keeps track of 4 "bouncepad" objects every time a monster is killed, the game performance grinds to a halt after about 10 itemdrops are on the screen.

    The "bouncepad" object is basically just an invisible sprite object that the items are registered to bounce off of, so it makes it look like you have 3d physics. Each bouncepad receives a random Y position near the enemy's last x,y coord.

    There's got to be a way to optimize this.

  • Alright, now how do you set the size and expected resolution?

  • Your design has motivated me to try an alternative using the bullet behavior as described above and it seems to be working somewhat so far.

  • Well, ideally I want to avoid using collision objects in favor of randomly generated Y coordinates as the bouncing axis for an arbitrary # of items.

    However, I might be able to borrow the bullet idea if I decide to go the route of creating 3-4 invisible sprites at slightly randomized Y locations about the base of the enemy's sprite. Then I'd have to ensure that different items only bounce against specified sprites.

    Which method do you think has more performance overhead?

  • Imagine you want to drop a load of coins on the ground in a top-down, 2d world using 2d physics. How would you do it?

    Attached is a capx showing several attempts I've made to bounce an object a set amount of times on an arbitrary Y coordinate.

    The advantage to setting Y coordinates as collision axis is that you can create 5 coins that randomize where this Y collision will be and each bounces in a unique place. If you tried to do this with invisible immovable physics objects, you would not get the desired FX.

    bouncingObject.capx

    Tips: try increasing and decreasing the bounceStrength instance variable of the green physics ball. The blue ball is just a graphic that is pinned. In a real game you'd probably make the physics object invisible.

  • 'doh, thanks. Will try it later. Also noticed that I need to manage the size of the array..