User Tag List

Results 1 to 9 of 9

Thread: Online Access

  1. #1
    No Products Registered

    Join Date
    Mar 2009
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Online Access

    Let's say I want to make a game in which you can view and submit scores to an online hi-score board. What is the best way to achieve this? MooClick? FTP? E-mail?

    And also, is it safe to use these online functions? Is there any kind of security to stop people taking a peek at the code and getting server login information?

    Thanks in advance.

  2. #2
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Online Access

    The most common way of doing this is to connect to a PHP page using the Moosock, OINC or Live Receiver objects and send the data through that to a database. This means that the security of the scoreboard is up to the game and page itself (and the server login information is kept in the page code, so your game doesn't have to worry about those) - there's a tutorial for it near the bottom of the Tutorials page, linked on the right sidebar.

  3. #3
    No Products Registered

    Join Date
    Mar 2009
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Online Access

    Ah, sweet.
    I am a little experienced in PHP+Databases and ideally wanted an interface like this, but I wasn't very familiar with the online objects in MMF. Thanks a lot!

  4. #4
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Online Access

    Try the Get object - it's Java compatible, too.

  5. #5
    No Products Registered

    Join Date
    Mar 2009
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Online Access

    If I'm not wrong, the Get object doesn't seem able to send information, only recieve it.

  6. #6
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Online Access

    Because of the way that requests to a web page work, you can send information in the act of receiving something from a page, in the GET query string (see the URL for this page - the page loaded is just "ubbthreads.php", but additional information is sent after the ?, such as the thread and post to look up). The tutorial does this in the same way.

  7. #7
    Clicker Fusion 2.5

    Join Date
    Jul 2006
    Location
    Illinois. USA
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Online Access

    Hey all, I am back. Even know a lot of you don't know me too well anyways lol. Had major surgery and now got my own website up now. I do have a question regarding High Scores.

    On my website I have a few games that wont record your High scores and some that do. The 3 that will record your high scores I like a lot. It shows not only 1st - 10th place, but of course the score, AND when it was played. It will show like 1 day ago or 11 days ago. Would this be easy to do? If not I will just do the regular HIGH Score deal where people can see the top 10 scores.

    If you need to see what i mean by this go to www.retro64games.net click on onlinegames and then try either lunar lander, battlezone, or Adventure. Either one will do.

    Thanks

  8. #8
    No Products Registered

    Join Date
    Mar 2007
    Location
    San Diego
    Posts
    280
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Online Access

    I'm not entirely sure what you're asking, but you can use this php function to convert a date into the "time ago" format:

    Code:
    function nicetime($date)
    {
        if(empty($date)) {
            return "No date provided";
        }
       
        $periods = array("second", "minute", "hour", "day", "week", "month", "year", "decade");
        $lengths = array("60","60","24","7","4.35","12","10");
       
        $now = time();
        $unix_date = strtotime($date);
       
        // check validity of date
        if(empty($unix_date)) {   
            return "Bad date";
        }
    
        // is it future date or past date
        if($now > $unix_date) {   
            $difference     = $now - $unix_date;
            $tense         = "ago";
           
        } else {
            $difference     = $unix_date - $now;
            $tense         = "from now";
        }
       
        for($j = 0; $difference >= $lengths[$j] && $j < count($lengths)-1; $j++) {
            $difference /= $lengths[$j];
        }
       
        $difference = round($difference);
       
        if($difference != 1) {
            $periods[$j].= "s";
        }
       
        return "$difference $periods[$j] {$tense}";
    }

  9. #9
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    UrbanMonk's Avatar
    Join Date
    May 2008
    Location
    Southern U.S.A.
    Posts
    847
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Online Access

    Yay! Thanks for that code KetchupMaster! Now the dates on my score boards are a whole lot more useful!

Similar Threads

  1. Access device DPI?
    By Bipolar_Games in forum Android Export Module Version 2.0
    Replies: 8
    Last Post: 5th April 2013, 09:47 PM
  2. From Access to array
    By LeGauche in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 25th August 2011, 10:27 PM
  3. Can you get access to the code?
    By BREK in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 23rd April 2009, 07:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •