New engine features

Top  Previous  Next

Improved video_screen instruction

 

The printf( ) instruction can display texts in the startup window of the engine if video_screen is set to zero. This is a great way to use the engine for applications that don't require Gamestudio's graphical power (and thus use much fewer computer resources).

 

function main()

{

       video_screen = 0;

       printf ("\n\nUse printf to print text into the startup window when video_screen is set to zero");

}

 

aum91_beta1

 

 

Improved level editor

 

WED's Block Properties panel was improved once again, allowing an easier manipulation of the level blocks.

 

aum91_beta2

 

 

A brand new set of http functions can be used to communicate with PHP scripts or to access an online database

 

// the ip.php script resides on Conitec's server

#include <acknex.h>

#include <default.c>

#include <acknet.h>

 

STRING* ip_str = "";

 

// start the script "ip.php" on a remote server, and return the caller's IP address

function main()

{

       var id = http_post("http://coniserver.net/scratch/ip.php",NULL);

       while (!http_status(id))

               wait(1);//wait for the server to reply

       if (http_status(id) == 1)  //transfer successful?

       {

               http_result(id,ip_str); //get the replied IP

               printf(_chr(ip_str));

       }

       else

               error("Error during transfer!");

       http_free(id); //always cleanup the httpid!

       sys_exit(NULL);

}

 

ip.php:

<?
$ip ="$REMOTE_ADDR";
echo "Your IP: $ip";
?>