Click here to Skip to main content
15,914,642 members
Home / Discussions / C#
   

C#

 
GeneralRe: indexers Pin
S. Senthil Kumar8-May-05 21:12
S. Senthil Kumar8-May-05 21:12 
GeneralUser Controls for PocketPC Pin
hhrafn8-May-05 12:37
hhrafn8-May-05 12:37 
GeneralRe: User Controls for PocketPC Pin
Polis Pilavas8-May-05 13:28
Polis Pilavas8-May-05 13:28 
GeneralRe: User Controls for PocketPC Pin
hhrafn9-May-05 1:00
hhrafn9-May-05 1:00 
GeneralRe: User Controls for PocketPC Pin
Polis Pilavas9-May-05 1:35
Polis Pilavas9-May-05 1:35 
General.NET Remoting on a virtual server Pin
Ryan Roberts8-May-05 12:34
Ryan Roberts8-May-05 12:34 
GeneralGames and different rooms Pin
Anthony Mushrow8-May-05 12:18
professionalAnthony Mushrow8-May-05 12:18 
GeneralRe: Games and different rooms Pin
Christian Graus8-May-05 14:17
protectorChristian Graus8-May-05 14:17 
The way that these things generally work is that you have an array of structures that represent your 'rooms', and each room 'knows' what other room in the array a door points to. Then you just change the room you're pointing at in the array, and call a generic function that draws it, and so to the code to interact with it uses this structure to know what's there.

That's assuming you go to the edge of the screen and walk into another room. If you are always scrolling, then you need one big map.

The idea really is to write generic code that knows how to interact with *everything*, code that knows how to draw *any* room, then use a data structure to change what room you're interacting with. This is also why it's so easy to provide a map editor with most games. It just edits that structure.



Christian Graus - Microsoft MVP - C++
GeneralRe: Games and different rooms Pin
MoustafaS8-May-05 14:54
MoustafaS8-May-05 14:54 
Generalgeting image from scanner Pin
Member 18966488-May-05 10:07
Member 18966488-May-05 10:07 
GeneralRe: geting image from scanner Pin
Andrew Kirillov8-May-05 10:55
Andrew Kirillov8-May-05 10:55 
GeneralRe: geting image from scanner Pin
Colin Angus Mackay8-May-05 11:04
Colin Angus Mackay8-May-05 11:04 
GeneralRe: geting image from scanner Pin
Christian Graus8-May-05 14:18
protectorChristian Graus8-May-05 14:18 
GeneralRe: geting image from scanner Pin
Member 18966489-May-05 18:51
Member 18966489-May-05 18:51 
GeneralRe: geting image from scanner Pin
Christian Graus10-May-05 12:38
protectorChristian Graus10-May-05 12:38 
Questionnullreference error in dx? Pin
taha mohamed8-May-05 10:04
taha mohamed8-May-05 10:04 
AnswerRe: nullreference error in dx? Pin
Polis Pilavas8-May-05 13:31
Polis Pilavas8-May-05 13:31 
GeneralPixel Pin
malahat8-May-05 9:30
malahat8-May-05 9:30 
GeneralRe: Pixel Pin
Fernando Soto8-May-05 13:05
Fernando Soto8-May-05 13:05 
GeneralRe: Pixel Pin
Polis Pilavas8-May-05 13:33
Polis Pilavas8-May-05 13:33 
GeneralRe: Pixel Pin
Christian Graus8-May-05 14:19
protectorChristian Graus8-May-05 14:19 
GeneralPlease two things i need please Pin
snouto8-May-05 8:08
snouto8-May-05 8:08 
GeneralRe: Please two things i need please Pin
DavidNohejl8-May-05 9:01
DavidNohejl8-May-05 9:01 
GeneralRe: Please two things i need please Pin
Colin Angus Mackay8-May-05 10:59
Colin Angus Mackay8-May-05 10:59 
GeneralRe: Please two things i need please [OT] Pin
DavidNohejl8-May-05 11:04
DavidNohejl8-May-05 11:04 

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.