User Tag List

Results 1 to 7 of 7

Thread: Saving/editing/loading a large level, server-side.

  1. #1
    Clicker Multimedia Fusion 2
    SergeantBiscuits's Avatar
    Join Date
    Sep 2006
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Saving/editing/loading a large level, server-side.

    Hey fellas! I need a push in the right direction if someone would be so kind.

    I'm working on a multiplayer game (using Lacewing) that takes place on a euclidean grid of 16x16 squares. 'Ground level' is a two-dimensional plane, with each square being stackable up to three high with some material. Think Minecraft with a three-block height limit.

    I want the playing field to be 512 x 512 x 3. This gives me 786,432 'blocks' in space I potentially need to store, and I need these blocks to be manipulable by any player in the server (and of course update between clients and the server.) Best case scenario, I have a dedicated server application that stores all the contents of the world and relays changes and such to the clients when appropriate.

    In addition to the blocks in space, I want to keep track of items that exist in the world (dropped guns, zombies wandering around, etc.)

    I can think of many different ways to go about doing this but I'm asking if there is a 'standard' theory behind this. I have the rudimentary multiplayer game done (with players who can run around and shoot at each other but with a fixed playing field) and a Lacewing server application that hosts the game.

    Where do I go from here? Do I have the server read and write to and from an array file? Do I make a text document with rows and columns that correspond to the three layers of the grid, with ascii characters representing the contents?

    Here is a mock-up of the kind of world I'm looking at.

    http://i39.tinypic.com/25qt476.png

    BLATANTLY, BLATANTLY STOLEN MINECRAFT GRAPHICS as placeholders for future reference. I just slapped the MC stuff in there because I want to make sure I can pull off this game before I pour artistic effort into it.

    Thanks for the halp! Any advice greatly appreciated.

    Wes

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi, you can monitor the channel messages with the Lacewing Relay Server extension and track the changes serverside. When a client joins the channel you can send the the entire array, and the server extension will by default relay channel messages for you so you can update single blocks at a time from each client's end. You can also 'deny' a message to prevent hacking, for instance. When the server closes you can save it all to an array or just any file depending on how the level format is set up, though I think you mentioned array and know what you have in mind.
    Working as fast as I can on Fusion 3

  3. #3
    Clicker Multimedia Fusion 2
    SergeantBiscuits's Avatar
    Join Date
    Sep 2006
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ooooh, awesome! I haven't heard of the Relay Server ext. You wouldn't happen to know where I could download it, would you? A quick search came up with nothing.

    So as I understand it, I would put the Relay Server ext into the dedicated server application and use it to stash (in a 'master' array in the server application) any changes made to the world by the players by intercepting "to peer" messages the players are tossing back and forth?

  4. #4
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Normally you would send channel messages so ALL peers are made aware of the changes, but yes that is the idea.

    The Lacewing Relay Server comes in the same download as the Lacewing Relay Client and the Lacewing Webserver, perhaps you have a much older version than the current Build 20?
    Working as fast as I can on Fusion 3

  5. #5
    Clicker Multimedia Fusion 2
    SergeantBiscuits's Avatar
    Join Date
    Sep 2006
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Aha, I had build #14! Got all my stuff updated to #20, thanks!

    I have the maps for the clients updating correctly, but I'm having trouble figuring out how to get the server to pick up on the messages being sent to the channel by the clients. I can't seem to find a "on binary message FROM channel" in the Server Relay ext. How do I get it to listen to messages being sent?

    Thanks!

  6. #6
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I think you're looking too hard - the correct condition to use is "On Message to Channel". Here's a quick starter guide:
    Working as fast as I can on Fusion 3

  7. #7
    Clicker Multimedia Fusion 2
    SergeantBiscuits's Avatar
    Join Date
    Sep 2006
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Aha! I missed the 'enable condition' action. Works like a charm now. Thank you so much for takin' the time to help me out!

Similar Threads

  1. Server Side Saving/Loading iOS Specific
    By cfullerNY in forum iOS Export Module Version 2.0
    Replies: 6
    Last Post: 10th May 2013, 06:27 PM
  2. Simple level editor with saving and loading
    By Konidias in forum File Archive
    Replies: 30
    Last Post: 8th June 2012, 08:37 AM
  3. PHP Server side app needed to...
    By Tuna in forum SWF/Flash Export Module Version 2.0
    Replies: 13
    Last Post: 28th August 2010, 05:59 AM
  4. Loading and Editing MP3's?
    By NathanGlover in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 11th December 2007, 05:19 PM
  5. MOO documentation of SERVER side
    By Patrick in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 13th July 2006, 02:54 PM

Posting Permissions

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