dop2000's Recent Forum Activity

  • 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.

  • 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?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 260 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies