dop2000's Forum Posts

  • I have a paid template, check it out (click Demo C):

    construct.net/en/free-online-games/random-level-generator-25484/play

    Please be aware that the dungeon layout is fixed (the number of rooms, their locations and entrances). Only the rooms are randomized.

  • I actually reported several similar issues with the dark theme as bugs and they were fixed!

    github.com/Scirra/Construct-bugs/issues/6155

    github.com/Scirra/Construct-bugs/issues/5908

  • Yeah, you never know which of the two instances will trigger the collision. That's why I suggested to use a function.

    You compare the speeds, and based on the result call the function using either instance A or B as the "active" one.

  • This is odd. To me exFrames=2 looks the best, the future sprite is mostly synced with mouse cursor. At exFrames=1 the red sprite is lagging a bit, but 3 and 4 is definitely too much!

    But there's definitely something weird going on. When I try to record the screen with OBS, it captures two cursors! The "phantom" smaller cursor is usually ahead:

    I'm guessing Windows or Chrome (or both) does something to smooth/enhance the mouse movement. Perhaps it works differently on different machines, DPI, frame rates etc..

  • I don't know of a smarter way.

    Use "Sprite On Collision with Family" event. Inside it compare their speeds using the distance() expression. Based on that - spawn a new element.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can create a function Craft, which will take two arguments - active element and passive element.

    On collision, compare the speed:

    If A.speed>B.speed, then call Craft(A.animationName, B.animationName)

    If A.speed<B.speed, then call Craft(B.animationName, A.animationName)

  • Ok, but I imagine the logic is still the same - the first event picks the active instance. The sub-event picks the passive (overlapping) instance.

  • - water poored on fire = coal

    - fire thrown on water = steam.

    How do you know which item in the pair is thrown on another item? If you use Drag and Drop behavior, then in "On Drop" trigger you will have your active instance picked.

    Element On Drop <- this Element instance is active
    Element is overlapping Elements-Fam <- this Elements-Fam instance is passive
    

    Is this what you are asking, or did I misunderstand the question?

  • I'd like to be able to convert the JS code into C# for me to analyse.

    This is a bad idea. Compiled code will be very different from the original project code (events), and will be heavily obfuscated. You will not be able to make any sense of it.

    And Construct visual programming language is pretty unique, it won't translate into any traditional programming language.

    Your C# experience will definitely come handy, but don't waste your time trying to convert C3 code into C#. Just study a few tutorials and examples and try to create a simple game.

  • You will probably need to use an array as permutation table. (permutation table is essentially an array anyway)

    You can initially fill the array using AdvancedRandom. Then use Array.at(index) when you need a random value from the table. And you can save Array.AsJSON in Local storage.

  • No worries, I've made this same mistake countless times! :)

  • Because you can build an efficient and scalable system.

    Imagine you create a JSON file with records like this:

    {
     "bar_dialogue": {
     "text": "What you want? says one of the bad guys",
     "answers": {
     "answer1": {"text": "I want milk", "xp": 5, "next": "bar_fight"},
     "answer2": {"text": "I want wiskey", "xp": 7, "next": "morning_hangover"},
     "answer3": {"text": "I want to speak to your boss", "xp": 10, "next": "boss_dialogue", "itemRequired": "boss_invitation"}
     }
     }
    }
    

    It contains all information about each screen - the question, answers, the amount of XP players gain when give each answer, where to go next after each answer etc.

    Once you program the events that can parse and process this JSON, you can create practically infinite games without having to modify or add more code.

  • You have a mistake in "Cast ray" action.

    In "to Y" field you have Player.X+2048*sin(angle(Player.X,Player.Y,mouse.X,mouse.Y))

    It needs to be Player.Y

  • That's the most ineffective way to make such games. You have to create separate events for every screen, every choice option. If you continue developing the game like this you will soon realize that it becomes unmanageable.

    In C3 there is a new feature called Flowcharts. I didn't have time to play with it, but I imagine it can be a huge help in creating text based adventure games.

    I C2 I would suggest using some data object - JSON, XML or an array to organize all texts and choices, and create connections between them.

  • You do not have permission to view this post