benji720's Recent Forum Activity

  • Put the UI and game elements on different layers and scale just the game elements layer, not the entire layout.

  • tokencount tells you the number of "tokens". '1|2|3|4' has four tokens. '|' isn't a "token", its the numbers that are tokens.

  • Hi

    This has me stumped.

    I can use Multiplayer on the one layout fine (in fact, its great!). The Host spawns the objects and uses sync to "control" them on the client.

    But how do you use Multiplayer across different layouts? Lets say your game has two layouts (levels, worlds, whatever) and the host/peers switch between them. The idea of using the Host to spawn and sync objects stops working.

    Any ideas how to overcome this?

    Ben

  • Thanks. I worked out a way to do it with Families. Basically adding sprites to a family gives you the ability to "pick by UID", which is all I needed. Not sure why you need to use a family to access "pick by UID", but there you go.

    I got the solution looking at the rope examples around the place.

  • I have a game with lots of instances of the same sprite. They all have the physics behaviour. When they collide, I'd really like them to stick together ... but I always end up with a expression that looks like "On collision with Sprite ... Add revolute joint to Sprite", which doesn't work (because I can't work out how to select two different instances of the same object inside a loop).

    Below is a non-working example of what I'd like to achieve. The two balls should hit each other an join together in one physics object.

    (Apparently, even though I've got a paid licence I can't post links ... so sorry I can't post an example...)

    Any ideas on the best way to achieve this?

    Ben

  • OK, thanks.

    No big deal anyway, just seems I need to go back to creating 'sprites with 500 blank images' ! http://www.scirra.com/forum/create-a-sprite-with-blank-frames_topic54439.html )

  • Apparently its by design... all objects and instances of s sprite (and tiled backgrounds) share the same image stack. If you LoadfromURL at runtime in one object they all change.

    Back to one sprite with 500 blank frames :)

  • Hi

    The sprite "load from URL" loads the same image into all objects create from a sprite object. It should load the image only into the target object.

    For example, creating 10 sprite objects and loading a different image into each will result in all 10 objects displaying the last loaded image (rather than 10 different ones). See:

    <img src="http://visual.tmarque.com/bug/1.png" border="0">

    results in:

    <img src="http://visual.tmarque.com/bug/2.png" border="0">

    (the actual image displayed changes depending on which is loaded last).

    Here is the capx:

    test.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I still can't get this to work correctly - I'm lodging it as a bug

  • Glad it's not just me :)

    How did you force a redraw of the image? I do all sorts of re-positioning and scaling but none of that seemed to make a difference.

  • Thanks for the reply.

    I tried what you suggested first and unfortunately when you do it only the last created sprite keeps its image while each other sprite turns to a black box. You can actually see each individual sprite get its image then turn black as the next instance of the sprite gets its image. It had me scratching my head for a long time and eventually I just gave up with that method!

    (I'm rendering the images as a 3D point cloud with server side mip-mapping... so yes, all 500 do fit on the screen at various levels of detail)

    No big deal if you can't think of a better way. The memory usage doesn't seem too bad given what I'm doing.

    (BTW - I'm really enjoying Construct2, especially the plugin architecture. Just the right level of complexity at each level of the process.)

  • Yes, it does seem a little weird hacky way to do things.

    I'm using C2 to display image search results. Ive got everything working with the search request, Ajax loading the results into a dictionary and rendering the results to different visual structures on screen.

    The only issue i have is to use the "load from URL" on the sprite object the animation frame needs to already exist. The maximum number of search results is 500 so at the moment it seems like i need to create a sprite with 500 frames to allow me to dynamically load whatever search results come back.

    Hacky - yes. But other benefits of C2 make up for this little issue :)

    Any ideas how to do it better?

benji720's avatar

benji720

Member since 14 Jul, 2012

None one is following benji720 yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies