PerlRPG Movement System

Written on May 21, 2016

As I explained in an earlier post, the movement is done via system movement.

However, perhaps a easier way of addressing this issue is with a system that measures and addresses files.

When a client “moves” from one stage to another, the client could do a full scan of the stage folder. The folder contains one file. That file has the addresses of objects in that stage. So you can spot treasures and characters in one stage. The file also contains addresses of locations near it. So when the client queries what is in the file, it also is given addresses of the objects in the adjacent folders. The structure may look like this:

/01/001/file.txt -> North /01/002/file.txt -> East /01/003/file.txt -> West /01/004/file.txt -> South

The names are arbitrary, but generally it would work that these are the files the server looks at as this file lists the nearby addresses. The server runs a program that then queries these and format them for the client, so that they client knows that these things are happening in these areas.

The server will also make changes to the file but none of these addresses should be touched.

The server should log each change, so that if an error occurs, the operator can trace where the error happens.

Another thought: instead of checking all the time where player is: check when the client starts where the player is. Then store that location in memory. Whenver player moves, aniticipate location, so the program doesn’t have to scan the entire folder system for player again. Put data into database that is retrievable.


Take me home.

Check out the archive.