RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Resource icon

[2.x] Ultima Live Map Streamer and Editor 0.97

No permission to download

Praxiiz

Sorceror
Praxiiz submitted a new resource:

Ultima Live Map Streamer and Editor (version 0.63) - Adds support for streaming and editing maps while the game is running

UltimaLive v.0.63

Introduction
-----------------------------
The purpose of UltimaLive is to allow a shard to edit its maps, stream those changes to its players, and use more than six map files.

Map Editing and Streaming
-----------------------------
UltimaLive provides shard developers the ability to alter maps without the hassle of redistributing map files to their entire player base. This gives shard developers the possibility of scripting events that make changes to the...

Read more about this resource...
 

PrinceArda

Sorceror
Looks like a very useful script and a great tool to further customize the game experience! Thank you for your work!
 

acidev

Traveler
Amazing!

Just a couple of questions:

When a character discovers parts of the map, are they also available for the other characters?
I understand that this system is not intent to create "undiscovered places", but someone might like the idea :)

How do you think will that system affect on the required bandwith?
 

Heim

Page
Amazing! and perhaps a way of getting more of the player base to try shards with custom maps.

I am guessing with this script I could create a map33.mul. Then distribute that file to new players, so they could play both my shard with a custom map, and other shards using the classic map?
 

PrinceArda

Sorceror
I think it is appropriate to ask this here, as people who come here likely have the knowledge on map editing.

Throughout the years there were many programs to edit map.mul files. We can find a few online which work, but some are outdated.

As of today, what would be a good tool to edit maps? If there are any, what are the compatibility issues in terms of client versions? (For example verdata editors were outdated when verdata.mul was taken out from the game)

In other words, what is the best tool to compliment this wonderful script that utilizes its products?
 

Heim

Page
CenterED would be the best bet for editing parts of the map to make the most of this streaming feature. Really nice program, easy to use and readily available. As far as making them from scratch, I think people still create bmp's and use Dragon. Try asking Eri at UO-pixel.de what he uses. He is still actively creating maps, and his are a thing of beauty :).
 

PrinceArda

Sorceror

Praxiiz

Sorceror
The system does have an impact on bandwidth, but it depends on how you decide to use the system.

Here are a couple of use cases:
1. A shard wants extra maps, but does not want streaming capability

In this case there is no impact on bandwidth, other than a couple extra packets that the server would send to let the client know how big the maps are. This would only happen when a player logs in.

2. A shard distributes its maps including extra maps, and keeps streaming turned on

In this case the server will send a 15 byte packet every time a player enters a new map block (blocks are considered a group of 8x8 tiles). Every 8 steps in a given direction would result in the server sending an extra 15 bytes. The client would then respond with a packet that is 71 bytes long. 15 + 71 = 86 bytes every time a player moves 8 squares. This is the cost of the server asking the game client if the 25 blocks surrounding the player match the server's copy of those blocks.

Since the majority of the maps are already downloaded and given to players, that would be the biggest cost (except when there are changes, see below).

3. A shard keeps streaming on and doesn't distribute the maps (or a combination of 2 & 3)

In this case, every time a player moved 8 tiles the server would send its 15 byte check, and the game client would send its 71 response. Based on the game client's response, the server would stream any blocks that the game client is missing (or that have changed). The system is checking the 25 blocks surrounding the player (including the block that the player is standing in). Each block that has to be streamed to the player takes 192 bytes for the land data and then 15 bytes + (7 times the number of statics in the block).

Essentially, if your players don't download your map and statics files, you will be streaming those files to the player in small chunks as the player runs around.
 

Praxiiz

Sorceror
To address the map editing aspect of this system. It's really clunky. GoldDraco13 made a nice gump system that can be used, but it doesn't come bundled with this script.

There are many tools that can be efficiently used to create new maps from scratch. This system doesn't really focus on the editing aspect as much as the streaming aspect. I would recommend creating new maps with existing tools, and using this system to make changes after you've already distributed the map files.

