Multiple Maps

Discuss anything programming related.
Post Reply
User avatar
Grimdoomer
Admin
Posts: 1835
Joined: Sun Dec 09, 2007 9:09 pm

Multiple Maps

Post by Grimdoomer »

Im making a app for Halo 2 Xbox and I need to have multiple maps open at once. I have a seperate class for everything ex Header, Index, Tags, StringID's ecy. Then I have them all link togather with a class called map, so I can quickly call to them ex Map.Header.MapName. But when I looked at Entity's source they have everything in one giant class. I dont want this for a cuple reason but mainly it is not neat. Im aiming for around 5 maps open at teh same time. I mean who would honestly have 5 maps open. So I really dont know how to start this. Can some one help?
Don't snort the magic, we need it for the network.
User avatar
JacksonCougar
Huurcat
Posts: 2460
Joined: Thu Dec 06, 2007 11:30 pm
Location: Somewhere in Canada

Multiple Maps

Post by JacksonCougar »

At times I will have 10+ maps open in Entity.
User avatar
Prey
Posts: 129
Joined: Sat Dec 29, 2007 5:06 pm
Location: UK

Multiple Maps

Post by Prey »

It's simple: You have your 'mapform' which is the form that appears when someone selects a map.. so just initialise an instance of your 'map' class inside it... that way each 'mapform' has a 'map' containing all the info related to the map opened on that form.
KIWIDOGGIE
Posts: 72
Joined: Sat Jan 19, 2008 1:32 am
Location: On a Grav Lift
Contact:

Multiple Maps

Post by KIWIDOGGIE »

Also, If you can use a MDI container with the h2map.X being able to be used on diffrent threads; try that Because it should still handle what you want without interfearing with other threads. But be careful because threading is a bitch :P
99% Of the Xbox Scene are retards.
Xbox Scene wrote:All Hail Jester!
User avatar
Grimdoomer
Admin
Posts: 1835
Joined: Sun Dec 09, 2007 9:09 pm

Multiple Maps

Post by Grimdoomer »

I know about the MDI containers and all, what I dont get is when I do something in map 2, whats gunna stop it from doing it in map 1? So my real question is where do I get the map number?
Don't snort the magic, we need it for the network.
User avatar
Prey
Posts: 129
Joined: Sat Dec 29, 2007 5:06 pm
Location: UK

Multiple Maps

Post by Prey »

No definitely don't use threading for this..

Every map opened opened has it's own form, right? So just just put whatever is specific to that map, on the form. Like I said above..

In Entity's case, the maps were stored off in a list accessible from anywhere, and then the mapforms each contained the index at which their map was.
User avatar
Grimdoomer
Admin
Posts: 1835
Joined: Sun Dec 09, 2007 9:09 pm

Multiple Maps

Post by Grimdoomer »

Ok I got it now thanks.
Don't snort the magic, we need it for the network.
Supermodder911
Posts: 409
Joined: Sat Jan 12, 2008 11:42 pm
Location: Michigan
Contact:

Multiple Maps

Post by Supermodder911 »

Yea Prey's right. Thats another reason entity's Coding is crap.
Just put whatever you need in you map form and it will only be called by the form that calls it not the other mapform.
Image
Chad Warden is Ballin'. No jk.
Post Reply