Chris Smith wrote:
Not that I enjoy being a chinese grammer nazi, but of course there are 3
unicode characters needed for 'hill' - xiao, shan and po.
Bugger. Well, I suppose that means that your smallest
hill will just have to be 3 hexes wide.
--
Greg
On 12/19/06, Greg Ewing <[EMAIL PROTECTED]> wrote:
Farai Aschwanden wrote:
> I wanted to use such a system too, but 2 points stopped me using it:
> 1. Its restricted to the charset (well 256 chars is quite a lot)
Unicode!
Then you can use the Chinese characters for water,
grass, hill, etc. Muc
Farai Aschwanden wrote:
I wanted to use such a system too, but 2 points stopped me using it:
1. Its restricted to the charset (well 256 chars is quite a lot)
Unicode!
Then you can use the Chinese characters for water,
grass, hill, etc. Much more readable. :-)
--
Greg Ewing, Computer Science D
Am 19.12.2006 um 20:13 schrieb Marius Gedminas:
On Tue, Dec 19, 2006 at 06:59:21PM +0100, Farai Aschwanden wrote:
I wanted to use such a system too, but 2 points stopped me using it:
1. Its restricted to the charset (well 256 chars is quite a lot)
You could use pairs of characters. Or tripl
On Tue, Dec 19, 2006 at 06:59:21PM +0100, Farai Aschwanden wrote:
> I wanted to use such a system too, but 2 points stopped me using it:
> 1. Its restricted to the charset (well 256 chars is quite a lot)
You could use pairs of characters. Or triplets, or whatever.
> 2. Interprete char signs that
Hmmm, just checking the manual of marshal, looks like a Python
wrapper with some restriction:
- Details of the format are undocumented on purpose; it may change
between Python versions (although it rarely does)
- This is not a general ``persistence'' module. ->... For
persistence use the pic
I wanted to use such a system too, but 2 points stopped me using it:
1. Its restricted to the charset (well 256 chars is quite a lot)
2. Interprete char signs that way can be expensive:
if "$" then print image x
if "*" then print image y
if
Am 19.12.2006 um 03:47 schrieb Jasper:
I use a ma
Jasper wrote:
Arg! I hate thunderbird.
Paste is as quotation (Ctrl-Shift-V or Cmd-Shift-V) and remove the
"> "s.
I can't guarantee efficiency though. ;]
--
regards,
Jakub Piotr Cłapa
Richard Jones wrote:
Consider reducing your data down to Python builtin types (list, dict, etc.)
and use the marshal module instead. It's faster and has none of the potential
hassles of pickling.
Although be warned that the marshal format is not
guaranteed to remain the same across Python ver
Arg! I hate thunderbird. To avoid further screw-ups, I've just posted
the source for the larger map here (which is actually a .py file):
http://brass-golem.com/wp-content/uploads/2006/12/showmap.txt
Ignore the comments about kludges...
-Jasper
Jasper wrote:
G, my code got it's line break
G, my code got it's line breaks mangled. Try #2:
symbolToTerrain = {
'_' : Plains,
'@' : Fertile,
'+' : Desert,
'^' : Mountains,
'*' : Hills,
'$' : Forest,
'%' : Water,
'~' : River,
'&' : WideRiver,
'=' : Roads,
'#' : Bridge,
'!' : Cliff,
}
carteString =
I use a map serialization format like this (works best with a fixed
width font):
carteString = '''\
0 1 2 3 4 5
. . . . . . . . .
. . . . . .
. . . _ . . . _ . . . _ .
3 . . . . .
On Tuesday 19 December 2006 04:41, spotter . wrote:
> On 12/18/06, Chris Smith <[EMAIL PROTECTED]> wrote:
> > I generally make the map file as simple to read and change in a text
> > editor as I can. This generally makes the python code to parse the file a
> > bit more complex, but since this is do
On 12/18/06, Chris Smith <[EMAIL PROTECTED]> wrote:
I generally make the map file as simple to read and change in a text editor
as I can. This generally makes the python code to parse the file a bit more
complex, but since this is done only once at start-up I don't notice any
speed issues.
Anoth
I generally make the map file as simple to read and change in a text editor
as I can. This generally makes the python code to parse the file a bit more
complex, but since this is done only once at start-up I don't notice any
speed issues.
Another way of doing it is to write a simple map loader th
Thanks, I just wanted to make it fast because if I start loading the
map at the beginning, it might seem to take a while before the game
starts due to parsing and caching. Probably just my computer though,
its a bit low on ram :(
On 12/17/06, Ethan Glasser-Camp <[EMAIL PROTECTED]> wrote:
spotter
Ah, thanks for that, I forgot about how python handles leading zeros.
I dont want to place any sort of restriction on the meta information incase
I have to add more stuff later on, this way it will scale and simply work.
On 12/17/06, Farai Aschwanden <[EMAIL PROTECTED]> wrote:
Looks ok to me. On
Looks ok to me. One thing to mention: If you use 001 and 002, etc. it
will be turned to 1 and 2 if you read them in (Python treats them as
number). So you can safe space using direct number w/o leading zeros.
About the metafile. If you can define this in one line why not adding
it to the firs
I just use .tga files -- and surface.get_at() and surface.set_at().
You get limited to 256 tiles and 4 layers, but I've yet to have that be a
problem. Quite adequate for any "small game" -- and it's simple. If you need
to upgrade later, you can always change to a text based format that supports
spotter . wrote:
> Hey everybody,
>
> I am in the process of trying to make a file format for maps.
>
> The meta file will have the info like name, author, date, version, and
> the width and height.
>
> The other file will have the actual map data in it. This method will be
> slower,
> since
Hey everybody,
I am in the process of trying to make a file format for maps. I am
doing this right now with this:
<10,5> # the width and height
<1> # layers
000,001,002,001,002,002,001,000,001,002,
000,001.002,002,002,002,001,000,001,002,
000,001
21 matches
Mail list logo