BZFlag Mapatorium

External websites, for and about BZFlag
User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

BZFlag Mapatorium

Post by RPG »

Whenever I need to tell somebody learning PHP how NOT to code, I'll show him the Mapatorium. Let's face it, it's the worst collection of code I ever wrote. It may look good and pretty on the outside, but on the inside it is so screwed up and challenged that you'd be lucky to get anything done in it anymore. Recently I tried fixing it, and counseling it's problems back to health, but I only ended up breaking more of it Sad.

So, this is the official announcement that I will no longer be maintaining the BZFlag Mapatorium. I can give somebody else the code (if they feel like dying from the ugly horror of it), and hell, don't even give me credit. I'm ashamed I wrote code that bad Laughing.

I will still host the code and the database, at least until someone else takes it or I run out of web space, but I will no longer touch the code or aid with administrative functions. The mapatorium is now an anarchy. Have fun.

BZFlag Mapatorium
User avatar
A Meteorite
Private First Class
Private First Class
Posts: 1786
Joined: Thu Apr 28, 2005 12:56 am
Location: California, U.S.
Contact:

Post by A Meteorite »

I would love to tinker with the code, send it along... I may do something with it... :)
Image
Owner @ BZFX
Core Admin @ CAN

Email me: bzmet…@gmail.com
pyr0
Private First Class
Private First Class
Posts: 144
Joined: Wed Jul 13, 2005 5:08 pm

Post by pyr0 »

id tinker as well ... i need to get back into php anyways :)
User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG »

Here it is. The BZflag Mapatorium: Releaased. (although, if you cashed in on one of the many security holes, you would have already been able to see the source code ;))

Basically, this is what I would describe as a piece of software I have written such as phpSiteManager:
Image

Here is the BZFlag Mapatorium:
Image
Great idea, horrible implementation, and then horrible hacker attacks.

Basically, there are 3 files you should download. Only the Code and SQL files are necessary if you want to play with the code, but if you want some data to work with, all the Mapatorium data as of march 27th is contained in the Data zip file. NOTE: the SQL contains the database data that tells the database that the Mapatorium Data exists. It is recommended that you download the Data also, although not required.

BZFlag Mapatorium Code: http://www.garrettsites.net/bzmaps/BZFl ... m_code.zip (100 KB)
BZFlag Mapatorium SQL: http://www.garrettsites.net/bzmaps/BZFl ... um_SQL.zip (33 KB) note: run this against a premade MySQL database. Then edit dbconnect.php in the Code zip file to reflect your MySQL connection settings.
BZFlag Mapatorium Data: http://www.garrettsites.net/bzmaps/BZFl ... m_data.zip (34.8 MB)

Have fun.
User avatar
ducatiwannabe
Private First Class
Private First Class
Posts: 3258
Joined: Tue Aug 10, 2004 3:55 pm
Location: Planet Earth
Contact:

Post by ducatiwannabe »

I hope it stays up, and sorry things didn't go well for you RPG.

Man, how could anybody do that to a Lamborghini Diablo! :( one of my favorite cars...
User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG »

Being taken down in 30 days, by an automated script ;)
User avatar
Sir Lance-A-Lot
Private First Class
Private First Class
Posts: 503
Joined: Tue Jun 29, 2004 12:49 am
Location: Amongst my Computers
Contact:

Post by Sir Lance-A-Lot »

Are you serious?

Man I better download all of my maps - I used that to archive them. :(
Image
User avatar
CannonBallGuy
Private First Class
Private First Class
Posts: 2083
Joined: Wed Apr 12, 2006 1:31 am
Contact:

Post by CannonBallGuy »

RPG, would it be possible to lump all the map files into a .zip available for download somewhere? :)
Image

Merry Christmas!

"Look, if I don't buy booze for the kids, I don't get any incriminating pictures to show to their parents, my business goes down the sink, my girlfriend leaves me and the baby goes on ebay. So help me search..."

