Heya everyone! I've been gone for a long while and I'm glad to see BYOND is still striving(?). I decided to sit down and play with some of the new functions since I left, skins, isometric maps, that kind of stuff. Anyway I got sucked into byond and for the last week have been developing what I hope will become a kick [butt] original Byond RPG!
The problem I've hit is where I'm trying to deal with 2 different maps. Theoretically ( haven't programed it yet), each player has a "piece". During regular gameplay this piece moves around a board. What I wanted to do, is have the player click a button, and have a window pop up (Got this part down) This window would contain a map control (Got this too) which would display the board and their piece (No idea how to do this part...)
I think I've hit a complete coder's block (kind of like writer's block) cause I can't even figure out how to make the piece! Is it it's own mob, or a variable of the player? Anyway, any help would be greatly appreciated.
A few notes about the board: It's pretty much for display purposes only, the player will not interact with it. However I will be pulling things like the piece's location off of it, but I'm not sure if that has to do with the board or the piece.
The board is kind of like Mario Party, there are weird paths and directions and each spot has it's own information.
Pieces will move in a semi-linear fashion, with the player choosing which direction to go at crossroads.
Edit: I forget, whats are the rules on swearing here?
ID:157641
Jan 29 2010, 8:15 pm (Edited on Jan 29 2010, 10:16 pm)
|
|
In response to Redslash
|
|
OK, so I did a bit and this is the code I have. It's not displaying the player's piece, but it will display a /obj/gameboard/piece... gotta go back to doing Trig now but if someone could take a look I'd really appreciate it!
var/list/secondMap[3][3]//Holds the map for the game board |
In response to Redslash
|
|
Half way done! I got ti displaying properly. I think my coder's block is gone too. Anyway, I'll post what I have up so if anyone else is having this problem they can see a possible solution.
var/list/secondMap[3][3]//Holds the map for the game board I'm still looking for feedback, so if you spot something wrong or can think of a better way of doing it, please post! I'll try to upload a little demo and I'll edit this with a link when I do. It will also have comments :) On another note... why hasn't any one posted? Am I just that uninteresting? |
I've been going over LummoxJr's Second Hud demo. It seems to imply that a second map control cannot display a map, only icons drawn directly onto the screen. With this information, I was thinking I could get a big 2 dimensional list with each element containing a turf. I could then display a portion of the list in the secondary map, centered around the player's piece's location, which would be variables of the player. Lastly I would place the player's piece in the middle of the map.
so something like (this is freehand)
This would be called when they pull up the secondary map window. The real map will probably be somewhere around 50x50 or larger, and there is some more stuff needed to be done to center the screen around the piece, but in general I was wondering if this was a good method. Is there anyway to improve this? I'm worried about all the new procs, when they pull up the window a second time will it draw over the stuff and it will be deleted, or will it just stack on top of each other? should i just be using = instead of +=? does that work? I haven't tested this, I'll try to later today and post my results.