[program-l] Re: game board?

  • From: "Mark Long" <marklon@xxxxxxxxxxxxx>
  • To: <program-l@xxxxxxxxxxxxx>
  • Date: Thu, 3 Mar 2005 13:42:14 -0000

Ah, then what you need is not a 2D array - and yes, that array is way
too large.

 

What you have there is a set of objects. Some are mobile (players,
monsters). Some are not (trees, rocks). Some can change state (objects
that can be carried). 

 

The way that I have always implemented this is to give each object a
location and then iterate through the objects to see which are near the
object that I am processing at the time. Collections (a bit like an
array but more flexible) would be good for this.

 

________________________________

From: program-l-bounce@xxxxxxxxxxxxx
[mailto:program-l-bounce@xxxxxxxxxxxxx] On Behalf Of tyler
Sent: 03 March 2005 13:36
To: program-l@xxxxxxxxxxxxx
Subject: [program-l] Re: game board?

 

um... it is ware you can walk around and pick up things etc. but I tried
to compile that and it said the array was to large, is there another way
I could do this?

Thanks,

Ty Littlefield
email:
compgeek13@xxxxxxx

        ----- Original Message ----- 

        From: David Lant <mailto:david.lant@xxxxxxxxxxxx>  

        To: 'program-l@xxxxxxxxxxxxx' 

        Sent: Thursday, March 03, 2005 2:43 AM

        Subject: [program-l] Re: game board?

         

        Hi Tyler,

         

        Yes, you *could* do it that way.  But that really has to be up
to you.  Does your game design require an array that large?  What
exactly will the array represent?  How will the player interact with the
play area and the objects or avatars in it?  We can't answer those kinds
of questions.  That is a matter of design.

         

        David Lant 

        I.T. Consultant 
        Consultancy & Development 
        ICT Services 
        Tel: (01392) 382464 

        Devon County Council accepts no legal responsibility for the
contents of this message. The views expressed do not reflect those of
Devon County Council.

                -----Original Message-----
                From: tyler [mailto:compgeek13@xxxxxxx] 
                Sent: 03 March 2005 01:22
                To: program-l@xxxxxxxxxxxxx
                Subject: [program-l] game board?

                Ok, I have a question. I am making a game, and it has to
be like real life, no board. but how do I do this? do I create an array
like 1000000 by 1000000, and use a for loop to establish things such as
person and etc?

                Thanks,

                 

                Ty Littlefield
                email:
                compgeek13@xxxxxxx

Other related posts: