Tiny Priority Queue update

Just updated my priority queue library and added in two simple procs.

List() - Returns a list version of the queue leaving the original queue in tact

RemoveItem(i) - Finds and removes the item i if it is in the queue.

http://www.byond.com/developer/Theodis/PriorityQueue

Posted by Theodis on Tuesday, May 13, 2008 09:32PM - 1 comment / Members say: yea +0, nay -0

Racing Game update

Just made an update. Give it a shot if you have version 414 of BYOND. If you aren't running Windows 98 or Windows ME you should be pleased(and if you are it'll probably crash :P). I also wanted to see how horribly laggy multi player is but couldn't find anyone to test with. If you can test this please comment.

http://www.byond.com/games/Theodis/RacingGame


[Edit] For some reason a few junk files ended up in the cars folder. And unfortunately updating can only add/replace files not remove them. So if you want to get rid of the bad car entries so random car doesn't select blank cars delete the zero length files in the cars folder. Also I'm phasing out the maps not made by Foomer since they just aren't at the same level of quality. You can keep them around if you want but they won't be included in the game package anymore.

Posted by Theodis on Monday, March 31, 2008 11:20PM - 8 comments / Members say: yea +0, nay -0
(Edited on Tuesday, April 01, 2008 09:58AM)

Took 5+ years...

Took over 5 year but I finally got the feature I wanted for Racing Game! Anyway just added 2 lines of code to have it set the client pixel offsets and it looks wonderful. If anyone wants to see an example of the new client pixel offsets you can check out Racing Game.

http://www.byond.com/games/Theodis/RacingGame

[Edit] Actually almost 6 years now ID:102345.

Posted by Theodis on Tuesday, March 25, 2008 06:23AM - 8 comments / Members say: yea +0, nay -0
(Edited on Tuesday, March 25, 2008 10:32AM)

Wow

When I was 8 I received a junky old TI computer from relatives from which I taught myself to program BASIC. While talking about old computers I was reminded of it and did a bit of searching and found the wiki entry on it. And looks like it is roughly as old as I am!

Anyway a few years after after getting it the part that hooked up to the TV went bad. I tried to take it to Radio Shack and see if I could get a replacement but apparently the part was too old and couldn't be replaced though the guy there was nice and opened it up and gave a shot at fixing it which did get it running for a bit longer.

While talking about it I joked about finding the part on ebay. But apparently it wasn't much of a joke and I ended up finding it. Only 5$ too though an extra 6 or so for shipping. Being a pack rat I still have the computer and managed to dig it up. I tried to power it up but then realized how hard it'd be to tell if it was actually working without the TV hook up since there are no lights on it and no moving parts inside to hear spin up so it's pretty darn quiet if it is working!

I'm real tempted to just blow the 11-12$ on the video modulator just to see if it works since I actually still have a TV that it can hook up to laying around as well.

Another interesting thing I found when searching on ebay was someone selling the whole computer and received this awesome question
"Q: Can this computer run Office 2007?
A: I don't see any way this computer could run current software, but I'm not a computer guy."

Posted by Theodis on Thursday, January 03, 2008 02:30AM - 1 comment / Members say: yea +0, nay -0

Stupid URW region save file

Warning: Unless you happen to be Jtgibson you'll probably have little idea what on earth I'm ranting about and if you are Jtgibson prepare to be appalled!

Anyway for those that don't know I made a character/map editor for the game Unreal World(http://www.jmp.fi/~smaarane/urw.html). A while back the game had a major update and the structure of the save files changed ruining compatibility for my editor. Recently I've been digging around the files in a hex editor cataloging the file format which is nice and easy given the author of the game simply dumps arrays into files making them super easy to figure out. I just figure out the length of a struct by finding the distance between the same strings in two different elements of the struct and then set my hex editor rows to be that length and I got a nice pretty view which each line containing an element of the struct. The full array is dumped into the save file including all the blank entries. So for example a local map(50x50 map chunk which is represented by 1 tile of the world map) can have up to 10,000 objects, NPC, and various other things total. The struct which provides links to these things is 36 bytes in length. Which means the save for every localmap is 360000 bytes + 2500(50x50) bytes for the map tile data, 2500 bytes for storing what tiles you've seen, and 8 bytes of positioning data for where the local map is on the world map for a grand total of 365,008 bytes for every single local map. Since each of the 1024x1024 world map tiles could potentially eventually get one it's a bit frightening to think about. As gargantuan as that is the stupidity of how region name data stored is even worse since it's got a bone head simple solution.

The world map in the old versions was split into a grid of smaller rectangular chunks with clearly defined borders. In a file called globnfo.nfo contained a neat list of names for every one of these chunks. In the new version the borders were done away with and the world map is just one big 1024x1024 map(though in the save file it's actually 1025x1025 with the right most and bottom most column and row being junk).

Opening up the largest save file(when just starting at least) called marker.dat at 42MBs and with a quick glance it's easy to see it was just a list of fixed length strings with lots of repeating, each looking like the region names of the old version. So I set my row length in my hex editor to 42 which was the apparent length of each string max. Next I divide the file size(44,040,192 bytes) by the size per entry(42 bytes) to get a number of entries, totaling at 1,048,576. That's a lot of strings! And being a programmer I quickly enough recognized that the number seemed familiar. So I took the square root and boom got 1024. Then it clicked, the region name of every single tile on the world map was being stored in a correspondingly dimensioned 2d grid. This is just bad in system memory and downright terrible to store it on disk this way. However at the very least it should allow for non rectangular more natural regions right? So I programmed my new map viewer thing to draw a line between any two tiles that have different regions which should produce a nice outline of the borders between regions. This was the result.



@#$%! Every 32x32 chunk of the map is a region. Why the heck did the author have to store that information for every tile!? If he would have just made it a 32x32 array and did some simple math to figure out which tiles belongs in which region the file size would be a mere 43,008 bytes! An even 42KB rather than 42MBs. Loading that stupid file in my editor stalls it for 5-10 seconds on my machine and I bet it does similar things to the game itself when it loads a character.

This game is fun and all but this really shows the lack of programming talent the author has. I might actually have to get around to doing something similar only data driven but I'm not too much for handling researching and filling out all the data necessary.

Up for a project Jtgibson :P?

Posted by Theodis on Thursday, December 06, 2007 07:20AM - 7 comments / Members say: yea +0, nay -0

 

 

Blog Calendar

May 2008
Su Mo Tu We Th Fr Sa
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
 
«Mar  

My hosted files

(14.2 KB)
(13.1 KB)
(1.1 KB)