R0J0hound's Forum Posts

  • There’s the canvas recording with the “user media” plugin.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I meant since it’s c3 it’s more likely to get fixed.

    But a custom text input could be nice. It would give you more freedom to style it. Tedious, but gives more control.

    Btw here’s the capx I mentioned above. It was solving a different problem but may have useful bits.

    ucca4bd4a9abfb530ad1bce5e2b5.dl.dropboxusercontent.com/cd/0/get/Ch5o7v9oiUsTgXBHHrtBZ6GWQXqxqMvXhStmEiRWKJpEEh2xsqYkF9QFkP7RrVzCAQU8fLNx7Ygq6DJ1eWAf3asqDdmbHBuHoCnyEP6bBu4NNRBcRIbMuziSZBfopSjBA5I/file

    I was going to rant about construct quirks/bugs and website issues but eh. I’m just a casual user. Maybe they could hire a dedicated bug tester instead of just users that encounter bugs and go through the effort to report them.

  • It looks like it’s lagging a frame behind to me.

    As I recall, the order things run in construct is basically:

    1. Update plugins

    2. Run event sheet

    3. Draw

    4. Repeat

    The edit box’s position is probably updated in 1, so if you set the scroll position at all in events then it will take till the next frame to update the editbox’s position, hence the lag.

    Probably would make a nice bug report if you want to go that route.

    For a more immediate solution you can position the editboxes manually with events. I don’t mean the set position action though. I’m pretty sure that still won’t update the physical position till the next frame.

    Anyways you can try using some css to position it since there’s an action to apply some css to the object. I don’t know offhand which css to use but you should be able to find a list of them perhaps. Positions will be relative to the page instead of the layout so you’ll need to convert it with the layoutToCanvas expressions.

    A second idea is to use a bit of js. If you set the id property of the editboxes you can access it in js with document.getElementById(“id”).

    From there you’d need to look up the js properties exposed that you can use.

    I apologize it’s a bit vague. I did post a similar example capx once before, but I doubt I’d be able to find it while on my phone.

    Since this is in the C3 section, the easiest bet would be a bug report and hopefully it can be fixed in a timely manner.

  • See the “google closure compiler” section here for details what breaks when minifying.

    construct.net/en

    That’s for code you write in your plugin. If you have a third party js library it’s better to add it as a “dependency” than to copy it into your runtime. Dependencies aren’t minifyed so you don’t have to worry about fixing that.

    construct.net/en

  • I’ll pass, the issue doesn’t bother me now. I’ll keep it in mind for the future though.

  • The math notation used on wikipedia is pretty hard to read in my opinion. Much harder than what I remember from school at least. Then again I didn't go much higher than calculus.

  • Here's another update.

    uc0eb1098f419dffd969b05c5756.dl.dropboxusercontent.com/cd/0/get/CiHbrQlU8XmqwYyHADSkA5LjsEK0WUV0jxUi3uB4W_wdJp6HKmrWs2vbnTafnVw4eZl_dkGmnMrvMOIK8NJFTyKMVm0cswgPJiYcDG1hMOgAVbIEb-odMk7sqSWf_BxOMOQ/file

    • Added a 3d obj file parser to make having different 3d shapes easier (manually defining point locations and edges with variables was tedious). So now it uses a dodecahedron instead of a cube. It broke the backface culling though.
    • Added a tilt to the camera so it can look down. The straight ahead view before wasn't super nice looking.
    • Did some cleanup: pulled some of the math into functions, added overview equations in the comments, and reorganized some of the events.
  • Thanks, glad you find it interesting!

    Here's my main reference for it. I got most of the math from there. In events the formulas are a bit stretched out.

    gafferongames.com/post/how_the_go_stone_moves

    That series of articles gets a tad vague at the end, but still it does a good job explaining why certain math is used.

    Edit:

    This site is also a good reference for math in general. Much more readable than the equations on wikipedia.

    euclideanspace.com

  • Here's a test of a 3d physics engine done from scratch. Just a cube and the floor. It's fairly cool to watch though. All vanilla C2. No JavaScript or third party plugins. Just for the fun of it.

    ucd6d3f81b2c87e93c458fc24f9d.dl.dropboxusercontent.com/cd/0/get/CiEKFfcoKNYEqUYS2AhzSqdmv66DYTcK8N0MFqiYRibjmq6LtILqaaXphH_xsZ_nSAYOnM_uSkwa3W5SuX-BisG7HOcPmqZ94-43kJqhEXghNxNtHb5FfTmpBVHG5Lpm72k/file

  • One idea you could use to specify the neighboring countries is to keep the countries spaced and add roads between them. So a neighbor would be overlapping one of the same roads that overlap the source country.

    Another idea would be to nix the roads and just use a text variable with a comma separated like of the uids of the neighbor countries. It's a lot more tedious to set up though. Could be simpler by making an in game tool to help do it.

    Anyways got my example to simple game status. I don't think the odds are that fair somehow.

    uce682c49a5131ee91c4d289abc9.dl.dropboxusercontent.com/cd/0/get/CiAwd-2DrSXE-tTeB6jQFKul2krSQcXYweh52IZtjlV83nqiVOyXQPdWU50sslAxbhED-XxSDmYHI0g5BDCVVCilpS1N1Rek6Y2BKIT0NYhAB_mSXzWCR0p8baKdkfc-JmI/file

    generating a map is trickier, mainly because we'd want it to look good. I've found a hand designed map usually looks better.

    But here's one idea for the map generation, and selection of neighboring generated countries. The generation could be a lot quicker, it's mostly slow here because I only create one sprite per frame.

    uc7ecfc12107864fb38dadec050a.dl.dropboxusercontent.com/cd/0/get/CiBRdid9E-XRYa0R1ZUTEcNqQ06tjwFCGjH4-ATupWK2eGK2YSAo9kSXeBlvQz5ldrs__jvpKKwmgT3RphFmP4yo5PGZ4NpUEit82NN0LNRM_WhTTZGUqeaMOXIo-zScU44/file

    It looks pleasing enough, although islands are an issue sometimes. I guess you'd also need to place a border otherwise the winning player would have a Pangaea instead of many separate countries.

    Anyways maybe some of that will give some ideas.

    -cheers

  • But you’re telling it to delete the file in that script. Sounds like it’s working correctly.

    I suppose it may not have deleted the file before if the file was currently being accessed by something else, so it couldn’t be deleted.

  • The upvote and downvote buttons on posts gives a nan error on the iPhone safari. It works on desktop though.

  • Multiple instances should be as simple as giving an array to each instance. With one object type you do that by putting the sprite and the array in a container, then the events would be the same.

    Now, you can't make a family in a container, so we'll have to do it ourselves with events instead.

    Add a family instance variable and call it "uidOfArray" or something. We want to create an array for each family instance and save the array.uid in that variable so we can pick the right one later.

    family: on create
    -- system: create array at (0,0)
    -- family: set uidOfArray to array.uid
    
    keyboard: space is down
    for each family
    array: pick by uid family.uidOfArray
    -- family: load from json family.back
    -- array: pop back
    
    [inverted] keyboard: space is down
    for each family
    array: pick by uid family.uidOfArray
    -- array: push back family.asJson
  • You could utilize sin(), it goes from -1 to 1 as well as smoothly inbetween.

    So you’d start with

    Sin(x)

    Shift it over so when x=0 it will be 1

    Sin(x+90)

    Next change it so it goes from -1 to 1 every 90 instead of 180.

    Sin(2*x+90)

    You could also use cos() instead. It’s just 90 off from sin()

    Cos(2*x)

    If you don’t want the smooth transitions inbetween you could utilize some rounding.

    Cos(2*round(x/90)*90)

    Hope that helps.

  • Has it ever happened in tests?

    It’s probably the type of thing that’s not worth handling unless it actually happens.

    I don’t mess with networking, much less server side stuff. An Ajax request shouldn’t mix stuff like that. I mean you could probably make server code that would do that purposely if you wanted.

    Best I understand it, for the Ajax request to work the server will receive the request with where it came from so it can send a result back. It’s not possible to mix it up accidentally.