I'm making my first attempt at programming a game. It's going to be a simple adventure game played in a web browser, I'll use django to display stuff in html and python to work in the background. I'm having troubles in defining the map class, namely operating on coordinates.
My maps need to have a spawn location and walls (for now). So for spawn I could do...
spawnx=models.IntegerField()
spawny=models.IntegerField()
...but it feels like an ugly workaround. I've never used lists before, and I also remember there's this dictionary thingy in python. Do they have any specific advantages? Keep in mind that spawn locations won't be changed, they just need to store coordinates in which players spawn. Does anyone have an idea?
My second problem are walls: I really need to use a list of some kind here. But again, I can't figure out how they work, especially in Django.
So to summarise my biggest problem is figuring out how lists work in Django - like, which field
they use and how they can be accessed.
Thanks!