gumshoe2029's Forum Posts

  • Did you follow all of the performance optimization steps?

  • This is a very morbid game.

    Do you need them to move or can you just have them 'jump' from tile to tile? You also could try using lerp for both x/y for each pair of tiles, but this would only work well for tiles that are nearby one another.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • charAt() is what you are looking for:

    http://www.w3schools.com/jsref/jsref_charat.asp

    charat-in-a-string-with-construct-2_t81972

    in C2 it is used in mid()

    like mid("HELLO", 4,1) -> O

  • What determines which animation it uses?

  • I would start with Construct2 > File > New > "Top-down shooter" as your basic template.

    After that: https://www.google.com/search?q=Constru ... 8&oe=utf-8

  • I would use JSON to format all possible options for all possible groups (for your example, it would be like this:

    [quote:1ueplfm8]

    {

    "c2array": true,

    "size": [3,1,1],

    "data": [[["cats"]],[["dogs"]],[["humans"]]

    }

    Then you can import this text into C2 Array (Array > Load > input text) and choose a random entry like: Array.At((random(Array.Width)-1))

    You can rinse and repeat for as many arrays as needed. Like on Array > Load in the "JSON" slot you would put:

    [quote:1ueplfm8]"{""c2array"": true,""size"": [3,1,1],""data"": [[[""cats""]],[[""dogs""]],[[""humans""]]}"

    NOTE: If you are inputting raw text directly into the C2 you must use "" for all quotation marks in your string.

  • Are you trying to import this directly into the C2 array, because you have a cfm tag on top that will cause your import to fail.

    [quote:1bwgov6c]<cfprocessingdirective pageencoding = "utf-8"/>

    this line needs to go, or it will not import.

  • You have to create a cloud-like fog image and set it to some lowered opacity (like 40ish) and repeat it.

  • Well, yes, and no. I can get around this, but it is annoying to have to have a specific proxy entry for this file. That is why I say it's not high priority, just a nice-to-have.

    EDIT: Actually let me explain in a bit greater detail:

    We are running two separate Construct2 projects (one for the website, one for the client) on the same domain and we cannot have two entries pointing to the same file, because they are not the same file. This is primarily why I am asking that it be tied to the resources directory, as that would allow me to configure it in the export options without having to go and modify either the website export code or the client export code.

    Either way though, thanks for your work, and we are anxiously awaiting C3. We are setting aside funds right now to buy several licenses of the ultimate version of C3.

  • Ashley Or whoever else programs the HTML5 exporter for C2:

    Would it be possible to move the data.js (or data.json) file call out of the c2runtime.js file, or possibly load it from the configurable "Project Files" directory in the export options?

    Due to the security proxy system that I am using, I have to update the block of code in the c2runtime.js file that loads that file every time I export our project. This isn't exactly a high priority, just more a nuisance that I wanted to make you aware of... a nice-to-have.

    These are the lines of code that I have to modify:

    Runtime.prototype.requestProjectData = function ()
    	{
    		var self = this;
    		var xhr;
    		if (this.isWindowsPhone8)
    			xhr = new ActiveXObject("Microsoft.XMLHTTP");
    		else
    			xhr = new XMLHttpRequest();
    		var datajs_filename = "/res/data.js";
    		if (this.isWindows8App || this.isWindowsPhone8 || this.isWindowsPhone81)
    			datajs_filename = "/res/data.json";
    		xhr.open("GET", datajs_filename, true);
    		var supportsJsonResponse = false;[/code:2o2v47k5]
    
    from a raw "data.js" / "data.json" to pointing it to the Project Files resources directory at "/res/*"
    
    Not high priority, but this would be a nice-to-have.
  • i meant not animation that is really easy to find, i meant like interaction with lever to have + 1to score and then conditional endings

    because when i try to find lever it is always jrpgs or autocorrect to level and when i google alternating endings it's all movies

    also i don't use languages or platforms that's why i picked construct to train

    Sometimes they are not easy to find because they are proprietary, or people have not done that particular animation before. If that is the case, you get to blaze your own trail.

  • Yea, I looked through the tutorial. Let me actually look at your capx.

    First observation, it doesn't look like you actually filled your array with any data. So you are working with a blank array, like this:

    []

    or actually this:

    {"c2array":true,"size":[10,1,1],"data":[[[0]],[[0]],[[0]],[[0]],[[0]],[[0]],[[0]],[[0]],[[0]],[[0]]]}:

    indices: -------------------------------------------0-----1-----2-----3-----4----5-----6-----7-----8-----9

    This is what a new Array in Construct2 defaults to. You will see this if you output the array as JSON, like Array.AsJSON. You can always use Array.AsJSON to output the contents of any of your arrays to a TextBox in order to help you debug data-driven logical errors.

    So, when you say:

    You are looping through the above array, which just contains a bunch of zeroes for all 10 indices of the array (the indices being 0 to 9).

    If you want actual data in there, you need to loop through however many resources you have an actually initialize the data, otherwise you will get continued logical errors.

    You need something like this:

    in order to initialize the numbers of each resource in your inventory (assuming you are using the array index as a corollary for the resource id).

    Note: I used random(100), but I assume you know already how many of each resource your player has.

  • Well, thank me if you can get it working, lol. It is just a theory right now. You will have to massage it a good bit to actually get it working.

  • You need to start with a large original image.

  • We use and abuse the AJAX to connect our Construct client to our Java servlets. Then we just make calls according to a preset API. That is the "easy" way rather than writing a full scale web socket solution.

    We are using periodic polling to update "real time" information. We also run parallel calculations on both the client and server that give the impression that everything is being updated in real time, when in reality the numbers are only updated from the server whenever the user executes an action.