b781rev's Forum Posts

  • Can you give me an example? I'm think I'm getting it, but I don't know. I'm going really fast on all this. And my computer is really slow. What do you think about my layout?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • OK, this is the website I'm working on:

    My Website

    Right now I have the AJAX example I'm working on posted on it. It's calling jax.php and sending the request to get two different values from the same page. In a little bit I will post the source for contruct 2.

  • Ok, I'm working on this example, but I ran into a minor problem. It seems to me that you can only pull one variable at a time from a request. So far I have multiple events for each request. I'm trying to figure out how I can do this without so many events. But I can use the same server side page to call all the data. I will post what I have when it's done.

  • It's easy. When you send the call to the page just do this:

    "jax.php?level=" & level & "&score=" & score

    On your php page just call them like:

    <?php

    $level = $_GET['level'].

    $score = $_GET['score'].

    ?>

    I replaced the semicolons with periods because they won't show when I post this. And make sure there is a semicolon at the end of line 2 and 3. Then from there you can save to your database and call it back say when a user is logged in or something. If you can't figure it out I will repost a working demo when I get off work.

  • Well, html5 is newer and hasn't completely made its way through the web yet. And, yes, a lot of people still run older machines but it's a thin line on if you want to create games using html5 or not. I like it, and it's the future because the technology and graphics will only be getting better and better. You should also make sure everything in your game is organised well, not a lot of events running in your current layout by making sure they are destroyed when not on the screen. It's hard to tell why it could be running slow without seeing the game structure. Right now I'm using a piece of crap laptop and my projects run fine on it. I would just go and check how everything is setup. You have to make sure your events are destroyed properly.

  • no prob, don't wanna do sh*t without permission.

  • I am wondering if this was useful or not? If it wasn't please let me know so I can post something better. This was something I did really fast. I was/am hoping it will help anyone with the AJAX feature who is having troubles with it. Give me your opinions. And constructive criticism is very much welcome. Thanx

  • Hi,

    I really like the layout of your website. I was wondering if I can use some of the design in my own personal website. Of course, there will be original designs in it, but I mostly like the top and bottom bars. I just don't want to design it without your permission.

  • Ok, here is the link:

    http://www.4shared.com/file/4djW66uI/construct_2_ajax_sample.html

    jax.php:

    <?php

    $level=77l

    echo $level

    ?>.

    I'm running my own server on my personal computer so I don't know exactly how this will work for you. If you have any questions I will try and help out as much as possible.

  • Ok, I have it figured out mostly. I will post it in a few minutes. It's really simple for the most part. I used the example on here to do it, but it's just to show you how it is done.

  • I'm still working with it as much as I can. I'm working a full time job and also designing a website. I can send data to a php page and save it to a database but still working on retrieving the information and using it in the game.

  • Can we start a forum just for AJAX? I think it would be very useful.

  • I'm going to be doing some work on the whole AJAX thing within the next couple days. I think I have a pretty good grip on it, but it will take some time to get it figured out. I will post whatever I figure out. I have only been using this program for two days so I'm new.

  • Ok, I think I have it. I will try it out in a little bit. Thanks for your help and sorry for being a pain. I won't be this troublesome in the future.

  • So basically I have to make a call for everything I want to load for example:

    php page - level: 5

    and it would be like var AJAX.level

    ... it will retrieve 5 and I can load the level from that if I put it into a global variable?

    Sorry, just trying to get my head around it. I know how AJAX and php work but for some reason I just can't get this through my head. This is the only thing I'm having a problem with in this program.