Closed v4nz666 closed 10 years ago
Shit... if they're magenta, that's the default renderer. Maybe it failed to get the parts list?
Can you paste the json?
@LordMonoxide - Not sure what happened... when I saved, and reloaded, this is what loaded. It seems to know where the pieces are that it's not rendering, since I can't add them where pieces should be, but that should look more like
[{"id":"1","x":8,"y":6},{"id":"1","x":8,"y":5},{"id":"1","x":8,"y":4},{"id":"1","x":8,"y":3},{"id":"1","x":8,"y":2},{"id":"1","x":7,"y":6},{"id":"1","x":6,"y":6},{"id":"1","x":6,"y":5},{"id":"1","x":6,"y":4},{"id":"1","x":8,"y":7},{"id":"1","x":6,"y":7},{"id":"1","x":4,"y":6},{"id":"1","x":5,"y":6},{"id":"1","x":9,"y":6},{"id":"1","x":10,"y":6},{"id":"1","x":3,"y":5},{"id":"1","x":3,"y":4},{"id":"1","x":3,"y":3},{"id":"1","x":3,"y":2},{"id":"1","x":2,"y":2},{"id":"1","x":2,"y":3},{"id":"1","x":2,"y":4},{"id":"1","x":2,"y":5},{"id":"1","x":2,"y":6},{"id":"1","x":3,"y":6},{"id":"1","x":3,"y":1},{"id":"1","x":4,"y":0},{"id":"1","x":5,"y":0},{"id":"1","x":11,"y":5},{"id":"1","x":11,"y":4},{"id":"1","x":11,"y":3},{"id":"1","x":11,"y":2},{"id":"1","x":11,"y":1},{"id":"1","x":10,"y":0},{"id":"1","x":9,"y":0},{"id":"1","x":12,"y":2},{"id":"1","x":12,"y":3},{"id":"1","x":12,"y":4},{"id":"1","x":12,"y":5},{"id":"1","x":12,"y":6},{"id":"1","x":11,"y":6},{"id":"1","x":13,"y":4},{"id":"1","x":13,"y":5},{"id":"1","x":13,"y":6},{"id":"1","x":13,"y":7},{"id":"1","x":12,"y":9},{"id":"1","x":10,"y":8},{"id":"1","x":10,"y":9},{"id":"1","x":11,"y":10},{"id":"1","x":10,"y":10},{"id":"1","x":10,"y":11},{"id":"1","x":9,"y":11},{"id":"1","x":4,"y":8},{"id":"1","x":4,"y":9},{"id":"1","x":4,"y":10},{"id":"1","x":4,"y":11},{"id":"1","x":5,"y":11},{"id":"1","x":3,"y":10},{"id":"1","x":2,"y":9},{"id":"1","x":1,"y":7},{"id":"1","x":1,"y":6},{"id":"1","x":1,"y":5},{"id":"1","x":1,"y":4},{"id":"1","x":6,"y":8},{"id":"1","x":8,"y":8},{"id":"1","x":1,"y":8},{"id":"1","x":3,"y":11},{"id":"1","x":2,"y":10},{"id":"1","x":1,"y":9},{"id":"1","x":0,"y":7},{"id":"1","x":0,"y":6},{"id":"1","x":0,"y":8},{"id":"1","x":11,"y":11},{"id":"1","x":12,"y":10},{"id":"1","x":13,"y":9},{"id":"1","x":13,"y":8},{"id":"1","x":14,"y":8},{"id":"1","x":14,"y":7},{"id":"1","x":14,"y":6},{"id":"1","x":4,"y":1},{"id":"1","x":10,"y":1}]
Looks well-formed to me... in your database, does the hull piece's ID = 1?
mysql> select * from space_ships where id = 3\G *** 1. row *** id: 3 space_user_id: 15 name: dralthi json: [{"id":"1","x":8,"y":6},{"id":"1","x":8,"y":5},{"id":"1","x":8,"y":4},{"id":"1","x":8,"y":3},{"id":"1","x":8,"y":2},{"id":"1","x":7,"y":6},{"id":"1","x":6,"y":6},{"id":"1","x":6,"y":5},{"id":"1","x":6,"y":4},{"id":"1","x":8,"y":7},{"id":"1","x":6,"y":7},{"id":"1","x":4,"y":6},{"id":"1","x":5,"y":6},{"id":"1","x":9,"y":6},{"id":"1","x":10,"y":6},{"id":"1","x":3,"y":5},{"id":"1","x":3,"y":4},{"id":"1","x":3,"y":3},{"id":"1","x":3,"y":2},{"id":"1","x":2,"y":2},{"id":"1","x":2,"y":3},{"id":"1","x":2,"y":4},{"id":"1","x":2,"y":5},{"id":"1","x":2,"y":6},{"id":"1","x":3,"y":6},{"id":"1","x":3,"y":1},{"id":"1","x":4,"y":0},{"id":"1","x":5,"y":0},{"id":"1","x":11,"y":5},{"id":"1","x":11,"y":4},{"id":"1","x":11,"y":3},{"id":"1","x":11,"y":2},{"id":"1","x":11,"y":1},{"id":"1","x":10,"y":0},{"id":"1","x":9,"y":0},{"id":"1","x":12,"y":2},{"id":"1","x":12,"y":3},{"id":"1","x":12,"y":4},{"id":"1","x":12,"y":5},{"id":"1","x":12,"y":6},{"id":"1","x":11,"y":6},{"id":"1","x":13,"y":4},{"id":"1","x":13,"y":5},{"id":"1","x":13,"y":6},{"id":"1","x":13,"y":7},{"id":"1","x":12,"y":9},{"id":"1","x":10,"y":8},{"id":"1","x":10,"y":9},{"id":"1","x":11,"y":10},{"id":"1","x":10,"y":10},{"id":"1","x":10,"y":11},{"id":"1","x":9,"y":11},{"id":"1","x":4,"y":8},{"id":"1","x":4,"y":9},{"id":"1","x":4,"y":10},{"id":"1","x":4,"y":11},{"id":"1","x":5,"y":11},{"id":"1","x":3,"y":10},{"id":"1","x":2,"y":9},{"id":"1","x":1,"y":7},{"id":"1","x":1,"y":6},{"id":"1","x":1,"y":5},{"id":"1","x":1,"y":4},{"id":"1","x":6,"y":8},{"id":"1","x":8,"y":8},{"id":"1","x":1,"y":8},{"id":"1","x":3,"y":11},{"id":"1","x":2,"y":10},{"id":"1","x":1,"y":9},{"id":"1","x":0,"y":7},{"id":"1","x":0,"y":6},{"id":"1","x":0,"y":8},{"id":"1","x":11,"y":11},{"id":"1","x":12,"y":10},{"id":"1","x":13,"y":9},{"id":"1","x":13,"y":8},{"id":"1","x":14,"y":8},{"id":"1","x":14,"y":7},{"id":"1","x":14,"y":6},{"id":"1","x":4,"y":1},{"id":"1","x":10,"y":1}] created_at: 2013-10-28 23:24:10 updated_at: 2013-10-28 23:24:10 1 row in set (0.01 sec)
Can you give me a dump of the ship_parts table as well?
select * from space_parts; +----+--------------------+------+--------------------------------+------+--------------------------------------------------+------+ | id | space_part_type_id | name | desc | mass | render | cost | +----+--------------------+------+--------------------------------+------+--------------------------------------------------+------+ | 1 | 1 | Hull | A 64x64m² section of hull | 1 | ctx.fillStyle="magenta";ctx.fillRect(0,0,16,16); | 0 | +----+--------------------+------+--------------------------------+------+--------------------------------------------------+------+
This likely has something to do with it... when I remove pieces.. even in a not so ridiculous way, it doesn't reload correctly
Take a look at the console when it's loading that ship... all kinds of "piece too far away"s. I'm guessing pieces aren't getting added in order so pieces that have gaps between them refuse to add
yeah, you got it... sorry I didn't just paste that in :/
Nice!
That looks pretty awesome, but for some reason you have the magenta rendering code in your part row. Shit, did I forget to tell you to artisan db:seed? It'll delete your ship, but you can just copy/paste the json code into a new row once it's created
oh, that's much better :) rockets!
I can assure you, this was a pretty bad-ass looking ship :)