Thread: Custom Maps

Results 1 to 1 of 1
  1. #1
    Waba's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    1

    Custom Maps

    Wondering since you can make custom maps for haxball,
    maybe there could be a section where people can share map codes.


    Some info:

    Update: Custom stadiums and HaxBall anniversary!

    Time sure flies! It has already been 1 year since HaxBall was first released and ever since the game has never stopped growing in popularity. Last Friday was an all time record of 100k unique visitors in a single day!

    It has been a while since the last update and for that I apologize. Some of you might have heard that I was working on a dedicated server for HaxBall, this was an Adobe Air version which would let you host rooms without the overhead of graphics, sounds and running on a browser. Unfortunately the performance during testing was a bit underwhelming so this project has been postponed for now.

    Today I bring to you a new and exciting feature: The HaxBall Stadium Format (.hbs). This is a text format which allows you to create any kind of stadium! From boring things like just changing the size of the goal to crazy shaped stadiums with multiple goal areas and obstacles.

    The .hbs files are plain text so you can edit them with any text editor.

    Here are two sample stadiums:

    simplestadium.hbs
    simplestadium_tutorial.hbs (Same as simplestadium but it contains comments which should help you understand the format. If you plan to create HaxBall stadiums this one is a must read.)
    funkystadium.hbs
    For now there is no documentation, if you want to learn to make stadiums you’ll have to figure it all out by tinkering with these sample stadiums. I’ll make a stadium format reference page in the future though.

    I have one warning: The stadium format is in alpha stage and will definitely be changing. There’s a good chance that stadiums made for the current version of this format will stop working on upcoming updates, although they will be easy to fix/update.

    In future versions of this format I’ll add the possibility of changing physical parameters of the players and balls (radius, kick strength, friction, speed, mass, etc.). I also plan to add features that will let you create things like speed boosters, bumpers, teleporters, high friction ground, etc. I’m really excited to see what kind of things the community will do with this

    Changes:

    Changed the UI to pick stadiums, there’s now a “Pick” button which will open a stadium select popup.
    Added a new default map called “Huge” for 4v4 5v5 and above. (Dimensions are subject to further tuning).
    Implemented the HaxBall Stadium Format (.hbs). You can load .hbs files from your hard drive by pressing the “Load” in the new stadium picker UI.
    Fixed a bug which made the score limit, time limit and stadium buttons visible even when a game was in progress.

    This is the code for a normal map.
    Code:
    {
    	"name" : "Simple",
    	
    	"width" : 450,
    	"height" : 250,
    	
    	"spawnDistance" : 200,
    	
    	"bg" : { "type" : "grass", "width" : 400, "height" : 200, "kickOffRadius" : 75, "cornerRadius" : 0 },
    
    	"vertexes" : [
    		{ "x" : -400, "y" : 200,  "trait" : "ballArea" },
    		{ "x" : -400, "y" : 75,   "trait" : "ballArea" },
    		{ "x" : -400, "y" : -75,  "trait" : "ballArea" },
    		{ "x" : -400, "y" : -200, "trait" : "ballArea" },
    		
    		{ "x" : 400, "y" : 200,  "trait" : "ballArea" },
    		{ "x" : 400, "y" : 75,   "trait" : "ballArea" },
    		{ "x" : 400, "y" : -75,  "trait" : "ballArea" },
    		{ "x" : 400, "y" : -200, "trait" : "ballArea" },
    		
    		{ "x" : 0, "y" :  250, "trait" : "kickOffBarrier" },
    		{ "x" : 0, "y" :   75, "trait" : "kickOffBarrier" },
    		{ "x" : 0, "y" :  -75, "trait" : "kickOffBarrier" },
    		{ "x" : 0, "y" : -250, "trait" : "kickOffBarrier" }
    	],
    	
    	"segments" : [
    		{ "v0" : 0, "v1" : 1, "trait" : "ballArea" },
    		{ "v0" : 2, "v1" : 3, "trait" : "ballArea" },
    		{ "v0" : 4, "v1" : 5, "trait" : "ballArea" },
    		{ "v0" : 6, "v1" : 7, "trait" : "ballArea" },
    		{ "v0" : 1, "v1" : 2, "trait" : "goalNet" },
    		{ "v0" : 6, "v1" : 5, "trait" : "goalNet" },
    		{ "v0" : 8, "v1" : 9, "trait" : "kickOffBarrier" },
    		{ "v0" : 9, "v1" : 10, "trait" : "kickOffBarrier", "curve" : 180, "cGroup" : ["blueKO"] },
    		{ "v0" : 9, "v1" : 10, "trait" : "kickOffBarrier", "curve" : -180, "cGroup" : ["redKO"] },
    		{ "v0" : 10, "v1" : 11, "trait" : "kickOffBarrier" }
    	],
    	
    	"goals" : [
    		{ "p0" : [-400, 75], "p1" : [-400,-75], "team" : "red" },
    		{ "p0" : [400, 75], "p1" : [400,-75], "team" : "blue" }
    	],
    	
    	"discs" : [
    		{ "pos" : [-300, -75], "trait" : "goalPost" },
    		{ "pos" : [-300,  75], "trait" : "goalPost" },
    		{ "pos" : [ 300, -75], "trait" : "goalPost" },
    		{ "pos" : [ 300,  75], "trait" : "goalPost" }
    	],
    	
    	"planes" : [
    		{ "normal" : [0, 1], "dist" : -200, "trait" : "ballArea" },
    		{ "normal" : [0,-1], "dist" : -200, "trait" : "ballArea" },
    		{ "normal" : [ 0, 1], "dist" : -250, "bCoef" : 0.1 },
    		{ "normal" : [ 0,-1], "dist" : -250, "bCoef" : 0.1 },
    		{ "normal" : [ 1, 0], "dist" : -450, "bCoef" : 0.1 },
    		{ "normal" : [-1, 0], "dist" : -450, "bCoef" : 0.1 }
    	],
    	
    	"traits" : {
    		"ballArea" : { "vis" : false, "bCoef" : 1, "cMask" : ["ball"] },
    		"goalPost" : { "radius" : 8, "invMass" : 0, "bCoef" : 0.5 },
    		"goalNet" : { "vis" : true, "bCoef" : 0.1, "cMask" : ["ball"], "curve" : 110 }, 
    		"kickOffBarrier" : { "vis" : false, "bCoef" : 0.1, "cGroup" : ["redKO", "blueKO"], "cMask" : ["red", "blue"] }
    	}
    }
    Last edited by Waba; 12-06-2011 at 11:34 AM.

Similar Threads

  1. 2 bugs on my custom maps i cant fix them
    By jordi.kroon in forum Call of Duty Modern Warfare Help
    Replies: 2
    Last Post: 10-02-2010, 05:05 AM
  2. cod4 custom maps making
    By jordi.kroon in forum Call of Duty Modern Warfare Help
    Replies: 4
    Last Post: 09-30-2010, 09:28 AM
  3. Custom map question
    By Yaxxo in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 3
    Last Post: 09-25-2010, 04:13 AM
  4. custom maps
    By xbeatsszzx in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 7
    Last Post: 08-12-2010, 01:00 PM
  5. Custom Mod and Custom Map??
    By Slayer418 in forum Call of Duty Modern Warfare Help
    Replies: 3
    Last Post: 04-27-2010, 12:15 AM

Tags for this Thread