dop2000's Forum Posts

  • I think Box2D Asm and Box2D Web are pretty much the same. And Chipmunk is pretty much completely different

    It has its own advantages and disadvantages, I'm sure you can find all information in this thread:

  • Well, you can add a loop "Repeat 1000000 times" or something like that on every tick to slow your game down.

  • You can't do this with standard C2 events, but it's possible with JS code.

    Here is a somewhat similar plugin that detects faces in images.

    viewtopic.php?t=72970&start=0

    https://github.com/JohnnySheffield/C2_P ... facedetect

    If you are familiar with JS, you can probably modify this plugin for color detection using tracking.js library from the link you posted.

  • There are two built-in Physics engines in C2 - Box2D Asm and Box2D Web, have you tried both?

    Also, you can try using Chipmunk, it might work faster:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • jezjones24

    To open a capx created with newer version of C2, rename it to zip, unpack to a folder, open .caproj file in Notepad and edit this line:

    <saved-with-version>24600</saved-with-version>

    (I post this advice so often, I should add it to my signature )

  • There are a couple of plugins that extend textbox capabilities, you may find them useful:

  • The music normally doesn't stop when you change layouts. You don't need to do anything.

  • I don't like TextBox, it's ugly (for games), impractical, hard to customize.

    If I needed a simple text input for my game, I would probably make my own custom "textbox" using Text or SpriteFont object.

    Shouldn't be too hard - read keyboard input to add or remove characters. Use symbol "|" for cursor, blink it every second (replace with " "), move cursor with arrow keys.

    Setting cursor to mouse position could be tricky, but still possible with SpriteFont as you can get the exact size of each character.

    Of course if you need text selection, copy-paste functions - this will require more effort.

  • Christmas Pin and Platform behaviors are not compatible with physics. Yes, they work together, but not very good.

    I'd also like to know how the author of that video did it. I don't think it's something simple though, his engine is probably quite complex.

    He might not have used Platform behavior at all. It's possible that all platform movements are replicated using physics actions (apply force, impulse, velocity etc).

  • I'm still on release 246 and don't have these issues.

    , have you tried installing an older version of C2?

    You will still be able to open your projects saved in later version if you edit this line in .caproj file:

    <saved-with-version>24600</saved-with-version>

  • You can change the size of your TextBox, but as for the word wrap - not sure if it's possible. Maybe with CSS?

    Use TextHeight and TextWidth expressions of the Text object to get actual text dimensions and resize the Text object accordingly. The only problem is that the system needs at least 1 tick (or longer for web fonts) to render the text before TextHeight and TextWidth become available.

    So it works like this:

    TextObject set Text to "Hello world!"

    Wait 0

    TextObject set Width to (Self.TextWidth+5)

    TextObject set Height to (Self.TextHeight+5)

  • Run your game in Debug Mode (Ctrl-F4)

    Find Score_Soldier in the list of variable and see what happens with it, what value it holds.

    Also just as an experiment change you action to Score_Soldier_Text -> Set Text to "1234567890"

    See if this sprite font object can display numbers.

    If nothing helps, please share your capx. It's impossible to find the problem with just your screenshots.

  • Are you saying that all blue boxes have the same FallSeconds value?

    I really don't like using events like "Every x seconds" and "Trigger once" inside of the loops.

    Try removing "trigger once" and move "Every 0.1 seconds" above the "For each" loop. See if it fixes the problem.

    If not, I suggest you enlarge your text field and add some debug output to the loop (because "Cursor is over sprite" is not a reliable method).

    So you can do something like this:

    Every 0.1 second
    For each Egg_collisionCheck    Text append newline
       cos(....)>50  Add 0.1 to FallSeconds
                     Text append "ID:" & Egg_collisionCheck.IID & "+0.1=" & Egg_collisionCheck.FallSeconds &"  "
       Else          Set FallSeconds to 0
                     Text append "ID:" & Egg_collisionCheck.IID & "reset  "
        
    [/code:2qembwov]
    
    This will help you to understand what exactly is going on.
  • If only one effect can be active at a time, then your approach is ok. I would've done it the same way.

    I think you can optimize it by changing your event 104 to "SliderBar On Changed", then you will be able to move "Call FxOff()" to this event 104 and remove it from all sub-events. Also you could remove all "Trigger once" conditions.

    You can also make a file (CSV or XML) with the list of values, corresponding effects and their names, then load this data into a dictionary etc.. But for 20 effects this would probably be an overkill.