Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Tile maps

by shotgunefx (Parson)
on Feb 14, 2003 at 04:45 UTC ( [id://235178]=note: print w/replies, xml ) Need Help??


in reply to OT: Tile maps

I would assign a number to each tile image (01021.jpg) Then just use an A0A to store it. If the maps are big might be able to use a PDL to gain some efficency or even just store each map row as a packed string. The later would certainly take less memory then an AOA of numbers. You could do the map storing, munging in XS as well and gain much speed and lower your mem consumption. Hope this helps.

-Lee

"To be civilized is to deny one's nature."

Replies are listed 'Best First'.
Re^2: Tile maps
by etj (Deacon) on Jun 26, 2022 at 15:10 UTC
    To avoid running out of memory, current PDL has PDL::IO::FastRaw for easy memory-mapping of disk files as ndarrays.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://235178]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-04-24 06:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found