How to add notes to a map

Say that you have a game which has maps. And you want to allow the user to add notes to the map.

How is this done?

The problem can be broken down into to three parts.

1. How are the notes represented on the map? For instance like a little flag.

2. How do the notes (text) map to the map? For instance is the map divided into a 10x10 grid? Or perhaps a note is tied a pixel?

3. How are notes stored? Is there a limit and should there be a limit?

[488 byte] By [jschell] at [2007-9-27 13:53:48]
# 1

I think you need to look deep down inside yourself, and find the answers to these questions there. After all, this is your application, so you know the best way to handle it.

It sounds to me like it depends on how miniscule the system can get. Do you think users are going to need to put notes only pixels away from each other? Or is the note feature going to only be needed occasionally? This seems to help solve all 3 questions.

1. If there are going to be many notes, then you definitely want to use an icon like a flag. The alternative is to display the note directly on the map. I would recommend using the flag, and then something like a tooltip to show a preview of a note.

2. How is the map stored in the first place? Is it just an image? If so, you're going to be storing the notes as some sort of list anyway, so this just depends on how many notes and how close you want them to be able to be.

3. I don't see why you'd have a limit, unless you really expect that the notes will ever get too large. The Vector class will be able to hold as many notes as memory will allow. You might have a limit to avoid running out of memory, then, I suppose.

chachovilla at 2007-7-5 21:42:51 > top of Java-index,Other Topics,Java Game Development...
# 2

>

> 3. I don't see why you'd have a limit, unless you

> really expect that the notes will ever get too large.

> The Vector class will be able to hold as many notes

> as memory will allow. You might have a limit to

> avoid running out of memory, then, I suppose.

That particular aspect was related more to persistence rather than memory.

jschell at 2007-7-5 21:42:51 > top of Java-index,Other Topics,Java Game Development...