Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6981079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:06:37+00:00 2026-05-27T18:06:37+00:00

As a school project I am creating a browser game in Java, for the

  • 0

As a school project I am creating a browser game in Java, for the Google App Engine platform. Its a strategy game of players fighting with each other on a tile-based board.

I want the match and board structure to be dynamic. The board size is different for each match (selected when the match is created), players may join or leave in the middle of the match, each board tile may contain multiple different objects (players’ pawns, tile bonuses etc) and the objects may be moved between the tiles.

The problem is that I’m new to Java and I’m not sure how to represent and store such multi-level, dynamic structure.

1) Conceptually it looks like a “2D array of lists of objects”, but how should it be defined in terms of Java language? Is it a “List of Lists of Lists of objects” or “2D-Array of Lists of objects” or maybe even something else?

2) What part of that structure should be stored in the Datastore (GAE’s object-oriented database) and which should be built dynamically when the board is displayed to the player?
The more I store the easier it will be to display the board, but on the other hand it will be more painful to update when the objects move.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:06:37+00:00Added an answer on May 27, 2026 at 6:06 pm

    I suggest you to store it as list of independent map entries, with 2d coordinate.

    Something like:

    class Map {
      Long id
    }
    
    class MapEntry {
      Long id
    
      Long mapId  //better to use Key for parent map
    
      int x
      int y
      MapEntryType type //if you have different elements of map
    
      //some other fields / payload
    }
    

    and, by querying all map elements, by query like select MapEntry where map = ? (depends on what database mapping tool you’re using) you can get all map details, and build it in memory in server or client side. And i’m sure that for most cases you don’t need to load whole map into memory.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a simple Mahjong game for a final project at school and
For a school project we're developing a game that's a little like Conway's game
I have a school project in which we're going to write a financial engine
I'm creating an RPN calculator for a school project and having trouble with the
A school project has me writing a Date game in C++ (example at http://www.cut-the-knot.org/Curriculum/Games/Date.shtml
I'm creating a registration form on my school project website. I have given a
I'm the network programmer on a school game project. We want to have up
for a school project, I am making a chessboard in java. there were certain
I'm writing an augmented reality app for Windows Phone 7 as a school project.
I'm using clj-oauth for a school project where I am creating a desktop client

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.