"go Play With Toys urself in a dark alley u donkey ******" - Lt-Kirby2007
User avatar
A Meteorite
Private First Class
Private First Class
Posts: 1786
Joined: Thu Apr 28, 2005 12:56 am
Location: California, U.S.
Contact:

Post by A Meteorite »

I'm thinking (not promising, just looking into it) on making a re-make of the original Mapatorium dubbed Mapatorium 2.

The only thing used would be the style of the MySQL databases. :)
Image
Owner @ BZFX
Core Admin @ CAN

Email me: bzmet…@gmail.com
User avatar
Sir Lance-A-Lot
Private First Class
Private First Class
Posts: 503
Joined: Tue Jun 29, 2004 12:49 am
Location: Amongst my Computers
Contact:

Post by Sir Lance-A-Lot »

A Meteorite wrote:I'm thinking (not promising, just looking into it) on making a re-make of the original Mapatorium dubbed Mapatorium 2.

The only thing used would be the style of the MySQL databases. :)
Yay! The mapatorium lives on! 8)


*thinks about paying met to continue* :lol-old:
Image
User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG »

CannonBallGuy wrote:RPG, would it be possible to lump all the map files into a .zip available for download somewhere? :)
http://www.garrettsites.net/bzmaps/BZFl ... m_data.zip

All the maps, screenshots are located in there.
pyr0
Private First Class
Private First Class
Posts: 144
Joined: Wed Jul 13, 2005 5:08 pm

Post by pyr0 »

yay, something to fiddle with... lets see how it goes....
pyr0
Private First Class
Private First Class
Posts: 144
Joined: Wed Jul 13, 2005 5:08 pm

Post by pyr0 »

temporarily, until i work on the code a bit to secure it more and what not ... i have a copy running at http://www.pyr02k1.com with the old code, exactly as it was with the old user db and what not. feel free to add to it, and ignore any errors that randomly pop up as time goes on (itll be me screwing with the code :) )
User avatar
Sir Lance-A-Lot
Private First Class
Private First Class
Posts: 503
Joined: Tue Jun 29, 2004 12:49 am
Location: Amongst my Computers
Contact:

Post by Sir Lance-A-Lot »

There it is - just as it used to be ;) Hooray! :wink:
Image
pyr0
Private First Class
Private First Class
Posts: 144
Joined: Wed Jul 13, 2005 5:08 pm

Post by pyr0 »

my work has begun... I've decided to allow the current version to run while i code a new version. this version will use most of the tables (with several modifications to them to allow certain aspects to work the way i'd like... some will stay the exact same).

the code on the other hand, i'm reworking it. most will be done from scratch, some reused, some reused but modified either a little or heavily. i also switched the general setup (not on the working version, only locally) so that it uses base files [includes] for certain things (core, config and users. maps will come next, then forums and messages and finally administration). Core will hold the database connection function, theme control and a few other things, where as config is only holding connection values for the db and also setup options (a setup will come along after all works). then users, maps, forums and messages will control what theyre named respectively, holding all related tasks to each (deleting a map, editing a post, sending a message). This will make locating the problem child easier as well as making updating it all much easier. Administration will work with all the others to delete posts and maps and do whatever i feel is appropriate.

Currently, version will be 2.0.0-Alpha1. When I get to Alpha2 or 3 (mainly, just a working base to go from), I'll put it online and start importing data from the other. If all goes well, I'll have Alpha3 by next week (Depends on my work schedule and bz time... and when i sleep [should be now since i need to be up in 5 hours for work])

So far, it has a few errors as I code and run it here. But all to be expected considering I havent gotten to making my sql setup updated just right :) Still working on hard code rather then the DB... I'm pretty sure Meteorite will beat me to a live and working version of new code, but its ok... I needed a project to get back into PHP.

-pyr0
User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG »

You're a good man pyr0!

I'm glad to see the idea of the Mapatorium surviving, even if the code totally sucked (don't you agree?)
pyr0
Private First Class
Private First Class
Posts: 144
Joined: Wed Jul 13, 2005 5:08 pm

Post by pyr0 »

it actually isnt that bad... it isnt what you expect something that works so well to look like, but it works and it isnt impossible to navigate. i helped recode a site once, the code was so bunched that you'd find 5 if statements on one line, then find a use for the variable they set 100 lines below, mixed in with 1000 other things. it took me 10 minutes to find the mysql connect code... so this is cake :)

and thank a meteorite as well, because me and him are going to work on a sourceforge (well, hes requested the project for it) so we can code it together instead of seperately. making it much much better...

-pyr0
User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG »

Nice guys!

I also thought of an idea that I had a few months before when I was coding the Mapatorium.

There would be a server that would host the Map of the Day each day. If you look at the code, the "Map of the Day" choice is weighted so that more highly-rated maps have more chances of becoming the MOTD. I think this would be a great idea for a server!

I have the server, if you're willing to collaborate on the PHP end.
pyr0
Private First Class
Private First Class
Posts: 144
Joined: Wed Jul 13, 2005 5:08 pm

Post by pyr0 »

RPG wrote:Nice guys!

I also thought of an idea that I had a few months before when I was coding the Mapatorium.

There would be a server that would host the Map of the Day each day. If you look at the code, the "Map of the Day" choice is weighted so that more highly-rated maps have more chances of becoming the MOTD. I think this would be a great idea for a server!

I have the server, if you're willing to collaborate on the PHP end.
i have no problem working with the php end ... maybe work on a small cron to run on your server each day to pull a map of the day from the site/xml file/db... wouldnt be hard to make

Edit: yay me, finally made corporal on the forums, only took me 8 months :)
User avatar
A Meteorite
Private First Class
Private First Class
Posts: 1786
Joined: Thu Apr 28, 2005 12:56 am
Location: California, U.S.
Contact:

Post by A Meteorite »

I'm still waiting for SF.net to approve it, they turned it down once for thinking it was a "content generating project" and not "Open Source Software". So now I've explained to them that it IS open-source software and that it allows people to upload maps - but not to SF.net's servers (it mentioned resources). Still waiting for a second reply.

Also, RPG, may I have your permission to license some/all of the Mapatorium source under the GPL?
Image
Owner @ BZFX
Core Admin @ CAN

Email me: bzmet…@gmail.com
User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG »

Permission given to resource all code under GPL.

But still, if you have a header at the beginning of each file (like many SF projects do), could you mention my website, www.garrettsites.net ? plzkthx.
pyr0
Private First Class
Private First Class
Posts: 144
Joined: Wed Jul 13, 2005 5:08 pm

Post by pyr0 »

ill make sure to add it to all the files ... wont take more then a few minutes. but im off to play a bit before i put it off anymore today :)
User avatar
A Meteorite
Private First Class
Private First Class
Posts: 1786
Joined: Thu Apr 28, 2005 12:56 am
Location: California, U.S.
Contact:

Post by A Meteorite »

OK, they finally approved it. http://sf.net/projects/mapatorium

I haven't added any files because I would rather expand on what pyr0 has done than do the same thing over. ;) I'll add pyr0 as a project admin too once I know his username for SF.net... :)
Image
Owner @ BZFX
Core Admin @ CAN

Email me: bzmet…@gmail.com
User avatar
A Meteorite
Private First Class
Private First Class
Posts: 1786
Joined: Thu Apr 28, 2005 12:56 am
Location: California, U.S.
Contact:

Post by A Meteorite »

I totally forgot to add that we should use Subversion. I would of edited my post above but didn't want to chance no one seeing it. :)

I'll get more details on SVN shortly, see this edited post.

EDIT: OK, Subversion is located at https://svn.sourceforge.net/svnroot/mapatorium/ (don't forget the last slash) I need to know pyr0's username so I can add him as a project admin, but other than that we're ready to roll! :)
Image
Owner @ BZFX
Core Admin @ CAN

Email me: bzmet…@gmail.com
User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG »

Why Subversion over CVS?
Post Reply