Re: Large map arrays in Python?

2020-01-18 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
Re: Large map arrays in Python? I figured it out. For anyone wondering, my notes as to the solution are below:First, the tile looping issue. I realized that, should any changes occur, they would be closer to the bottom of the list. So, I now loop backwards through my tiles and break

Re: Large map arrays in Python?

2020-01-16 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
Re: Large map arrays in Python? No. They are under 1 MB in size. My issue comes in when creating the sonar. Basically I have to loop through them each time my sonar moves a single step.  If my sonar scans in six directions for 10 steps, you can see why that would be a problem, even with 50

Re: Large map arrays in Python?

2020-01-16 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
Re: Large map arrays in Python? No. They are under 1 MB in size. My issue comes in when creating the sonar. Basically I have to loop through them each time my sonar moves a single step.  If my sonar scans in six directions for 10 steps, you can see why that would be a problem, even with 50

Re: Large map arrays in Python?

2020-01-16 Thread AudioGames . net Forum — Developers room : frastlin via Audiogames-reflector
Re: Large map arrays in Python? That's perfectly fine, until you get into wanting to represent a complex set of cubes, or a shape that is not a cube.For example:[[1,1], [4,1], [4,4],[10,4], [10,10], [1,10]]Would require 2 blocks to show, whereas I just have one polygon.Your method would

Re: Large map arrays in Python?

2020-01-16 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
Re: Large map arrays in Python? @15, perhaps you missunderstand me when I say a list of tiles. I mean something like this:class tile: def __init__(self, minx, maxx, miny, maxy, minz, maxz): self.minimum_x = minx self.minimum_y = miny self.minimum_z = minz self.maximum_x = maxx

Re: Large map arrays in Python?

2020-01-15 Thread AudioGames . net Forum — Developers room : frastlin via Audiogames-reflector
Re: Large map arrays in Python? For polygons, you don't need a list of tiles, you need a list of polygons.Your point in polygon function or collision detection function should return a list of polygons that your current point hit. This will allow you to see all the polygons your character

Re: Large map arrays in Python?

2020-01-15 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
Re: Large map arrays in Python? @13, see, I already thought I was doing something similar to polygons. I basically had a list of tiles, and when I called the function to get the current tile I just checked if the coordinates were inside them.This worked great, but the problem was that I

Re: Large map arrays in Python?

2020-01-14 Thread AudioGames . net Forum — Developers room : frastlin via Audiogames-reflector
Re: Large map arrays in Python? Using polygons allows you to only do checks on the number of objects you have. For example, if you have 500 buildings with 5 walls, a door, and a floor, you will have only 3500 polygons. I think this could be the number of polygons in Swamp.To do checks

Re: Large map arrays in Python?

2020-01-12 Thread AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
Re: Large map arrays in Python? Usually pre-boarder loading is done to maintain the illusion of a persistent world, depending on how far the player can see. The other reason is performance, as i'm sure many people are familiar with loading screens during level transitions. Loading before

Re: Large map arrays in Python?

2020-01-11 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
Re: Large map arrays in Python? I've been considering how to go about this, and here's what I came up with:My map has a parser already built in. Since all my regions are going to be 100 x 100 x 100, I can potentially make a single list of such size and then store all the other entries

Re: Large map arrays in Python?

2020-01-11 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
Re: Large map arrays in Python? I've been considering how to go about this, and here's what I came up with:My map has a parser already built in. Since all my regions are going to be 100 x 100 x 100, I can potentially make a single list of such size and then store all the other entries

Re: Large map arrays in Python?

2019-12-20 Thread AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
Re: Large map arrays in Python? A sector can be sized to be whatever you want it to be, but yes, an area spanning 0 to 125 x and 0 to 125 y could be considered a single sector. It really depends on how far you want players to be able to see, and to give yourself enough of a buffer in terms

Re: Large map arrays in Python?

2019-12-20 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
Re: Large map arrays in Python? Hmm, I'll play around with this. Thanks for the suggestions. Kind of sad that I can't use the tile approach, but oh well. URL: https://forum.audiogames.net/post/487203/#p487203 -- Audiogames-reflector mailing list Audiogames-reflector@sabahattin

Re: Large map arrays in Python?

2019-12-20 Thread AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
Re: Large map arrays in Python? A sector can be sized to be whatever you want it to be, but yes, an area spanning 0 to 125 x and 0 to 125 y could be considered a single sector. It really depends on how far you want players to be able to see, and to give yourself enough of a buffer in terms

