rho's Forum Posts

  • Problem Description

    The INT functionality when used to convert a string to a value is unclear and to the unwary user (ie me) can lead to unusual results. This is not a bug but a mismatch in the manual documentation vs the actuality. It's perfectly fine but perhaps unexpected. The INT function operates as follows

    int("33") = 33

    int("33xx") = 33

    init("xx33") = 0

    This is similar and probably identical to the javascript implementation of INT, but that implementation is not universal agreed nor is it universally used in C2 where the numeric value of a string containing non-numeric text characters often returns a zero.

    Attach a Capx

    -unneeded, it's a documentation issue.

    Description of Capx

    Steps to Reproduce Bug

    Observed Result

    Expected Result

    Affected Browsers

    Operating System and Service Pack

    Construct 2 Version ID

    178

  • I don't know if there's a specific way but if you know the locations of both objects, then the angle is given by the inverse tan of the difference in vertical pixels divided by the difference in horizontal pixels. just be aware of some symmetry problems.

  • hi, I tested this with IE11, when I clicked the image I got a pop-up. when I enabled that, I got

    http://dev.angelserver.in/construct2_test/AJAX_TEST/���JFIF

    The webpage cannot be found

    firefox reported

    "Firefox can't find the file at http://dev.angelserver.in/construct2_test/AJAX_TEST/����."

    I'm not able to upgrade to 177 at the moment so I can't look at your capx... but I suspect something has gone wrong. The special characters are a bad sign at least..

  • I believe that a previous post recommended not using C2 for passwords and that it was better to use more secure html/php techniques and then to pass to C2 via the browser some access code.. so for example C2 would pass in it's ajax string a user-id and some session-token, and this token is then used to validate against the server which generated the token. there are expansions on this to enhance security.. there's previous posts who talk about this much better than I could.

    for everything else, just look up cgi scripting using perl or php, and then you can export the results via XML/JSON outputs which can then be read by C2.

  • and then

    TEXTBOX on text changed... so you can then do something based on what it was changed to.

    where TEXTBOX is the name of your textbox object.

    R

  • as far as I know there's no XML incompatabilities with IE, probably something on webgl

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • lovely game.. simple and well executed... I hope you get lots of plays

    I noticed that it didn't work in IE11 though I couldn't see what graphically didn't work.. the beautiful background worked fine. if it's minor, it might be worth the tweak.

    R

  • every event condition is considered every tick, hence 1+2 is functionally equivalent to 3 in your diagram, irrespective of your subsequenct use of the event trigger. I don't see why collisions or score displays would change this.

    you should be able to test this very easily by writing the code to display something.. perhaps incrementing text in two text boxes, one driven by each event structure.

    I would ask why you need to update the score every 15 milliseconds though? personally I update scores perhaps 1 per second, or 5 times per second, or on an action. it just keeps the load on the system down.

    PS: to your second question, yes that would move the sprite one pixel every tick.. just remember that ticks are not precisely regular so if you are depending on them... they could change if the game logic gets busier. if would be better imho to stick with every XX seconds... instead.

  • Problem Description

    I know this ended up in the "CLOSED BUGS" section because there was no capx.. oh well.. it took me some time to get around to making the 1 line capx.. so please see attached.

    add key "timer" with value max(0,var_t)

    VAR_T is a text variable. I suspect there's a casting issue and this throws up an error when executed in the browser.

    Attach a Capx

    [attachment=0:2ekx4bdi][/attachment:2ekx4bdi]

    Description of Capx

    two global variables, one text, one number. one event (on start of layout) that runs and assigns the maximum value of the text variable and a number... crash.

    Steps to Reproduce Bug

    • just run the capx

    Observed Result

    Assertion failure: Calling expvalue.set_float without number type

    Stack trace:

    assert2@http://localhost:50000/preview_prelude.js:16:4

    ExpValue.prototype.set_float@http://localhost:50000/expressions.js:788:3

    SysExps.prototype.max@http://localhost:50000/system.js:2054:3

    ExpNode.prototype.eval_system_exp@http://localhost:50000/expressions.js:255:3

    Parameter.prototype.get_exp@http://localhost:50000/eveng.js:2049:3

    Action.prototype.run_system@http://localhost:50000/eveng.js:1741:4

    EventBlock.prototype.run_actions_and_subevents@http://localhost:50000/eveng.js:929:1

    EventBlock.prototype.run@http://localhost:50000/eveng.js:886:4

    Runtime.prototype.executeSingleTrigger@http://localhost:50000/preview.js:4175:5

    Runtime.prototype.triggerOnSheetForTypeName@http://localhost:50000/preview.js:4094:4

    Runtime.prototype.triggerOnSheet@http://localhost:50000/preview.js:4021:4

    Runtime.prototype.trigger@http://localhost:50000/preview.js:4003:3

    Layout.prototype.startRunning@http://localhost:50000/layout.js:365:3

    Runtime.prototype.go_loading_finished@http://localhost:50000/preview.js:1624:4

    Runtime.prototype.go@http://localhost:50000/preview.js:1479:4

    Runtime@http://localhost:50000/preview.js:524:3

    cr.createRuntime@http://localhost:50000/preview.js:5247:3

    ://localhost:50000/:93:3

    x.Callbacks/l@http://localhost:50000/jquery-2.0.0.min.js:3:24576

    x.Callbacks/c.fireWith@http://localhost:50000/jquery-2.0.0.min.js:3:25388

    .ready@http://localhost:50000/jquery-2.0.0.min.js:3:2822

    S@http://localhost:50000/jquery-2.0.0.min.js:3:466

    Expected Result

    not to crash

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    WIN8.1

    Construct 2 Version ID

    175 & 176

  • for me the biggest problem is the day job and the kids that many people of our age have. if you can afford to do it full time (or have no choice due to unemployment etc) then the first may be less of a problem, but I think as you get to middle aged (yuck) then you pick up responsibilities that just eat into both your time and your creative energies.

    hence why I read the forum more than I code... the forum requires less brain cells.

    on the other hand, hopefully the older developer can persist longer and not give up so easily.

  • a simple scoreboard is easy to do if you wish to just use ajax and you can write a cgi-script.

    Get your C2 game to make a request to a cgi-script which includes the score and name (or identifier) in your http call code

    for example, the following link hits a perl file which is my cgi-script.

    http://111.222.333.444/cgi-bin/add_scor ... &name=jack

    after that you can have your cgi-script to read a text file (or xml file). process the new score, then write out the new file. your game can then use ajax to pull the updated file.

    this will do what your post-title requests, however it does not do what your text says... you will need something that can run a cgi-script and that tends to need a server of some type. I don't know but I doubt dropbox will execute stuff for you.

  • it's probably not going to sell more licenses, but I would love to see enhancements to the IDE for larger projects. an expanded search is just a start, my favourite would be to find instances where objects/functions are used across multiple event sheets and layouts. this one is my big issue at the moment as it would allow for safe deletion of objects rather than just hoping you caught every instance.

  • thanks.. not sure how that could have happened as that's a standard construct file.

    i'lll know what to look for now.

  • strange DatapawWolf, you use the same source that I do.. to suggest 20-30% usage for IE. I don't know why you feel that 20 of that 28% is be non-game playing.

    However each to our own choices. for me it's normal to support and test on all 3 main browsers for a desktop application. (it'd be 4 if I had a mac)

  • to be honest W3Schools captures a certain segment of the market.. ie the coders.. this does not mean that those dynamics match your players. whatever historical issues IE has had, they are gone. I prefer IE11 because of do-not-track and for privacy reasons. that's my call.

    However whatever you believe, I still do not see why if you are going for a desktop application that you should deliberately ignore IE11 users.

    now I have seen this before on Scirra.. it's very much a google-orientation here and understandably so, but I'm not sure it's good for all cases.

    PS: in my local university all the browsers are modern IE's.. mostly for the business and arts students

    R