R0J0hound's Recent Forum Activity

  • Images are saved to spritesheets to save VRAM in C2:

    http://www.scirra.com/blog/87/under-the-hood-spritesheets-in-construct-2

    Music and sounds likely take the same amount of space as their file sizes. There is no need to fully decompress an audio file in memory. Only the bits of the sound that will be played soon are decompressed and sent to the sound card to be played.

  • The 0:7 is the column:row in th .fx file of the error and "No precision specified for (float)" is the error.

    I found this page that seems relevant:

    http://learningwebgl.com/blog/?p=2507

    Add this line to the top of your shader and it won't assert.

    precision mediump float;

    Hope that helps, from best I can tell this is a subtle difference between webgl glsl and opengl glsl.

  • Here is a capx of the methods I wrote about:

    http://dl.dropbox.com/u/5426011/examples14/destroy_oldest.capx

    I personally like the instance variable solution, it's very clean.

  • Like this?

    +sprite: platform is on floor

    +sprite: Is overlapping bouncy at offset (0,5)

    --- sprite: set platform vector y to -500

  • countofquad

    In regard to this Q:

    he reason that I'm concerned is what would happen if Object A's OnCreated code contained a Spawn Sprite statement for SpriteC. Would SpriteC be in the SOL at the point of Line 4?

    SpriteC would not be in the SOL. The "on created" trigger only has the newly created object picked. It does not effect the SOL of the event it was created from.

  • Remove the "wait 5 seconds" and only 5 will be created. With it you get a continuous stream of 5 planes a tick for 5 seconds.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The solutions work fine since the objects are created at runtime. Ashley's quote refers to not being able to assume iid or uid of an object in the editor.

    At runtime once an object is created it gets a unique uid that remains the same for the life of that object. IID's at least in this situation are 0 for the oldest increasing in order to the newest. Changing the ZOrder, layer or deleting a mid aged instance (with some older and some newer) at runtime may be cases that might scramble the iid order, but I would have to test those cases to verify.

  • 1. Add a sprite of your pendulum.

    2. In the image editor move the origin to where you want to pivot.

    3. Add the sine behavior to the sprite.

    4. Change "Movement" to "Angle".

    5. Profit

    6. Tweak settings to your liking.

  • The oldest sprite will have the lowest UID and a IID of 0.

    Here is one way to do it:

    +on key pressed
    ---+system compare: Sprite.Count>=2
    ---+System: pick instance 0 of sprite
    ------ sprite: destroy
    ---+every tick
    ------ system:create sprite

    Another way is to give the Sprite an instance variable "age" with an initial value of 0.

    +on key pressed
    --- sprite: add 1 to age
    --- system:create sprite
    
    +sprite: age>=3
    --- destroy sprite
  • Wastrel

    I like your idea, I was trying to figure out a way to parse sentences and you pointed me in the right direction.

    I used a slightly simplified approach by using pattern sentences:

    eg.

    take 1

    open 1

    unlock 1 with 2

    The sentences the player types needs to match one of those with the numbers replaced with object names, otherwise it will say "i don't understand" or "I don't know what 'foo' is".

    Besides the parsing the game logic is made simple as possible. The command and object names are put into global variables so there are no "tokenat" expressions cluttering it up. The end result is the bare minimum number of conditions to do game logic.

    ex.

    object="key":

    --inventory has "key":

    ----set text to "you already have the key"

    --else

    ----set text to "you take the key"

    ----delete "key" from room_objects

    ----add "key" to inventory

    The room objects and inventory are dictionaries. I didn't implement it but room changing is as simple as changing the room objects. You could add room persistence by storing the AsJSON of the room objects somewhere when leaving the room. A save would consist of the room objects of each room and the inventory asJSON.

    Only about 15 events for the sentence parsing, the rest was for game content (~30 events).

    http://dl.dropbox.com/u/5426011/examples14/text_adventure.capx

  • Use a variable:

    Global number repeat_count=10

    -repeat_count=10

    -every 0.5 Seconds

    -> create Object

    -> subtract 1 from repeat_count

  • Here is the capx: http://dl.dropbox.com/u/5426011/bug/bug_toplevel_event.capx

    It occurs from r100 on and it relates the breaking change with object creation.

    When I create an object at the "start of the layout" and I create another "start of layout" below it I can't pick the object.

    start of layout:
    --- create sprite
    
    //isn't this a toplevel event?  The created object does not rotate.
    start of layout:
    --- rotate sprite 45 degrees

    It may be an issue with triggers because if I replace "start of layout" with "tickcount=0" it works correctly.

    tickcount=0:
    --- create sprite
    
    //The created object is rotated.
    tickcount=0:
    --- rotate sprite 45 degrees

    Also as a secondary issue it seems that groups act as empty events so that there never is a toplevel event in a group.

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 155 followers

Connect with R0J0hound