Re: Large map arrays in Python?

2019-12-20 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
Re: Large map arrays in Python? Could you elaborate on the boundaries of the sector? Would a area spanning 0 to 125 on the x and 0 to 125 on the y be considered a single sector?Also, where would the data that is not loaded into the array be stored? Where do the imaginary sections disappear

Re: Large map arrays in Python?

2019-12-20 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
Re: Large map arrays in Python? Could you elaborate on the boundaries of the sector? Would a area spanning 0 to 125 on the x and 0 to 125 on the y be considered a single sector? URL: https://forum.audiogames.net/post/487194/#p487194 -- Audiogames-reflector mailing list Audiogames

Re: Large map arrays in Python?

2019-12-20 Thread AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
Re: Large map arrays in Python? Hm.Pickling or Json exporting won't help much, Numpy also has functions for saving and compressing such arrays, but for arrays this size it won't help your loading issue either. Even if you writing a parser you'd still have to comb and overlay the data

Re: Large map arrays in Python?

2019-12-20 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
Re: Large map arrays in Python? So, I just have 1 question left now.The created object is still over 1 gig in size, and exporting it with pickle or json doesn't fix the issue. I can, potentially, create a parser for the map which can both gather and retrieve information about the map

Re: Large map arrays in Python?

2019-12-20 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
Re: Large map arrays in Python? So, I just have 1 question left now.The created object is still over 1 gig in size, and exporting it with pickle or json doesn't fix the issue. I can, potentially, create a parser for the map which can both gather and retrieve information about the map

Re: Large map arrays in Python?

2019-12-20 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
Re: Large map arrays in Python? So, I just have a few questions left now.1. I don't understand what are the indexes at the end of your calls to the argwhere function. What do they do? I'm talking about something like this:print('left: '+str(np.argwhere(box[0:player[0],player[1],player[2

Re: Large map arrays in Python?

2019-12-20 Thread AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
Re: Large map arrays in Python? The results seem pretty good, near instantaneous results for nearest obstical along a given axis, even on large 1000 by 1000 by 1000 scale:import numpy as np #generate array box = np.zeros((1000,1000,1000),dtype='uint8') #player coordinates player

Re: Large map arrays in Python?

2019-12-20 Thread AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
Re: Large map arrays in Python? The results seem pretty good, near instantaneous results for nearest obstical along a given axis, even on large 1000 by 1000 by 1000 scale:import numpy as np #generate array box = np.zeros((1000,1000,1000),dtype='uint8') #player coordinates player

Re: Large map arrays in Python?

2019-12-19 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
Re: Large map arrays in Python? Post two. I may have to look into generators, seen them used, but never actually attempted to implement one. As for binary slicing, again, great theory, my fear is just hitting those bottlenecks.  And example would be appreciated, though. Post three

Re: Large map arrays in Python?

2019-12-19 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
Re: Large map arrays in Python? Post two. I may have to look into generators, seen them use, but never actually attempted to implement one. As for binary slicing, again, great theory, my fear is just hitting those bottlenecks.  And example would be appreciated, though. Post three

Re: Large map arrays in Python?

2019-12-19 Thread AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector
Re: Large map arrays in Python? How much of that space do you really need? Ex, if each tile is 1m^3, you might be able to justify a map that is 1km^2 horizontally, but do you need to go over 10-100m vertically?Having a way to allow versatile maps without unnecessary data could prove

Re: Large map arrays in Python?

2019-12-18 Thread AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
Re: Large map arrays in Python? Hm, you could possibly try processing it over time with a [generator]. Sound travels at a set speed, same with Sonar Pulses, its not unreasonable to assume that every step you take would have an immediate result for nearby objects, but that as you wait

Re: Large map arrays in Python?

2019-12-18 Thread AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
Re: Large map arrays in Python? Hm, you could possibly try processing it over time with a [generator]. Sound travels at a set speed, same with Sonar Pulses, its not unreasonable to assume that every step you take would have an immediate result for nearby objects, but that as you wait

Large map arrays in Python?

2019-12-18 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
Large map arrays in Python? Yes, I'm still looking into this issue.Some time ago, people mentioned trying out arrays for maps. This works great for small rooms, but let's say we have 300 by 300 tile area. Our list will contain 9 items. Not an issue just yet, but what if we add a third