My motivation for rewriting this system and it's continued development is to eventually have a system that will generate new maps (using procedural content generating algorithms) including terrain, terrain decorations (trees, rocks, shrubs, etc), random spawns, random dungeons etc.. All of those systems can be coded up server side now that the client functionality exists.
 

Praxiiz

Sorceror
I am guessing with this script I could create a map33.mul. Then distribute that file to new players, so they could play both my shard with a custom map, and other shards using the classic map?

The system actually creates a new set of files for each shard. Included in the distro is a file called UltimaLiveSettings.cs. It currently only has one setting, which is ShardIdentifier. Each shard should uniquely rename this.

UltimaLive creates a folder under appdata called UltimaLive and under that folder it creates a subfolder with your shards unique identifier. i.e. C:\ProgramData\UltimaLive\ShardName (Windows 7)

When a player logs into a shard that uses UltimaLive, the definition of all the maps are sent to the players game client from the UltimaLive server-side scripts. Ultima receives those definitions and then creates blank maps for each one. To distribute your maps files to a player, your files must be copied into that unique folder.
 

Heim

Page
I see. So if I used a quick installed that did the trick, I could offer players a painless option of playing my custom map shard, and their regular shard with the same install. Thanks you :).
 

acidev

Traveler
So, a character "discovering" the map will generate the transfer of about 5Kb data in the very first moment on a unknow map(checking and downloading the 25 blocks around it), then 1.02Kb every 8 steps(check + 5 blocks download, assuming there are only land tiles).

To me it seems viable, still playing with a 56k modem :D

Other boring questions:
Assuming a character "recalls" on a "undiscovered" map, which block will be the first to be dowloaded? My point is: having replaced the black tile(no tile) on wich the character is standing on can cause instability/errors/crashes of the client?

I'm downloading a compatible version of the client, can't wait to try it :)

Is OSI using something similiar?

Many thanks for the answers and especially for your work, I will rate it as soon as I try it :)


At the moment, blank maps are populated with grass at altitude 0. That is why you see the green blocks and the shadows in the youtube video I posted
Right! *palmface* silly question, sorry.
 

Praxiiz

Sorceror
At the moment, blank maps are populated with grass at altitude 0. That is why you see the green blocks and the shadows in the youtube video I posted. So if you recalled to a place you'd never been to, what would happen is that the client would think you were under the world (or possibly over it), but the grass tiles would be there. It's not a big deal, when you enter a cave with a regular client without UltimaLive you are technically under the terrain anyway. This system should work with any of the newer clients, and I am considering adding support for many of the older clients if enough people request it.

EA Mythic uses a god client that uses the same types of packets as UltimaLive. I have kept the Ultima Live packets to follow the sizing rules so that if someone logs into a shard without ultima live, the packets will effectively be ignored.

As far as I know EA Mythic uses the God Client Internally to alter maps, but then the maps must be updated to the client before players see the changes. Right now EA Mythic does not support streaming maps to their playerbase.
 

acidev

Traveler
In the install instructions, Praxiiz, you may want specify that is necessary to run the server as administrator on Vista/7/8 the first time. I encountered a fatal error during the loading(compiling was fine) and it took me a bit to realize that. It was about a reference to an unexisting object, not really a helpful message. In the first time i checked my edits to playermobile then I remembered that UL saves/creates the maps in "ProgramData". Imho having to update files in a hidden and protected folder can be complicated for unexperienced players.

