fisholith's Recent Forum Activity

  • Very good point.

    Thanks again

  • Hey all,

    I'm not really sure what to do here. :/

    I recently created a few games for game jams, and I just found that one of them was taken from GameJolt (where I hosted the game) and uploaded to AtomicGamer.com (which I'd never heard of until minutes ago).

    No one contacted me to request permission, or even to just tell me that they were doing it, and my game is now being hosted on AtomicGamer.com, with no attribution to me. No developer is listed, and no credit is given. I don't know why that information wasn't simply copied from my GameJolt page, since my entire game description was copied verbatim from the same page that lists me as the developer.

    What concerns me even more is the considerable difference between how I released my game, and how AtomicGamer.com is hosting my game. I released my game for free, with no registration of any kind required to play it, and yet...

    AtomicGamer.com is offering a download of my work, without crediting me, and placing the download of my game behind a queue timer on their server, and in the download popup, AtomicGamer informs you that you can bypass the queue timer, to download my game immediately, if you pay them money.

    I don't want to assume there's any malicious intent here, it may just be a mistake on their part, and I try to give people the benefit of the doubt, but I haven't been releasing games for very long, so I don't know what to think.

    The whole thing makes me uncomfortable. :/

    Any thoughts or suggestions are welcome.

  • Thanks for the info <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    Do you have any advice on which way to go if I want my list/tree interactions to be fast?

    1. I think arrays could work, if I link them together to form more complex structures. The first thing I was considering building was a plugin like the C2 Dictionary, but with each key linking to an array/list instead of a single value. That said, hash tables are actually closer to what I was looking for, so objects might be a good approach as far as performance goes.

    2. Good to know. Yeah, JQuery looked like it was mostly aimed at DOM traversal and other webpage-y stuff.

    3. JSON would be pretty nice if its not too slow.

    1a. Do you know off hand if deleting a property from an object is likely to change its performance?

    Quite a while back, I read about interpreter optimizations that assume that objects are usually used for OOP, for which property deletion is unlikely. With interpreters being optimized for that purpose, interaction with an object takes a permanent performance hit upon the first deletion of a property from that object.

    The only thing I could find about this was a discussion of the Chrome engine from 2009, so it may not be an issue any more:

    (see time 8:16) http://channel9.msdn.com/Shows/Going+De ... al-Machine

    3a. How fast is JSON compared to using objects for data structure purposes?

    For instance, with JSON, I'm not sure if the underlying code is moving between nodes by following references, or if it is actually parsing its way through large segments of JSON text. I would think that parsing text would be the slower method in general, but even if JSON is doing everything via text, for all I know it could be getting some kind of special treatment by the interpreter.

  • Hey all, <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    I'm considering creating a plugin/behavior that provides linked-lists or tree-style data structures.

    I'm okay with building a list system from scratch if necessary, but if there's any list-type stuff natively accessible from within the C2 runtime, I'm also happy to just use that and avoid reinventing the wheel.

    So if anyone knows off hand...

    1. Does JavaScript have native data structure functionality or libraries?

    2. Does jQuery? (available from C2 runtime I think?)

    3. Should I consider using JSON?

    4. If "yes" to any of the above, are they usable in the C2 runtime?

    It looks to me like there may be generalized data structure tools available natively in JavaScript, and possibly JSON stuff in the standard library.

    (e.g. see "Keyed collections" https://developer.mozilla.org/en-US/doc ... structures)

    But I don't know if it's usable in the C2 runtime, as I'm not sure if there are any important support issues with different versions of JavaScript that I should be aware of.

    Any thoughts or advice welcome. <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • Awesome! Thanks for the info volkiller730 and ASHLEY.

  • Hi all,

    1. Does anyone know if an Xbox One controller will work with C2?

    2. If it does, are there any weird possible pitfalls I should be aware of?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey Ize, <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    The color change effect you're seeing in the waterfall is coming from the "Lens" effect on the WaterfallTintParticle object. The Lens zooms the background, but it does so relative to the center of the window area, no matter where the effected object is. As far as I know that is the intended behavior for the Lens shader. It gives you a consistent 3D zoom kind of effect across multiple objects regardless of where they are on the screen.

    To your other question, yes, you could modify the shaders yourself to get the behavior your looking for. As Ashley mentioned this can get a little complicated. If you want to counteract layout translation, rotation, and scaling, you'll need to have parameters that allow you to feed the current translation, rotation, and scale info to the shader. Since rotation and scale will have a center point that they are rotating or scaling around, you'll have to have parameters that allow you to feed in those cords as well. But it is doable.

    What complicates things is that C2 will sometimes automatically account for the translation, rotation, and scaling of an object when rendering shaders, and other times it won't.

    To easily see an example of this,

    1. Create a new project.

    2. Create a red square, and add the "Scan lines" effect to it.

    3. If you rotate the square, you'll notice that the lines rotate with it.

    4. Leave the square rotated to a diagonal angle.

    5. Now add a "Multiply" effect, and place it *above* the "Scan lines" effect, in the effect list.

    6. By being the 2nd item in the effect chain, the "Scan lines" effect no longer rotates or translates with the object.

    What you can't see with the "Scan lines" effect is that scale is also no longer driven by the object.

    If you want to modify an effect to make it completely immune to those issues, you'll have to account for this sometimes-on sometimes-off behavior in your modification as well, and provide a parameter that allows you to disable some of your translation, rotation, and scaling parameters, so that you don't *double* account for those transformations in cases where C2 is already doing it automatically. Also the Y axis is upside down for effects from slot 2 onwards, so you may need to handle that as well, depending on what kind of directional aspects the effect has.

    If you just want to try adding in a pair of translation parameters, which might be enough to solve the translation issue you're seeing in the ripples, parameters are set up in an effect's .xml file. The parameters can then be used as variables in the shader code of the effect's .fx file.

    This website http://shdr.bkcore.com/ is an in-browser GLSL editor, and a handy way to test proper compilation of shader code, before trying to open the shader in a project.

    One really important thing to know when working in GLSL code, is that, unless you explicitly want a number to be an integer, you must add a decimal point and decimal digit to it, even if the digit is zero. (e.g. Use "27.0" NOT "27") It's weird, but it's one of my most common bugs when I'm coding shaders.

    The Construct 2 SDK has a template effect that describes how the various parts of the two effect files work. https://www.scirra.com/manual/15/sdk

  • Hey again TGeorgeMihai.

    I'd actually assumed you wanted it to be a layer relative grid, though I didn't realize you were also interested in using a TileMap.

    What I was originally thinking was that you could paper over the object's bounding box with grid tile objects (aligned to the layer), and then, with a single condition, remove the ones that don't overlap.

    With a tile map, you'll need to use an overlap-check object like Aphrodite suggested. Though you can still use the bounding box method I described, to search only the area over the circle's bounding box, instead of the entire tile map.

    Although instead of looping over the bounding box to remove non-overlapping tiles, you would simply add overlapping tiles. That's because there's no way to remove all non-overlapping tiles with a single condition, when using a TileMap object. (Which is not a bad thing at all, TileMap is actually more efficient for what you want, it just doesn't natively support collision checking, as far as I know.)

    So, I also built an example capx, though Aphrodite beat me to it. :3

    [attachment=0:1cjpbdsi][/attachment:1cjpbdsi]

  • Hey TGeorgeMihai,

    You could try covering the circle's entire bounding box with a solid grid of squares, (using a pair of nested X Y loops). Once you're done, destroy any squares that are not overlapping the circle. You should be left with only the overlapping squares.

  • No problem, glad I could help.

  • Hey Kan,

    I think there are two problems you might be encountering.

    1: (see line 2)

    "On touched" is a triggered condition, not a per-tick condition, so when it is triggered, it will only simulate the up movement for a single tick, and then stop until it is triggered again by a new touch. By contrast, holding down the up arrow key on the keyboard, is the equivalent of executing the "simulate up movement" action every tick (every frame), for as long as the key is held. (You can recognize triggered conditions, by the green arrow icon that always appears next to them.)

    2: (see line 5)

    For the condition, when the player is "jumping", AND while Keyboard Up arrow is NOT pressed, the corresponding action is cutting your upward speed in half every tick (60 times a second).

    This isn't an issue when using the keyboard controls, because you actually are holding down the up arrow key when jumping.

    However, it *is* an issue when "touching" the up button in the game, because you are now not holding down the keyboard up arrow key, so your upward speed is getting cut in half every tick because of that event.

    Try the following...

    Line 2:

    Change the condition

    "? On touched arrow_up"

    to

    "Is touching arrow_up"

    Line 5:

    Find the event containing the condition shown below, and disable that entire event, (not just the condition):

    "? Up arrow is down" condition (line 5).

    That should make the jumps identical, but now you can't make a small jump.

    To fix this, enable the line 5 event again, and split the "? Up arrow is down" condition into its own subevent (under the "Platform is jumping" event), and move the action onto this new sub event.

    Finally, to the new subevent, add the condition "Is touching arrow_up", and then invert that condition, to create "? Is touching arrow_up".

    Now your upward speed will only be cut short if, you're not holding the up key, AND you're not holding the on-screen up button.

    Hope that does what you're looking for.

  • Hey noisetank,

    Lets assume our number is stored in a variable named "num", and we want to format it as an integer part, always followed by two decimal digits, even when either or both are zeros.

    There are a few ways to go about this.

    The method I'm showing below converts the number to text and then inserts a "." into the correct spot.

    We create a text variable named "digits".

    digits = zeropad( round( num * 100 ) , ( 2 + 1 ) )

    Formated string = left( digits , ( len( digits ) - 2 ) ) & "." & right( digits , 2 )

    Done.

    To make it clearer what is going on in the above steps, I've created two examples below that show the evaluation of the expressions from beginning to end, so you can see how each part of the expression works.

    Example #1

    If num = 888.123

    digits = zeropad( round( 888.123 * 100 ) , ( 2 + 1 ) )

    digits = zeropad( round( 88812.3 ) , ( 2 + 1 ) )

    digits = zeropad( 88812 , ( 2 + 1 ) )

    digits = "88812"

    Formated string = left( "88812" , ( len( "88812" ) - 2 ) ) & "." & right( "88812" , 2 )

    Formated string = left( "88812" , ( len( "88812" ) - 2 ) ) & "." & "12"

    Formated string = left( "88812" , ( len( "88812" ) - 2 ) ) & "." & "12"

    Formated string = left( "88812" , ( 5 - 2 ) ) & "." & "12"

    Formated string = left( "88812" , 3 ) & "." & "12"

    Formated string = "888" & "." & "12"

    Formated string = "888.12"

    Example #2

    If num = 0.071

    digits = zeropad( round( 0.071 * 100 ) , ( 2 + 1 ) )

    digits = zeropad( round( 7.1 ) , ( 2 + 1 ) )

    digits = zeropad( 7 , ( 2 + 1 ) ) // This zero pad makes sure we have at least 1 digit in the 1's place, even if it's a "0".

    digits = "007"

    Formated string = left( "007" , ( len( "007" ) - 2 ) ) & "." & right( "007" , 2 )

    Formated string = "0" & "." & "07"

    Formated string = "0.07"

    Hope that helps.

fisholith's avatar

fisholith

Member since 8 Aug, 2009

Twitter
fisholith has 1 followers

Connect with fisholith

Trophy Case

  • 15-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

19/44
How to earn trophies