Can construct 2 work with an sql database?

Get help using Construct 2

Post » Mon Aug 13, 2012 11:33 am

Hello all. Really new to construct 2 within 5 mins was completly shocked at how well this engine has been made. I've been working with a 3d engine for sometime now. I enjoy it but theres a lot of work to be done for one person. I also have made the best part of a PHP/Javascript game which i've worked on and off for a fair few years now. Again tremendous amount of work for one person! If you wish to see this game you can find it here http://mme.gamefreaks1234.com

So i have a fair bit of coding knowledge behind me and just wanted to say the way the developers have made the code side of construct 2 is unbelievable. I was impressed with app inventors way of doing the code but this truley is a 1000 times better then that. Enougth of my praise for these wonderful developers who made construct 2. Right to my question....

As i've mentioned i've had a fair bit of experiance with sql. So my question is... Can construct 2 work with an sql database or if not could this be a possability for the future? The benefits of this would be making MMO styled games. Thought i would ask as i'm away from the pc. Though i can truely say i'm looking forward to see what capabilities construct 2 has.Gamefreaks12342013-06-30 12:31:48
B
6
S
1
Posts: 50
Reputation: 975

Post » Mon Aug 13, 2012 11:37 am

You can send/receive server-side requests thanks to the AJAX calls (the dev of C2 also wrote a wonderful manual ).

Program your server-side database and script and simply call it/passing parameters to it.
You can find some examples for PHP in the how do I FAQ section "AJAX".
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Mon Aug 13, 2012 11:55 am

Wow thanks for the quick reply! Aha ajax! The beuty of web scripting. If i remeber correctly ajax can load a php script in the background using get to pass over your variable information. I could be wrong it has been awhile since i played around with web coding due to working with 3d. If i am right then the implication may be loading a php script every tick to record a players position might be too much for the server. Still i'm sure i will be playing around with this once i've had some more experiance with construct 2. Still have to say if anythings going to put an end to flash for games this is it!Gamefreaks12342013-06-30 12:32:01
B
6
S
1
Posts: 50
Reputation: 975

Post » Mon Aug 13, 2012 11:59 am

AJAX calls + SQL database are not the most indicated way to do some multiplayer game.
The SQL database will rather hold profile infos, and stuff of the like you don't need to access each tick.

For multiplayer "realtime" games, check the how do I FAQ at the section "Multiplayer/Networking". Few elements listed there, but networking is an intensive task.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Mon Aug 13, 2012 12:17 pm

Yeah really i'm sure networking is experimental at this stage. Ofcoarse yes not a suitable way for realtime multiplayer. Non the less still a great way for many fancy things. More importantly this just shows the flexability of construct 2. Gamefreaks12342013-06-30 12:32:14
B
6
S
1
Posts: 50
Reputation: 975


Return to How do I....?

Who is online

Users browsing this forum: jul and 24 guests