During my brief test I noticed a little issue, to be honest pretty annoying, gameplay's window( the map too) flashes black(only 1 time) during the blocks updating, but that's probably caused by the slowness of my computer, maybe it's the poor support of GDI of the ATI drivers or it's the HD, I dont know.
Using [go to change location I've experienced a crash of the client(only one time): black map and crash.
By an "insane use" of "[m tele" can happen to get stuck in a black map that not update.

I hope can help.
 

Praxiiz

Sorceror
The black flashing issue can be more noticeable at time that at others. It is caused by the system forcing the game client to update. Basically UltimaLive updates the clients view of the map, and then tells the client that it is out of sync with the server. This forces the client to reload its view of the map and is the main mechanism to see the streamed data while the game is running. Unfortunately, I am not working with original source code, all I have to work with is the compiled game client. The flashing can be annoying at times, but you should only see it when you encounter a new part of the map or something has changed.

I also need to figure out some sort of screen or way to indicate when the client is creating blank maps.

I updated the client installation instructions and put a limitations section on the main page that addresses the black screen flashes.
 
This looks like a GREAT system, GOOD JOB

To Let you know, I would be one of the people interested in it to work with the older clients (7.0.3 to be exact) - I have to many custom art files to try and mess with the new UOP system (did any one break it yet?)

Also a quick question, on the new maps that people would make, you said they have to be the size of fel/tram maps, but do you have the restriction of the water/dungeon line, or can the whole map be used as 1 big map?

again great job!!!
 

Praxiiz

Sorceror
Lord_Greywolf said:
Also a quick question, on the new maps that people would make, you said they have to be the size of fel/tram maps, but do you have the restriction of the water/dungeon line, or can the whole map be used as 1 big map?

This is a great question.

The limitation on the maps is really a memory limit. Rather than implementing a fully working uop reader/writer, I implemented the reader portion only with the ability to change the data portions of the uop files (but not the metadata, or the fileblocks, etc). What this means is that when the client loads up, UltimaLive loads the uop map file for felucca into memory and parses it. UltimaLive uses that memory space to load each map when you change maps. If I had implemented a fully working reader/writer then I could simply extend the size of the in memory uop file to accomodate larger file sizes. I didn't do that however, and so for now UltimaLive is stuck using maps that are the same size or smaller size than the Felluca map.

A thing to note here is that it isn't a restriction on the exact dimensions. As long as you have as many or less map blocks in your file as Felucca, it will work fine. So instead of having a map that is 896x512 blocks, I could have one that is 512x896 blocks, or anything smaller.

When I add support for older clients, this restriction will likely change and I will be able to allow larger map dimensions. It's a tricky balance though because the game will use more memory if I do allow higher dimensions.

Another thing to note is the limitation on statics. While the current Felucca statics file is only 19,935,055 bytes, UltimaLive will handle a statics file that is upto 200,000,000 bytes. That should be plenty of room, but you need to consider fragmentation. When you change a block by adding a static to it, you are increasing the size of that block in the file. Adding a static to a block would result in UltimaLive moving that data to the end of the file, leaving some space in the file that is unused. This is called fragmentation. Currently, UltimaLive does not defragment the file, but it is on my list of things to add to the system in the near future.

Given enough changes, a statics file could grow to be bigger than the 200 meg byte limit. It would likely take a really long time because the player would have to visit that portion of the map between changes. Once defragmentation is implemented, UltimaLive will periodically condense those files. Also keep in mind that this only happens when there are changes, not simply streaming. Streaming always packs the file without fragments, using the optimal amount of space.

Finally, I will try to answer your question about the water/dungeon line. In the map registry file, there are two sets of dimensions. One set is the map dimension, and the other is the map wrapping dimension. UltimaLive puts these values into the game client's memory when you change maps. In the previous version of this system, I had done some testing to see if it was functional. From what I can tell, it is functional. If you want to use the entire map as one big map, I don't believe there will be any side effects.
 
cool

thanks for the quick reply

where is that map registry at? i have never seen where it has the set for the map and for the warpping - could be interesting to be able to mod it and make 1 big wrap-able map :)
 

Praxiiz

Sorceror
Just for fun I tried using the system with client 4.0.11c. As I suspected, the map didn't stream (because it's designed for the .uop format). Much to my surprise, however, it did stream statics. This is really encouraging and I suspect that it will be a minimal effort to add support for older clients.
 
Top