Click here to Skip to main content
15,892,804 members
Home / Discussions / C#
   

C#

 
AnswerRe: Storing values into a 2-Dimensional Array Pin
Reality Strikes15-Jul-08 6:00
Reality Strikes15-Jul-08 6:00 
AnswerRe: Storing values into a 2-Dimensional Array Pin
Pete O'Hanlon15-Jul-08 9:57
mvePete O'Hanlon15-Jul-08 9:57 
GeneralRe: Storing values into a 2-Dimensional Array Pin
Reality Strikes15-Jul-08 11:16
Reality Strikes15-Jul-08 11:16 
QuestionIcon resources from name Pin
Echilon15-Jul-08 4:37
Echilon15-Jul-08 4:37 
AnswerRe: Icon resources from name Pin
leppie15-Jul-08 4:56
leppie15-Jul-08 4:56 
QuestionProblem with custom installer class Pin
topcatalpha15-Jul-08 4:22
topcatalpha15-Jul-08 4:22 
Questionc# and flash Query Pin
Jayawant Karale15-Jul-08 3:06
Jayawant Karale15-Jul-08 3:06 
QuestionRougelike project Map Cell history, Suggestions? Pin
Jason Farrar15-Jul-08 3:01
Jason Farrar15-Jul-08 3:01 
Inspired by HA and generally always wanting to do this, I've been working on a c# roguelike in my free time. I'm kind of at an impasse with my Map structure. The way I have it organized is I have two objects:

1. A MapCell, this contains the current Cell's character as well as Color, and an enum specifying whether it's Solid, Open, Water, etc. You get the picture.

2. A Map which right now is nothing but a 2D Array of MapCells.

Works good, but I need someway of implementing a map history. That is say in item drops on a cell the normal open floor character '.' gets replaced by an item character '/'. When the item gets picked up I want it to revert back to the floor character.

It's a bit more complicated then that though. So now say the player walks over the item, now the cell has a '@' character in it. If the player leaves the Item can leaves the Cell then the item still needs to persist and if the character takes the item then the floor character needs to show.

I've currently implemented the above behavior with a stack inside of the Cell object, my concern is performance on a 512,512 map. Does anyone have any better suggestions on how to tackle this? ANy help is greatly appreciated. Big Grin | :-D
AnswerRe: Rougelike project Map Cell history, Suggestions? Pin
Simon P Stevens15-Jul-08 3:43
Simon P Stevens15-Jul-08 3:43 
GeneralRe: Rougelike project Map Cell history, Suggestions? Pin
Jason Farrar15-Jul-08 6:14
Jason Farrar15-Jul-08 6:14 
Questionresize proportionally for listbox Pin
emailthiaga15-Jul-08 2:58
emailthiaga15-Jul-08 2:58 
AnswerRe: resize proportionally for listbox Pin
John Ad15-Jul-08 3:16
John Ad15-Jul-08 3:16 
GeneralRe: resize proportionally for listbox Pin
emailthiaga15-Jul-08 4:02
emailthiaga15-Jul-08 4:02 
Questionhttp://company.zhaopin.com/P2/CC1536/6331/CC153663319.htm?DYWE=1213680294625.66308.1216003477.1216121212.8 [modified] Pin
chenli051315-Jul-08 1:33
chenli051315-Jul-08 1:33 
GeneralRe: http://company.zhaopin.com/P2/CC1536/6331/CC153663319.htm?DYWE=1213680294625.66308.1216003477.1216121212.8 Pin
Simon P Stevens15-Jul-08 1:52
Simon P Stevens15-Jul-08 1:52 
GeneralSubject line too long and scary... Pin
Paul Conrad16-Jul-08 4:48
professionalPaul Conrad16-Jul-08 4:48 
QuestionAND and OR with expressions Pin
enginço15-Jul-08 1:28
enginço15-Jul-08 1:28 
QuestionRe: AND and OR with expressions Pin
CPallini15-Jul-08 2:36
mveCPallini15-Jul-08 2:36 
AnswerRe: AND and OR with expressions Pin
enginço15-Jul-08 4:19
enginço15-Jul-08 4:19 
QuestionC# Datagridview Pin
Member 364449715-Jul-08 0:57
Member 364449715-Jul-08 0:57 
AnswerRe: C# Datagridview Pin
benjymous15-Jul-08 1:08
benjymous15-Jul-08 1:08 
Questionto get record count of SQL Query...? Pin
Raheem MA15-Jul-08 0:52
Raheem MA15-Jul-08 0:52 
AnswerRe: to get record count of SQL Query...? Pin
mark_w_15-Jul-08 0:57
mark_w_15-Jul-08 0:57 
AnswerRe: to get record count of SQL Query...? Pin
Nirandas15-Jul-08 1:22
Nirandas15-Jul-08 1:22 
GeneralRe: to get record count of SQL Query...? Pin
Raheem MA15-Jul-08 1:58
Raheem MA15-Jul-08 1:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.