Re: Create a game map?

2019-10-01 Thread AudioGames . net Forum — Developers room : frastlin via Audiogames-reflector
Re: Create a game map? Hello,You don't iterate through tiles, you iterate through polygons. That way you can create a world that is endless and if you only have 1 object, then you're only looping through that one object.Look at:https://github.com/frastlin/PyAudioGame … ui/grid.pyThe Grid

Re: Create a game map?

2019-10-01 Thread AudioGames . net Forum — Developers room : chrisnorman7 via Audiogames-reflector
Re: Create a game map? Hi,Probably an unpopular suggestion, but worth chucking out there:I know there's lots of boilerplate code in here, but I've taken the _Base class from my pyrts project.With the below code you can instantiate maps and tiles with relative ease. Of course there's

Re: Create a game map?

2019-09-28 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
Re: Create a game map? I'm bringing this up because I do want to try an array and compare it to my system.I figured out how to create a numpy 3d array, use the zero's function with x, y, and z dimentions. Here's the problem:import numpy as np lst = np.zeros((5000, 5000, 5000)) ValueError

Re: Create a game map?

2019-09-28 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
Re: Create a game map? I'm bringing this up because I do want to try an array and compare it to my system.I figured out how to create a numpy 3d array, use the zero's function with x, y, and z dimentions. Here's the problem:import numpy as np lst = np.zeros((5000, 5000, 5000)) ValueError

Re: Create a game map?

2019-09-27 Thread AudioGames . net Forum — Developers room : frastlin via Audiogames-reflector
Re: Create a game map? Look for a point in polygon algorithm in your language of choice, and just use polygons.Python:https://pypi.org/project/collision/_javascript_:https://www.npmjs.com/package/flatten-jsFor 3D objects, you'll want something like Panda3D or BabylonJS. URL: https

Re: Create a game map?

2019-09-27 Thread AudioGames . net Forum — Developers room : nuno69 via Audiogames-reflector
Re: Create a game map? @2, it's good! I would use enum for type, but can you please send me the class? URL: https://forum.audiogames.net/post/464698/#p464698 -- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin

Re: Create a game map?

2019-09-11 Thread AudioGames . net Forum — Developers room : kianoosh via Audiogames-reflector
Re: Create a game map? For instance, you may asign 1 through 100 to tile types, 101 through 200 to door types, 201 to 300 to walls. And I'm organizing it like that because you don't know how many tiles/walls you're going to have, And you might gradually increase the amount of them so you

Re: Create a game map?

2019-09-11 Thread AudioGames . net Forum — Developers room : kianoosh via Audiogames-reflector
Re: Create a game map? For instance, you may asign 1 through 100 to tile types, 101 through 200 to door types, 201 to 300 to walls. And I'm organizing it like that because you don't know how many tiles/walls you're going to have, And you might gradually increase the amount of them so you

Re: Create a game map?

2019-09-11 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
Re: Create a game map? @6, I would modify the index operator to allow me to pass in a tuple, which reads a bit smoother, then define a class as an enum to hold all my tile types:from aenum import Enum class Tile(Enum, start=0): Wall Empty #... if map[(player.x, player.y)].type

Re: Create a game map?

2019-09-11 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
Re: Create a game map? @4/5, really? Could you explain a bit as to why post 2's approach wouldn't be that good? I am asking because I can't picture having multiple tile sets in a 2d array, not unless I want to do something like this:if map[player.x][player.y] == -1: #wall logic should go

Re: Create a game map?

2019-09-11 Thread AudioGames . net Forum — Developers room : kianoosh via Audiogames-reflector
Re: Create a game map? Nuno You eventually need to check every square the player walks on, and perhaps the surrounding squares so the array is your best bet. It's fast and performant URL: https://forum.audiogames.net/post/461134/#p461134 -- Audiogames-reflector mailing list

Re: Create a game map?

2019-09-10 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
Re: Create a game map? a 2D array is the best your going to get. Just check each square as the player navigates, and use NumPy (don't use lists of lists, vectors of vectors, etc.) or the equivalent for your language of choice. Since you're accessing them directly by index your most likely

Re: Create a game map?

2019-09-10 Thread AudioGames . net Forum — Developers room : alisson via Audiogames-reflector
Re: Create a game map? I use a dictionaries, and im implementing a real staircase on my 3d map. Its a bit buggy for now, but im managing to make the map work slowly, and is greath how things are getting betther and betther. If you want you can check my github where I have my map

Re: Create a game map?

2019-09-10 Thread AudioGames . net Forum — Developers room : pauliyobo via Audiogames-reflector
Re: Create a game map? you could create a class which is the map interface and then create classes that can represent your tiles, zones, and stuff. I'd do something like the followingclass MapObj{    // a map object    // this is the base class from where all the other objects

Create a game map?

2019-09-10 Thread AudioGames . net Forum — Developers room : nuno69 via Audiogames-reflector
Create a game map? Hi! How should I go for creating a game map? I tried 2D array but then implementing stuff like walls is tedious as I need to check each and every square. ANy other advice? URL: https://forum.audiogames.net/post/460812/#p460812 -- Audiogames-reflector mailing list