Toby R's Forum Posts

  • Just checked it out quickly. Indiegogo does not allow cross-domain "grabs", so you can't fetch this data with AJAX. I'm afraid there is no other way in C2 to download remote data so you need to make a work-around.

    1. Create your own server side script which will download this JSON from Indiegogo (using CURL or whatever) once triggered and simply output it's content (kind of intermediary script).

    2. Set your server (or script) to allow AJAX fetch data from the different domain.

    To do that you can set Apache with .htaccess

    <IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
    </IfModule> [/code:2s3jho53]
    
    3. Since you do the server script anyway, I would parse the JSON data already in that script and output only the number you want to fetch in C2.
    
    4. Now in C2 you just make a simple AJAX request as below:
    [img="https://i.imgur.com/4zjAltY.png"]
  • You can fetch web-api data with AJAX object and then load it into Dictionary so you'll be able to grab any part from JSON easily. But to load it into a Dictionary you need a specific JSON format.

    Here's a snipped from my lib. It's PHP but I'm sure you get the point.

    So you have to change your web-api output or parse the fetched sting in C2 before loading into Dictionary. You can use regular expressions as well.

  • Just a quick idea.

    1. when On Jump condition triggers, save current player.Y to some variableY

    2. adjust lerping camera conditions so when player "is jumping" (there is such condition) then camera lerp Y cords to the variable Y, otherwise lerp to player.Y

  • gumshoe2029 Yes that's me on the picture .

    Thank you for your offer but I am full time bussy now and accepting only small tasks which I do after "day job" hours and a bit on the weekends so I'm afraid I can't help with any big thing now.

    Anyway good luck with your project!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi tutbarao

    Yes there are some Chromium settings which you configure in the config xml. It is covered in the e-book, but if this is the main part that interest you then please read my tutorial How to build optimized Intel XDK Crosswalk app properly?.

    I have covered this part there as well.

  • Just took a look on my Airconsole game statistics, thought you might be interested in seeing how it goes on their side.

    As you can see there were thousands of plays and hundreads of hours played. Note that I do not advertise this game anywhere anymore, those are almost clear statistics from AirConsole traffic. I must say it's pretty impressive. Numbers are really high as for a game which is not featured on their platform (maybe it was during the peak you see on the graph, but I haven't checked it that time).

    I got permission from AirConsole team to implement a Google Play link (to my Google Play version of this game) to the AirConsole controller. The conversion rate is around 1,5% (1,5% AirConsole players have installed Google Play version). I was expecting higher conversion rate, but still it's a decent way to grab some downloads. Especially that once AirConsole starts showing ads on their platform, you (as developer) will get a 75% (if I remember well) income from the ads.

    No particular reason I post this, just thought it might be interesting info for you.

    Cheers

  • > FYI, Regular global variables have rather huge security issues.

    >

    What exactly is meant by this?

    Simply saying global variables (no matter on the language/technology) are available even from outside the project. They are simply global. In JavaScript it goes to kind of global namespace and can be accessed by someone (man or other script) who was not intended to use is.

    You can google a lot about security risk regarding global variables in various languages. But apart from security issues, global variables, functions, ... are the exact opposite to encapsulation which is the essence of good programming practices.

    Just quickly googled "JS good practices" and the first on the top which popped up is http://www.w3schools.com/js/js_best_practices.asp

    Almost at the very top it is written with big letters "Avoid Global Variables" <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink"> - haven't read the article tho.

  • Well the OP wanted a method so he doesn't have to repeat the same code over and over. Because a global variable isn't encapsulated , then he can just call it easily whenever he needs to without having to repeat code over and over.

    The only thing in my opinion that brings a mess to a large project is not writing down want you want 1st. Before I take on a larger game I write down in notepad the different scenarios and things I want in the game. That way I don't get stuck in the middle because I calculated what I was going to do.

    Initially you can make a brief plan in notepad, but this isn't a solution for further development. There is a saying "There is no project which is finished". Also you cannot predict everything for a big project no matter how good developer you are, so again - notepad is ok but only as initial draft.

    As lennaert said - apart of a mess in the project - globals do bring some security issues. So instead of using globals you should encapsulate your code with groups and functions and use only local variables. For toggeling particular functionality you should not use global variables states but simply toggle groups or object's instances booleans - depends on your need.

    What we are talking about is - I would say - the highest art of development which is the code architecture (which also relates to semantic). It's quite difficult for beginners but it's the most beautiful part of all development process. Many experienced developers, after years of work as a developer, decide to be so called Technical Architects/Analysts. In short words they are responsible for keeping the project structure the way it should be the pro way to avoid various issues in later stages of the projects.

  • 1) Make a global variable =0

    2) make a function or multiple functions

    3) When the global variable =1, then trigger the functions to be true.

    4) Dont forget to include the event sheet with other events sheets.

    Easy as cake!!

    I strongly suggest to avoid global variables as much as you can if you plan to do a big project. Global variables bring mess to the project and block the possibility of encapsulation. It is already a pain in C2 that all functions are global.

  • Reusability is the essence of development in some way. I mean it is really important and it is a serious issue if you can't make a reusable code in the engine so I understand the frustration. Every experienced programmer always keep in mind to make that feature which he is already working on a kind of universal/reusable code (lib, plugin, module, ...). Reasons are obvious.

    As it is not that stright forward to make a reusable code in C2 - still it is possible. My MoModth project which I talk about from time to time is based on (what I call) modules. Depends on the feature a module can be a functionality with dedicated API (both functions and callbacks) or stand alone functionality. This approach really does the job. That's why I say for MoModth that "Building C2 apps has never been easier", because you can simply attach modules which you use in current layout and they handle most of needed functionality.

    Think about it like on libraries in regular programming languages. You download a library and use it with it's API. So I really encourage to take this approach while building C2 apps. It saves a lot of time and speed up development drastically. Also once you make a good module it is already tested/working code so you don't have to bother with bugs/compatibility.

    I wish MoModth be finished already as this is a close related topic with issue that MoModth's is solving actualy. I am however very bussy recently with my client's projects so MoModth has to wait a bit.

    Anyway I assure you that C2 can handle big projects you just have to figure out your own smart coding guideline, some conventions for the project which will let you not get lost once it gets big.

    In shot: ENCAPSULATING!, organizing, optimizing and overall refactoring should be done as soon as your project evolves with some new "wing".

    Good Luck

  • Ah there it is! Thank you guys!

  • Tom, Kyatric, zenox98? Can I ask for some instructions regarding this?

  • Is it possible to generate a redeem code for my item in Scirra Store so I could make a gift for someone? I was sure I saw this option earlier but can't find it now.

  • I think none of us recieved the prize yet. I also wrote an email to Rikoshe about a week ago regarding developers/apps they hire/buy. No reply yet. Looks like Rikoshe is sleeping.

  • First of all you do not go to game development for the money or for the prizes. If this is your (I mean here "someone") main goal then you will be dissapointed very often. Game dev is a hobby on first place. It's a life style. It's something a real game developer can't live without. This market is extremely hard when it comes to money, contests, etc. and everyone who is stepping into this world is aware of it. So quitting game development just because someone didn't manage to win the contest is silly. Every game develpment veteran tells the same story: Your first 10 - 20 games will suck, but do them anyway. So tell your friend to think from a different perspective - he is one game closer to the one which will be a really good one.

    Another thing is that we - as authors - are the worst possible candidates to say if our game is good or bad, or better/worse than the other guy game. We are not looking at the big picture because we put our heart to the one we created. It's our time, our struggle, our child. So it is good that there are judges to do the dirty job for us. No point to disagree with them as it is their contest.

    It would be really awesome if judges could also say few words about each game. Why one was better or worse. What was good in this game and what was bad in the other. As it is a contest where participants are game developers, the feedback is very welcome. Especially the bad one so the developers could understand/learn on their mistakes.

    Last thing to say is regarding the rules.

    Even though my game somehow managed to get into top 10, I am still somehow disapointed and very surprised that Rikoshe did not respect their own rules. This contest was meant to be for fun. No-one dies when lost, no-one get rich when win. Prizes were not high (comparing to recent AirConsole $1500 for instance) so it was mainly for fun, a nice opportunity for all to take a chance, test the skills and have fun. But when the rules are broken by the organizer and he still says "it's ok" then you somehow lose the trust and all fun around it.

    I did not follow exactly, but if some game was submitted after the deadline but still you found it as a very good game. I would more likely expect to annouce it as a Honorable Mention of the contest, but still outside the contest results. I think authors of such games would both appreciate such a special mention and understand that they were simply late so it is fair to not be considered as a contest submitter because of that.

    I am sure that if everyone would have those 4 days more, they would polish their games a bit more or even make a new ones.

    I personally get that feeling like "ahh... ok... orginizer don't strictly respect their own rules so in the next jam I can bend all the rules a bit - it's gonna be fine. I should have made a bloody game as I wanted, why not? If one rule got broken, then the other should be fine as well.".

    * So congratz to all the winners.

    * Sorry for those who didn't make it and really hoped for. Keep it up guys. Remember this contest was just one of many you will participate in your life.

    * Thanks to Rikoshe for the opportunity. I hope to see more jams comming from your side. Just make things right next time as I believe you've recieved some kind of "yellow card" from the community here now both for huge delay with the results and not respecting your own rules.