rho's Forum Posts

  • it's hard to describe this in text, but you need to define you angle of perspective... then by trigonometry you'll be able to map your points.

    the x co-ordinate in your example is fine as it does not change no matter what you do, but as you said y/z are a different. it is called 3D projections so feel free to google that term.

    so think of it this way ... look at a wire-frame box.. as you move your perspective from looking in at the box on one face and up and over.. x doesn't change, but you'll see some combination of the original face and now another face.. that gives you a bigger space.. and how it contributes to a final co-ordinate depends on the degree of rotation you've done.

    if I may suggest Wikipedia... it has a good description, just remember you're keeping one axis constant, so it becomes a lot simpler than what is described here/

    http://en.wikipedia.org/wiki/3D_projection

    perspective (where far away things look smaller than near things) is again a case of trig, but too complex to describe here

  • I'm not sure what the problem is... however I have an XML construct that looks like the following. The trick is that I have my "base" node (in your case this would be manufacturer. I think that selection criteria is what you're missing. I may not be doing it right.. but hopefully it helps.

    <?xml version="1.0"?>

    <player>

    <base id="1001">

    <name>test123</name>

    ...

    ...

    you can find the id of the node as follows when using the loop "for each node "/player/base"

    node_id = XML_PLAYER.StringValue("@id")

    and then you can select based on that

    name = XML_PLAYER.StringValue("/player/base[@id=" & node_id /name/text()")

  • not to my knowledge, however what I have done is count ticks before and after the event... a tick is approximately 15ms (at 60 fps). of course it varies under heavy usage, but it's a good relative indicator..

    what I would do if where you was build in a simple profiler.. I think your problem here is not TIME but CPU utilisation. for me, I set up a simple every 0.1 seconds tick, and stored in an array the cpu usage.. then I displayed the results.. or you could use the debugger.... then you can see what the cpu spiked at.. and for how long..

    lots of tools to help you figure this out.

    PS: doing something like updating thousands of arrays is going to be slow no matter what you do... perhaps you could do it in smaller chunks... do all the elements in the array need to be updated at once.. or could you do it in parts over 5-10 seconds?

    R

  • Aphrodite

    I did something similar, I checked for string length less than 2. ( I knew the number I wanted was always bigger than 100). I wasn't sure if checking for "" exactly matched what I was getting as there might have been a special character in there or something.. however they are probably the same thing.

    still getting NaN for the int of an empty string is acceptable... but I still think it's reasonable to check for the number NaN than check for the input condition.

  • I use all that, and there's clearly nothing wrong with the ability of C2 to manage that quantity of events..

    so Ashley, here are my biggest bug-bears. A lot of these arise from having multiple event sheets that are included into a single layout, and from using functions.

    * search is very limited and works only on one event sheet. This can be very annoying when you are looking for something but you don't know where it is. I'll also express my dislike of how search displays it's results by filtering out all events without the relevant search term. personally i'd like to see it highlighted in context and perhaps a next/last search option. Personally I find GREP works a lot better under Linux when I'm really stuck.. which is a terrible thing to say.

    * when you have lots of functions, it becomes very messy. I'd love to have a map that says in which event-sheets your functions reside .. just that would be hugely valuable.

    * some of the recent improvements help this, but there are a number of times when I have accidently copy/pasted the same function twice and then you have two viable functions that are called the same... little gotcha's like that would be useful to stop.

    * an object/image map that says where certain sprites/objects are used and in what layouts. i'm afraid to delete objects from my game because if I do that, then all related events get deleted. I am not arguing against that functionality, but if I have left anything in and then unknown chunks of the game get deleted, that becomes very scary. Again something that says these objects are used in these events, or even at the level of layouts/event-sheets would be useful.

    So these are just mine, it's all about organisation and tracking where what is what. at the moment it's based on name event sheets intelligently and hoping you've remembered where everything is... maybe it's my rapidly aging brain and declining faculties but after a thousand events, 15 event sheets, it's just taking longer and longer as things get more complicated.

    so the short-version... for big projects, it'd be nice to see more search and organisational tools so we can see what is where at a glance.

    PS: and for all the others... processing the raw event sheets is actually straightforward and nicely structured ... nice one guys.

    R

  • I'm working on a project which is effectively a browser client for a database application, so ideally everything is static on screen (now doesn't that make FPS less important). However there is a lot of work involved in expanding the information and making it available in an interactive form, and then processing queries to produce well formed AJAX requests to an API. so a lot of edge-case checking and functions. So my events are coming in about 1200+ and will grow as functionality increases. When I have all the functionality working, I'll go back and optimise.

    As someone else said, it's really how you use them and many of mine end up for single-use purposes though I use functions wherever I can. Good programming practice is a great enabler and assistance for C2.

    more important it is getting difficult to track progress with so many events and for those with 6000 events, i'm guessing that's very difficult to track. I've developed my own external tools and processes but the IDE does need some improvement.

    R

  • Still checking for NaN would be useful. I encountered a similar scenario where I was looking for a number from a browser string and it wasn't being reported. That's not a bug or anything, the browser string was empty... but the result was NaN and there was no convenient way to test for it.

    R

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • TiAm, I am curious, MS said that they are going to support ORTC and I know this is an evolution of WEBRTC is some way that both google and Microsoft support, but I don't know anything more than that.

    does anyone know anything more about ORTC and how it impacts on webrtc and C2?

    PS: it's nice to see MS spot an issue in an open standard and also nice to see that google was willing to allow the changes be incorporated.

  • one way to do it would be to create a global variable (eg POPUP_ACTIVE) that disables the buttons if set.. so when your popup appears, set this value to 1 (for example) and then use the following conditions. When the popup is disabled, set the variable back to zero

    if OBJECT clicked

    if POPUP_ACTIVE not equal to 1

    <do what you want now>

    that way if they are clicked, you won't do anything.

  • thanks Ashley, Aphrodite,

    so I accept that webgl runs faster than it used.. I got around 6K objects for 30 fps on my laptop..

    but I thought canvas2d and webgl performance was also strongly dependent on browser performance as well... so I was wondering whether that aspect has changed.

    definitely not using webgl is a bad thing if you are using the chrome engine, so android apps definitely must use webgl. I was wondering about other use cases.

  • Hi all, I hope you can help..

    Ashley in a blog several years ago posted a detailed discussion of canvas2d vs webgl, claiming webgl was fast and on chrome, much faster than canvas2d. He presented two test cases (links below) which he said would allow for this to be tested.

    https://www.scirra.com/blog/58/html5-2d ... e-analysis

    https://www.scirra.com/labs/perftest-2d

    https://www.scirra.com/labs/perftest-webgl

    now out of curiosity I ran these again as I was curious about IE11 performance. I also tested it on chrome 37, firefox .

    I am using a laptop which has in-built intel graphics so nothing special. what I got for the two tests were

    IE11: 30 FPS 8471 for canvas2D, and 2971 for webgl

    CHROME: 30 FPS 1351 for canvas2D, and 3150 for webgl

    FIREFOX: 30 FPS 13385 for canvas2D, and 3140 for webgl

    so I know that there are many many things that could be skewing the results, but which is best to use for performance... assuming that you are not using any fancy webgl effects?

    R

  • So my pet project is an MMO game so I've gone through these questions, again multi-part answer

    1) what is your game type... is it evony/Sparta/ogame/domination type thing where the updates are periodic and can be done per second or on demand? ... or is it a league of legends/WOW type game where you need updates on the order of 10-15 times per second.. a huge difference in the bandwidth requirements

    2) I've gone for a server-client architecture with the server being developed in perl (just because I know it) and MySQL. The client is being developed in C2

    So in an event-driven game, a basic server and hosting facility, I've estimated I can handle 1000 concurrent users in a persistent universe. the biggest bottleneck will be bandwidth but probably not where you were expecting.. I've optimised updates so they are small... but if a 1000 users download a 5 MB file every time they play.. I would be hitting 5GB/day which is beginning to get expensive.

    i'd hate to imagine the bandwidth requirements for a realtime mutli-object synced system, but I think the biggest issue would be ensuring that your host has sufficient uplink capacity... if you are using ADSL (A=assymetric) the uplink connection is a poor relation to the downlink and depending on your ISP's policies, it can suffer from laggy behaviour and pausing. this is the reason why most home links can't support decent server performance.

    so C2 can be usefully used, but you'll have to pick your game type correctly.

    3)

  • so on a dell laptop e6430, rather than talking about specs, I tried the 3 browsers (all up to date) for a comparison.

    IE11: 62 FPS, 50-60% CPU when moving, about 40% CPU when stationary

    FIREFOX: 40 FPS, 50-60% CPU, about 40% when stationary

    CHROME: 40 FPS, 40% CPU, about 20% when stationary

    so I had a few other things running in the background that might have limited max CPU.

    nice demo project

  • Naji

    to answer one of your other questions...

    dropbox is not considered as a "server" with respect to things like PHP. dropbox can share files out, but it does not provide you with an ability to run programmes on it.. php running server-side with MySQL requires something like Azure/Amazon or similar service, or a dedicated machine.

  • Interesting, I've never exported JSON from C2, though I am a regular user of IE11. So to simplify your query, the problem line is...

    function 15: "download as JSON data with filename "questionPool.json"

    so I ran your capx and the file I was asked to download was the following. So I hate looking and converting all of this crap to normal text, but to me it seems like this is the correct json file but IE11 is trying to open it with an app, and when it can't, it's trying to parse it as a weblink and failing. If I configured an app to view this, I think it'd behave the same as FIREFOX. Chrome and Firefox see this and interpret it as json and hence you don't see the headers as they strip them out. So I suspect if you could get rid of all the hex encoded text you'd get the file that you wanted.

    JSON is built in IE11 but apparently there are some issues on how the file is configured to ensure it is handled correctly. So it is an issue with IE11 and not C2, and there are fixes for IE11 for this available or so a quick google search suggests.

    you wanted to get

    {"c2array":true,"size":[1,6,3],"data":[[[0,"false","true"],["true",0,"1.1"],[0,0,0],[0,0,0],[0,0,0],[0,0,0]]]}

    and you got

    data:text/html,%3Cp%3E%3Ca%20download%3D'questionPool.json'%20href%3D%22data%3Aapplication%2Fjson%2C%257B%2522c2array%2522%253Atrue%252C%2522size%2522%253A%255B1%252C6%252C3%255D%252C%2522data%2522%253A%255B%255B%255B0%252C%2522false%2522%252C%2522true%2522%255D%252C%255B%2522true%2522%252C0%252C%25221.1%2522%255D%252C%255B0%252C0%252C0%255D%252C%255B0%252C0%252C0%255D%252C%255B0%252C0%252C0%255D%252C%255B0%252C0%252C0%255D%255D%255D%257D%22%3EDownload%20link%3C%2Fa%3E%3C%2Fp%3E