• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

ufis

Members
  • Content count

    2
  • Joined

  • Last visited

Community Reputation

103 Neutral

About ufis

  • Rank
    Newbie
  1. [quote name='runnerjm87' timestamp='1350953451' post='4992947'] In general, I would suggest converting the quadtree to a geohash by indexing each of your quadtree's nodes with a binary representation of it's location (00 for NE, 01 for NW, etc.) and the prefixing each of the child nodes with the parent's index (e.g. the key 0111 would be the SE tree/leaf of the NW tree of the root). By then returning a string representation of the hash, you'll be able to easily store the data in a database while still being able to retrieve and modify it. Hopefully this helps. [/quote] This is helpful for storing and retreiving a single node. My problem is to find a way to represent the whole grid as a single string, and mark those areas that has been explored. Somehow the following is stuck in my head, but it also has problems (I'll mention those later) Lets take a 4x4 grid, so the quad tree will be 3 levels deep. I'll order the quads NW, NE, SE, SW. Empty grid. [CODE] --------- | | | | | --------- | | | | | --------- | | | | | --------- | | | | | --------- [/CODE] As none of the leaf nodes has been explored the whole grid is represented by the value 0. Now our hero starts out. This means he has 1 leaf explored. [CODE]--------- | | | | | --------- | | | | | --------- | | |x| | --------- | | | | | ---------[/CODE] So the idea is to mark a node that has been explored and all its parents with a 1. When we write the string when we get a 0 we do not delve into the child nodes as we know they are all empty. When we get a 1, we list the 4 children and their values. So we will have 1 (root) - 0 NW - 0 NE - 1 SE -- 1 NW (this is where our hero finds himself) -- 0 NE -- 0 SE -- 0 SW - 0 SW So we get the final string of : 100110000 After our hero walks around a bit we get this map [CODE] --------- | | |x| | --------- | | |x| | --------- | |x|x|x| --------- | |x|x|x| --------- [/CODE] And with that the string: 10110011111110110 And when he has completed exploring the whole map we get : 111111111111111111111 (21 characters) Adding another level (8x8 grid) adds 64 more numbers, 5 levels deep (16x16 grid) adds another 256, 6 levels (32x32 grid) another 1024 ... and you can see where this is going. So the string is getting a bit big when you get to a 1024x1024 grid. The more you explore the longer the string gets. I guess I could use a 2 to mark a node when all it's children has been explored. That will make the string shorter. But the other problem is still on how to update this string, as the hero explores, in a way that is not too resource or time intensive. Any ideas?
  2. I am casually developing an idea for a game. Or rather playing around with different concepts needed to build a basic game. Right now I am looking at quad trees. My game map will basically be a square grid. I was thinking of using a quadtree to represent the areas that has been explored on the map. My question is: How do I store the information of the quadtree in a database? Some time ago (a couple of years) someone told me about storing the data in a single string. For the life of me I cannot recall the exact method to store it or to change the data (adding new explored nodes etc). If anyone can enlighten me or point me to an appropriate site, please.