Author Topic: Roguelike Game Kit  (Read 26288 times)

Etinarg

  • Rogueliker
  • ***
  • Posts: 424
  • Karma: +1/-1
  • Idea archivist and game tinkerer.
    • View Profile
    • Gedankenweber Blog (German)
Re: Roguelike Game Kit
« Reply #30 on: August 25, 2010, 09:55:12 AM »
Im interested in knowing, how do you store the map data? is it an Int array and the values are the diferent pieces? or is it more complicated then that?

Each map layer is an int array. The map itself is a vector (kind of dynamic length array) of layers.

JayPC

  • Newcomer
  • Posts: 21
  • Karma: +0/-0
    • View Profile
    • Email
Re: Roguelike Game Kit
« Reply #31 on: August 26, 2010, 03:13:25 AM »
Interesting, Never Heard of Vector before ill have to look it up, anything Like an ArrayList of int[]? kinda?

Etinarg

  • Rogueliker
  • ***
  • Posts: 424
  • Karma: +1/-1
  • Idea archivist and game tinkerer.
    • View Profile
    • Gedankenweber Blog (German)
Re: Roguelike Game Kit
« Reply #32 on: August 26, 2010, 09:52:11 AM »
In Java Vector was the older type, and synchronized, and since Java 1.2 the container classes were streamlined a bit and ArrayList was introduced, which basically the same as Vecor, just not synchronized.

Also, C++ has a vector type:
http://en.wikipedia.org/wiki/Vector_(C%2B%2B)

Each map layer is a "normal" array of int's though to keep overhead small. Just the map itself stores the layers in a vector type.