gumshoe2029's Forum Posts

  • C2 determines overlapping by Sprite.UID. You would probably have to track inheritance in your own instance variables though (like 'genus') or something and have the same idea applied to all relevant parts. You will also have to manually assign genus upon creating new objects.

  • I would look at Json. Either store it in webstorage (or is it called local storage now?) or a database.

    Something like: http://gameprogrammingpatterns.com/type-object.html

    [quote:1kfyrhwv]{

    "Troll": {

    "health": 25,

    "attack": "The troll hits you!"

    },

    "Troll Archer": {

    "parent": "Troll",

    "health": 0,

    "attack": "The troll archer fires an arrow!"

    },

    "Troll Wizard": {

    "parent": "Troll",

    "health": 0,

    "attack": "The troll wizard casts a spell on you!"

    }

    }

    http://gamedev.stackexchange.com/questi ... store-data

    http://gamedev.stackexchange.com/questi ... driven-rpg

    http://www.penguinprogrammer.co.uk/rpg- ... roduction/

    Then you can use rex_rainbow's Hash plugin to parse/manipulate it.

  • Thanks, we are patterning it off of a combination of Master of Orion II/GalCiv and Lord of Ultima, with a number of new mechanics (like fully fiat currencies and sovereign debt markets).

    I am actually going to be using the Array.Pop soon to make non-repeating random star name generation. Except that I am doing it in Java, but the same idea applies.

  • Me too, lol.

  • I'll have to investigate this Photon. Our game is not as latency-critical, so AJAX will work, but I want to find new solutions for future games though.

    I believe the multiplayer plugin is based on Socket.io, or a specialized version of it.

    If you do manage to write a centralized multiplayer plugin Vallar , let me know! I will eventually build a centralized multiplayer plugin for Construct, but I need to finish this game first to free up the time to do that, lol.

  • "Tint" effect.

  • You will need to loop through your array (like for loopindex=0:array.Width ) and put the element into a new array called "sortedArray" then check the current loop initiative vs 0 and (sortedArray.Width-1) indices in the sortedArray then use Push (back or front; based on the initiative) to build the new sorted array.

    Reference:

  • I asked this same question some time ago. The answer is no, unless you want to run a browser on your server to serve as the "host" in the P2P architecture of C2 Multiplayer. Getting away from the P2P architecture is not possible at this point in time.

    We are going to be using AJAX to maintain game state for our game running off of a centralized server set.

  • gnstudenko

    See my link in my siggy. That goes to our website (which is still in limbo as far as forums/devblog/wiki, due to my time being consumed with actually programming the game).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yea, but the same principles still apply. And you are becoming a programmer simply by working with C2.

  • Oh, that is odd. Okay, I will make note of that for my future work. I don't like it, but that will have to do.

    I am coming from an engineering background, so I am used to working with standards.

    We could never change this, anyway: altering something so fundamental to game logic would break just about every game ever built with C2, and make for a lot of angry customers!

    I can't argue with that. :-p

  • Problem Description

    Under all normal circumstances positive angles (less than pi and greater than 0) are measured in the +y direction on a Cartesian coordinate system. However, in Construct it maps negative angles to the +y axis on the Cartesian coordinate system.

    Attach a Capx

    https://drive.google.com/file/d/0B-xiqK ... sp=sharing

    Description of Capx

    Angle bug display.

    Steps to Reproduce Bug

    • See capx.

    Observed Result

    The angle is mapped incorrectly to the Cartesian axis.

    Expected Result

    I expect that positive angles should map to the +y axis and negative angles should map to the -y axis.

    Affected Browsers

    • Probably all.

    Operating System and Service Pack

    Win7 Prof.

    Construct 2 Version ID

    r206

    Please let me know if you actually fix this bug, as I have a manual transform in my code to account for this.

  • You have to use AJAX GET requests to retrieve JSON text from your server.

    You can use PHP (or some other server-side language) to retrieve JSON from the database.

    Do a Google search for "Construct2 mysql database" to find tutorials.

    We use rex_hash to parse JSON state data, but I think the native Construct Dictionary object might work too.

    Other valuable search terms:

    php api tutorial -rest -soap

    php prepared statement mysql

    http get api parameters values