anpur's Recent Forum Activity

  • Hi,

    As first addon to build I've developed State Machine behavior, which tracks state and emits proper events if it changes.

    GitHub: github.com/anpur/c2-state-machine

    Download: goo.gl/SxoBYA

    With given functions you can decouple events which changes your object state and logic, how you object reacts on those changes.

    You can have several state machines per object, e.g. Mood ('sleeping', 'patrolling', 'fighting') and Weapon ('ready', 'aiming', 'firing', 'reloading').

    Events on specific state transitions can help you build animation more easily.

    For example: On Moster.Mood transition from sleep to attack set animation 'attack from lair'.

    Features:

      - In state condition: checks that machine in particular state.
      • On state change trigger: occurs when state changed.
      • On state entering trigger: occurs when entering particular state.
      • On state leaving trigger: occurs when leaving particular state.
      • On state transition trigger: occurs on transition from one particular state to another.
      • Set state action: set current state.
      • State expression: returns current state.
      • Previous state expression: return previous state.
      • Initial state property: to set initial state of machine.
      • Ignore same property: ignores attempts to set same state as current.

    I hope this behavior will be useful for someone <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" />

    I'm still working on example project.

    P.S. - I realize, that this is not the first state machine addon, but I wanted to write it so much.

  • Chrome 36 breaks old content - please re-publish old games

    Well, most probably this is root cause indeed. Anyway, games which are published on site as main tutorials or best games examples should be rebuilt

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Update: definitely not a network or system issue, tried "Airscape" (from C2 site) on mobile device from mobile network - same result,

  • Not sure about that, CDN is rather part of C2 set than Web Site. IMHO.

  • Problem Description

    Most of published games doesn't work for me in Chrome and FF due to js error in widgets.js and dead link to pathfind.js .

    Please, check out error log: [attachment=1:29fls6y9][/attachment:29fls6y9]

    Sources are minified, so, I don't know what causes "Uncaught TypeError: undefined is not a function" exception, but pathfind.js is really unavailable for me from all browers:[attachment=0:29fls6y9][/attachment:29fls6y9]

    Most probably Chrome and FF uses one CDN and IE uses another.

    Attach a Capx

    This issue has nothing to do with my C2

    I've saw many games, all with same issue, example is based on "Asteroid in less than 100 events":

    Steps to Reproduce Bug

    • Start asteroids from link above.
    • Proceed to game itself, by pressing Enter few times.

    Observed Result

    Game hangs on start of game layout.

    Affected Browsers

    • Chrome: YES
    • FireFox: YES
    • Internet Explorer: NO

    Operating System and Service Pack

    Fresh Win 8.1 on two different systems.

    Construct 2 Version ID

    N/A

  • -1 for me. There will be biases depending on the language(s) you've come from and nobody will agree on any of it. For instance I already don't like the format you have described. Where's my curly braces?

    ...

    Lastly, you have some typo's (which is a lot harder to do in the current system).

    Python-like syntax was taken as example because it's quite clear. I personally don't care that much, as I'm writing on JavaScript, C#, PowerShell and Python a lot.

    I'm also like curly braces

    As for typos — you can make typo in expression text box now. System, which checks your expressions already implemented in C2.

    anpur

    You had missed something in this too simple example-

    1. how to get the object reference (i.e. object name + SOL)? It might be more then 10 or 100 object types in the project.

    2. how to get the function name (i.e. action name) or member name (i.e. expression)? Each kind of object type might has a lot of members (functions). And the input parameters of these functions...

    First of all, this is C2 whom hides difference between classes and instances from user entirely. Which makes it a bit vague in some cases and fully context dependent.

    In code, from other side, it can be made really emphasized and clean.

    About function names — you have exactly same situation, when you're constructing expression anywhere in C2. This is why you have a nice, semi transparent window near every expression text box, here is its example from one of tutorials: [attachment=0:2tapcdhu][/attachment:2tapcdhu]

    -----

    Again, I'm not proposing to remove or even affect event system or graphical event editor.

    I'm just saying, that:

    1. Almost all features required, like syntax highlight, object members explorer window, syntax and members verification already implemented and working in C2.

    2. Code block can be used side by side near other events

    3. Text has more expression power and also easier to manage.

    So, we only need to think through some decent UI and some additional keywords, like loops, conditional expressions and block organization.

    P.S. — this all is just thinking out loud, as Ashley said that there are no plans to add something like this to C3.

  • Being able to actually just type out the events is all I could dream of. Clicking on GUIs is tedious, especially when dealing with a lot of events such as manipulating and checking through 2d arrays. Being able to simply type what is already there and having the ability to copy paste and reuse the code (events) in a less awkward way would be amazing.

    I don't need other language support (lua, python, etc) -- and I don't even need access to the javascript. Just the exact wording of the events in its own script.

    Hi Twinsonian, this is exactly what I meant, no need of low level code system, at least managing same events in a text way.

    Assume that Ashely finally built a pure text code editor, then users might ask

    - why not add highline

    - why not add autocomplete

    - why not add symbol window

    - why not add call graphs or class tree diagrams

    ...

    All these already available in tiny expression text boxes.

    I created a small example, how to it can look like in my opinion, I've took events block from "Make a Match-3 Game in Construct 2: Animations and Block Swapping" by David Silverman:

    [attachment=1:1sum7tnc][/attachment:1sum7tnc]Reading and managing events like these would be much more efficient, I think. At least for me.

    In upper example I've just mimic events structure, but we can simplify it more:

    [attachment=0:1sum7tnc]

  • Hello all,

    My name is Anton, and I'm currently software developer at Skype. I'm Ukrainian living in Estonia.

    I played in video games since I was a kid and always wanted to make one (we need to make this phrase template for this thread!). But now I'm really excited to see, how old-school-like games becoming something bigger and deeper. A thing of art and story.

    Sure, old games were good, but some of modern indie games are really live tales. And I want to tell stories too.

    I found C2 by friends advice, and I'm really excited, how comfortable it to work with. I'm really looking forward to buy C3 license as soon as it will be available, meanwhile learning with free C2.

    Thank you all, for participating in this great project and being warm and friendly community!

  • welcome to the world of Construct....

    Many thanks!

    No, there's no plan to do it

    Thank you for quick turnover.

    It is pity, that it isn't planned, but, maybe, I'm just afraid to not have what I'm used to.

    Actually, if editor plugin system will be introduced in C3 it can be done there

  • I don't want to argue how useful it will be. As Zenox wrote — it was discussed many times before.

    My question was — is there any plans to do it? As it seems to be fairly easy from one side and can attract new people, without ruining and affecting current approach.

  • Must say, that I evaluated event system and I'm really impressed how flexible and powerful it is. But still, nothing can be more rapid and clean than raw code

  • Hello everybody,

    First of all, I'm extremely like C2, it's implementation and idea. And I want to thank its talented creators and its friendly community

    For almost two decades I'm playing video games and I always wanted to make few. Being software developer for years I know how many things C2 hiding from ua, wrapping all that boring stuff, js flaws, math, management and browser specific issues. That's amazing!

    I'm curious, is there any plans (maybe for C3 everybody is talking about) to add a programming support? Not only as plugins, but inside of IDE?

    Source files. methods, reusability, optimization, arrays, source control, monospace font!

    Again, being developer I know how powerful raw-text code is. It's not an accident that all professionals eventually prefers pure text tools, command line interfaces, etc. Obviously, IDEs and GUIs are great at helping and essential for beginners. But there is a big difference between "no programming required" and "no programming available at all" products.

    Sorry for this outcry, but I'm really like C2 and I want to stick with it, so I really need a hope that one day I will be able to code there, not only writing giant expressions in tiny text boxes.

    It really feels like it is fairly easy to do, at least at some extend, as C2 already supports a lot to evaluate and highlight expressions. Few keywords, methods creations, distinction between classes and instances and reference documents...

    Anyway, thanks for product!

    Update: examples from my later post, how coded events can look like: [attachment=1:2ju19hjj][/attachment:2ju19hjj]

anpur's avatar

anpur

Member since 30 Jan, 2015

None one is following anpur yet!

Connect with anpur

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies