Fengist's Forum Posts

  • Thanks guys. Forewarned is forearmed. It's not good news. It seems I'll have to give the server a bit more authority about how quickly transactions can be processed. Proves my adage though: Writing software is easy. Making it idiot proof, next to impossible.

  • My reasons for liking Construct over other IDE's is pretty simple. How many dev's from GM would respond to a thread on their forums with an honest reply asking why Construct is cheaper than GM?

    I like it when I experience turbulence and I can open the cabin door and ask the pilot, WTF, and get an answer.

  • And you'll likely need an:

    X Mouse > Cursor is over object

    If you want to hide or stop the video.

  • Here, let me give you a real-world example. This is a game I'm working on and it's still very, very early in the works:

    That skill sheet is pure HTML with clickable items. When the user logs in, a PHP script looks at a MySQL database with the list of skills (around 70). It then looks at a table with the user's level in each of those skills. Using the data from both of those, it builds the HTML and that's passed back to Construct as a JSON key. The data from that key is then loaded into an HTML Element plugin. When the user clicks on a skill, it again, accesses a PHP script via Ajax and uploads a description of that skill which is displayed on the right.

    If I change the information in the database the HTML changes. I don't have to keep writing new skill sheets if I add, delete or change a skill. I just change the database.

    No array could do that.

    Here's the login screenshot. Again, the login, create account, forgot password, etc. The same things you're looking to do, all handled by PHP and MySQL on the back end.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Correction. My strategy is to create a C2 file, which is just an array, located on my Hostgator server. Then I would have the main C2 game connect to the Hostgator server and interact with the array via AJAX.

    Will that work? And if it does, can you direct me to a tutorial or step-by-step process to make that work. I was looking the signaling server C2 example which Scirra has for creating a chatroom or two player game. Is that sufficient to use or does the server to be set-up in some special way, as well?

    For the longest time, before I broke down and learned SQL, I used flat file databases like you're planning. For many things, they're adequate and relatively fast. Here's some issues you're going to run into:

    Passwords. PHP has built in features to hash passwords into MD5 or SHA1 hashes. Without some ability to compare the password the user enters to a stored hashed password, your passwords are going to be plain text. Keep in mind that people tend to reuse passwords!

    Email Verification: The easiest way to verify a user is to send them an email with a link to a website to verify. That link should have 2 things in the query string, the user's email and another random hashed string like this: www.mysite.com/verify.php?email=me@my.org&hash=SOmecoLLectionofRAndOmGarBage. If the email and that random string match when that page is called, then it's a successful validation. Construct has no built-in way to send emails.

    Forgotten passwords: You'll need some way to send an email or other method (SMS for two factor authentication) to people who've forgotten their password.

    Nextly, security: While it's not always easy, Construct games can be deconstructed. If you provide a direct link to that array inside the C2 client and your game becomes popular, it will be found. Just assume it will. What would happen if I plugged that direct link into a browser or got to poking around?

    There are a lot of things that Construct can do. And there are a lot that it can't.

    As for learning MySQL, you'll need some language to interface into it like PHP, Perl, Ruby, etc. I strongly suggest that you get an IDE like NetBeans and break down and learn it. I write code in several languages but it still took me a good year to become proficient in PHP & MySQL to the point that I felt confident in what I was doing. If you're going to keep writing games, whether in C2, Unity, Unreal or any other engine, learning how to connect to resources that aren't native to those engines will be essential.

    A quick story. A number of years ago I wrote a shareware program for Windows. It's teleprompter software. You can find it here if you're curious: http://www.uprompt.com. I did a lot of planning for security and how to use registration keys. But it wasn't enough. I knew that I had finally hit the 'big time' as a shareware author when some hacking group released a keygen program that would create registration keys for my software. While it was a source of pride that some hacking group found my software worthy of cracking into and I actually boasted that on it's website as a selling point. 'My software is so good, they've cracked it." it also created a need to rethink how I did things. Always assume that someone will spend the time to bot, hack, cheat or otherwise abuse your work for their own personal satisfaction. If yours becomes popular, it will happen.

    I'm trying to convince you to break down and learn MySQL and PHP, so let me give you an idea of the power it would put at your disposal. My teleprompter has automatic registrations. When a user clicks on the PayPal button on the website and makes a purchase, PayPal sends what's called an IPN (instant payment notification) to one of my PHP scripts. That script digests the information and adds it to a MySQL database. It also sends me an email notifying me of a payment received. The teleprompter accesses another set of PHP scripts that checks that MySQL database. If the user enters the correct license ID and registration, the PHP script tells the teleprompter that it's valid or invalid and if valid, registers the software for full use. All of this takes place without my intervention (unless something goes wrong) creating a passive income. I have a database of all of my users, their names, emails and I even have stats on how my software is used so I have information I can digest.

    Construct is a great gaming engine. But that's exactly what it is, a gaming engine. If you want to be able to have the flexibility in your games to say, add in vanity items, add in pay-to-win, subscriptions or even one-time purchases, tracking users, high scores, leaderboards, or a whole host of data, learning a database like SQL and a web-based language like PHP will give you the power to do that.

    I can guarantee you that the guys at Scirra work in a lot more than just Java to sell, maintain and promote Construct. And there's a good reason why.

  • Just ran into a possible issue. I'm creating a HTML5 based game. A similar pure HTML game had a issues with people creating Chrome extensions that allowed them to bot the game.

    The question is, do things like Chrome Extensions run inside the C3 environment and can they be accessed while C3 is running?

    If so, is there any way to detect which ones are?

  • Any external language that accepts an Ajax request will work with C2 or C3. I personally prefer having my own server and MySQL database over firebase. Reason?

    firebase.google.com/pricing

    At least for testing, I can get a shared web host with MySQL running on SSD's for $5.00 a month. And I can always upgrade to a dedicated server if I need.

  • C3 doesn't doesn't have direct access to database resources, like MySQL, that you're going to need to manage large amounts of data like account creation, user names, passwords, forgotten passwords, sending verification emails, EULA changes, etc. Your C3 project is going to have to communicate with a server somewhere.

    Perhaps the easiest way is with Ajax and sending requests to a web server. But this is going to require programming in another language like PHP, Ruby, Perl, etc. The advantages of these are they're relatively easy to work with. The disadvantage is, they're a send/wait to receive system. Your C3 project will have to send a request and then, look for a response. The server side scripts will only run when C3 sends the Ajax request. The server won't be able to just send data to the C3 project out of the blue.

    The other viable way is via WebSockets. The advantage of this method is that it's a two-way communication street. Think of it like a chat server. The C3 project can send information any time it wants and it can receive information any time the server sends it. The advantage of this system is that you can have a steady flow of communication back and forth and a WebSockets server can communicate with databases like MySQL. The disadvantage of this method is that it's going to be a lot more difficult to create as you're going to need to create actual server software in a higher language like C# or Python. It's going to be harder to make secure and that server software is going to need to be running on a machine somewhere 24/7. If that server crashes, your game goes down.

    I seriously doubt that the multiplayer plugin can even come close to handling this as it uses a very specific signaling server that's not designed to really accept data outside of what it expects. You could do what I read as one suggestion and have a specific client start up first and act as the server. But even then, since C3 has no way to communicate with a real database you'd be limited to local storage which I'd consider quite volatile. MySQL can sift through millions of rows of data in a fraction of second. C3 has nothing built-in that even comes close.

    Writing a tutorial for this would be possible but it would be out of the scope of C3 as it would mostly involve writing code in another language, setting up databases and making MySQL queries.

  • And I just tested. The only way to get it to stop asking to upgrade is:

    Run the app from the desktop, when it asks to upgrade, decline.

    Click the 3 vertical dots at the top right, uninstall C3.

    Open the browser, go to editor.construct.net.

    Again, it prompts to do an update. Select yes.

    Then, from the C3 menu, install the app.

    If I run the app from the desktop and choose yes when it asks to upgrade, it never gives me the option to upgrade or install the app. I have to uninstall it first.

    It's really no big deal to just keep clicking on the 'upgrade' button. It was just confusing as I expected an upgrade and not a redirect.

  • Fengist - that sounds like the same case as discussed here. Presumably you're visiting editor.construct.net?

    It would be useful to remember: beta releases are never served from editor.construct.net - that only serves the latest stable release (which is what the typical user will want). If you want to be using a beta release you must have the release number in the URL, e.g. editor.construct.net/r146.

    Actually, I'm using the installed app. I just click and open the desktop icon. The confusion arises when it realizes I'm not using the latest beta and asks me if I want to "upgrade". When I select yes, It doesn't actually upgrade the desktop app, It appears that it closes the app, launches the browser and takes me to the latest beta URL. Because it doesn't upgrade, the next time that I launch from the desktop app, it's still not updated and asks me again.

    It would seem that as long as I'm running the beta and using the desktop app, I have 2 choices. Uninstall and reinstall when a new beta comes out or just keep clicking the "upgrade" button.

  • My situation was similar. Relying heavily on functions and just getting started in development I switched to the beta branch in an effort to not have to rewrite functions later. What I expected was that when a new version came out and it asked to update, that it would update the app and keep it. Instead the app seems to be keeping the version installed when I initially switched to beta so that now, every time I start the app, it asks to update.

  • Is there a better way to print pages using construct 3 that I'm not aware of?

    I'm going to assume that you'll need to print different cards at different times for different players and that you're going to want these cards in a high resolution. Here's my initial thoughts on how I'd tackle this:

    1. Have a MYSQL database that contains all of the information needed for each possible card including images.

    2. Have C3 do an ajax call to a php script that selects the cards from the database depending on what the POST parameters from the AJAX call is.

    3. Have the php script use one of the pdf libraries available to build a pdf file containing the cards in the proper layout.

    4. Once the php script builds the pdf file, have it reply to the AJAX call with the location of that pdf file and then, C3 provides an external link to it. Once it's displayed in a browser, the end user can decide what to do with it.

    Two minor details. I've only worked with one pdf library and while it does work and the print quality is what you'd expect from a pdf, it's essentially it's own programming language. Getting that set up would be a chore. And, getting rid of the pdf file after a period of time would require some forethought. Of course, you could e-mail it to the player with php and delete it immediately.

  • Yea, it's confusing me. I'm running the beta so I don't have to screw with functions when that goes live. When I run the app from the desktop it keeps asking to update and I keep telling it to update. It apparently doesn't. So, I did something stupid. I told it to install the new version as an an app at which point I had 2 desktop icons. I then ran the old version and told it to uninstall.

    It uninstalled both.

    So now, if I go back to editor.construct.net it's telling me I have r142.2 installed and it wants to upgrade to 145. If I do the upgrade, I can't install as an app. But, if I run the r142.2, I can install as an app.

    So, I reinstalled r142.2 as an app and now, it's back to asking me to update every time I run it.

    *boggle*

  • If you've upgraded to C3:

    construct.net/en/make-games/addons/190/html-element

    That'll allow you to create a box with HTML and CSS instead of bb code and you can add coding into the HTML to call C3 functions based on events like clicks or mouse overs.

  • Nevermind, my stupidity. Six hours of tearing a plugin apart and I find a line in the c3 code I didn't remember adding that adjusted it's width again. Duh.