As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/

Game Development: So You Want To Makes Games

2»

Posts

  • JWashkeJWashke Registered User regular
    edited November 2007
    As someone who wants to get started on making my own games where should I start? Is their a certain language I should start with as a person with actually no programming knowledge? And does anyone know a good book or something to start with?

    JWashke on
    steam_sig.png
  • AndorienAndorien Registered User regular
    edited November 2007
    JWashke wrote: »
    As someone who wants to get started on making my own games where should I start? Is their a certain language I should start with as a person with actually no programming knowledge? And does anyone know a good book or something to start with?

    If you have no programming experience at all, most will (rightly) suggest Python with pygame. It's basically SDL for Python, so you can do 2d graphics, sound, input, and network support. I don't know if pygame will do it, but SDL also provides an easy display context for OpenGL if you decide to go further.

    You might wanna look at this as well: http://www.gamedev.net/reference/business/features/gameinaweek/
    A (experienced) programmer uses pygame to build a simple little rpg in 40 hours. It'll give you an idea what's possible with just a little effort.

    Andorien on
  • devoirdevoir Registered User regular
    edited November 2007
    Keep in mind that that effort is backed by (without looking at the link) a depth of experience, aptitude and skills that dwarfs the 40 hour investment into that particular project.

    What kind of games do you want to make? While I don't make games professionally (or hobby-wise, really), trying for full C++ and DirectX 9 stuff is pointless if you just want to make a tower defense game (use Flash), but could be a route to look towards if you want to become a professional games software engineer.

    If you have no programming experience, then you'll want to find a language you can use to learn basic programming concepts.

    If you'd rather not really do any programming, design and just do artwork/sound, there are things like GameMaker which allow limited capacity to do such things. Flash, to an extent, is more about the presentation than the game but has its own set of required skills and experience.

    As the poster above said, Python is considered a good starting language and it does have pygame which can be used to accelerate the development of an engine. But there's no one-size-fits-all answer.

    devoir on
  • MiserableMirthMiserableMirth Registered User regular
    edited November 2007
    I think I will give that Python thing a try. I have a question though. I have two game concepts written up, and I want to start on the one that would be easier, but I'm not sure which one that would be. One is a platformer and the other is SRPG game most similar to Fire Emblem. They both have things I think will be difficult for me, the eternal beginner.

    The platformer needs slope physics (no loops) where I move and roll down/up them. It also needs to changes in speed, not just jumping from (x,y) position. It also needs bouncing physics. The SRPG will have menus, dialog scenes, and basic AI. Which one will be more difficult? Any thoughts?

    Edit: The platformer has swing physics too. At this point, I'm leaning towards the SRPG, but I have no idea how hard AI is to program.

    MiserableMirth on
  • nyxtomnyxtom Registered User regular
    edited November 2007
    JWashke wrote: »
    As someone who wants to get started on making my own games where should I start? Is their a certain language I should start with as a person with actually no programming knowledge? And does anyone know a good book or something to start with?

    This might just be my C# happiness talking, but I say you should go with XNA. You can make something 3D in no-time at all :) Getting over the OO programming may be a bump, but it's definitely worth it.

    nyxtom on
    companion-cube.gif
  • peterdevorepeterdevore Registered User regular
    edited November 2007
    nyxtom wrote: »
    JWashke wrote: »
    As someone who wants to get started on making my own games where should I start? Is their a certain language I should start with as a person with actually no programming knowledge? And does anyone know a good book or something to start with?

    This might just be my C# happiness talking, but I say you should go with XNA. You can make something 3D in no-time at all :) Getting over the OO programming may be a bump, but it's definitely worth it.

    If you're just starting with programming, you might want to do something 2D instead of jumping straight into 3D. I really like how Java helped me coding in good OO style, it has a good API definition and also extensive online tutorials on the whole standard library. Frankly, the Microsoft developers library documentation site has always been a mess in my experience.

    Java has some nice 2D libraries, like Slick. It also has a good free 3D scenegraph engine: jmonkeyengine. These are both based on the bare bone OpenGL game library Lightweight Java Game Library (LWJGL). All of these libraries are BSD licensed, so using them for a serious project you don't want to publish the code from is no problem at all.

    Those first two libraries have decent documentation and lots of example code. If you had some programming practice by modifying the examples and want to start learning about OpenGL: LWJGL combined with the standard OpenGL Red Book should get you pretty far. The most popular OpenGL tutorials can be found on the NeHe productions site.

    If you write your games in Java with those libraries, people on OSX, Linux and Windows can launch your game from your website directly just like these demos do, or just download them and run them the old way. This doesn't require a single line of porting or accounting for specific platforms.

    XNA isn't bad on its own, it's just that it ties you to windows so much. Java combined with those OpenGL based libraries give the same ease of development and are open, free and truly cross platform to boot. If anyone has doubts about Java as a game development platform, please tell me about them, since I am still puzzled why it isn't used more often for indie projects.

    peterdevore on
  • Randall_FlaggRandall_Flagg Registered User regular
    edited November 2007
    If you know some C, then allegro is a pretty good choice for beginners

    Randall_Flagg on
  • devoirdevoir Registered User regular
    edited November 2007
    I think I will give that Python thing a try. I have a question though. I have two game concepts written up, and I want to start on the one that would be easier, but I'm not sure which one that would be. One is a platformer and the other is SRPG game most similar to Fire Emblem. They both have things I think will be difficult for me, the eternal beginner.

    The platformer needs slope physics (no loops) where I move and roll down/up them. It also needs to changes in speed, not just jumping from (x,y) position. It also needs bouncing physics. The SRPG will have menus, dialog scenes, and basic AI. Which one will be more difficult? Any thoughts?

    Edit: The platformer has swing physics too. At this point, I'm leaning towards the SRPG, but I have no idea how hard AI is to program.

    Standard wisdom dictates you start off doing tutorials and small games like Pong, etc. Jumping straight into a large complex project like either of this is a great way to get frustrated and drain the fun out of learning to develop games.

    If the Python thing is truly a good platform with a great community, then you should find loads of tutorials and examples to work through that will lead you to start building up the skills that you need to develop whatever game you want.

    devoir on
  • LoneIgadzraLoneIgadzra Registered User regular
    edited November 2007
    devoir wrote: »
    I think I will give that Python thing a try. I have a question though. I have two game concepts written up, and I want to start on the one that would be easier, but I'm not sure which one that would be. One is a platformer and the other is SRPG game most similar to Fire Emblem. They both have things I think will be difficult for me, the eternal beginner.

    The platformer needs slope physics (no loops) where I move and roll down/up them. It also needs to changes in speed, not just jumping from (x,y) position. It also needs bouncing physics. The SRPG will have menus, dialog scenes, and basic AI. Which one will be more difficult? Any thoughts?

    Edit: The platformer has swing physics too. At this point, I'm leaning towards the SRPG, but I have no idea how hard AI is to program.

    Standard wisdom dictates you start off doing tutorials and small games like Pong, etc. Jumping straight into a large complex project like either of this is a great way to get frustrated and drain the fun out of learning to develop games.

    If the Python thing is truly a good platform with a great community, then you should find loads of tutorials and examples to work through that will lead you to start building up the skills that you need to develop whatever game you want.

    What he said. My first game was just a test to see if I could write a very simple game engine in C++ after I'd managed to figure out SDL. (You moved a ship with arrow keys, and shot a square.) Even with just this, I made a lot of mistakes, but figured most of it out on my own (since I had to work without the internet for a week). You need to start with something simple to get the basics. After you've got that, and a good handle on OOP (I still don't), an SRPG wouldn't be an insurmountable solo project at all (but it would still take countless hours just to get basic stuff like the map working, because it would be your first time programming something like that).

    LoneIgadzra on
  • MiserableMirthMiserableMirth Registered User regular
    edited November 2007
    Well, I was planning on taking it slow. I wasn't really expecting either project be done in years time. I appreciate your advice.

    MiserableMirth on
  • LoneIgadzraLoneIgadzra Registered User regular
    edited November 2007
    Well, I was planning on taking it slow. I wasn't really expecting either project be done in years time. I appreciate your advice.

    Well the thing is, it would be unfortunate to enter into a large project without having any idea how to design a large project, and what things to do to make sure that a little part you're working on will fit into that structure. Working on something very small will get you asking a lot of questions as to how you might actually implement some very basic concepts that you see in other games.

    You can start blundering through your SRPG right now, but I guarantee you'll end up re-writing every last thing five times, and that's if you don't get so confused you give up.

    LoneIgadzra on
  • devoirdevoir Registered User regular
    edited November 2007
    Don't get disheartened, though.

    Feel free to report progress and questions in this thread, hopefully that's what it'll be good for.

    devoir on
  • JaninJanin Registered User regular
    edited November 2007
    Does anybody know of a good "show off your game/engine" site? I've written several libraries and programs before, but they tend to be completely ignored when released. It's discouraging to invest weeks or months into a project without any payoff beyond "cool, it works!".

    Also, does anybody know of a fast, efficient algorithm for 2D collision detection between two rectangles (or circles, whichever is faster). I don't really care if it's a complex algorithm, but it does have to be fast. I'm creating a simple shoot 'em up, and exhaustive search on the sprite list starts to chug once a couple thousand bullets hit the screen.

    Janin on
    [SIGPIC][/SIGPIC]
  • AndorienAndorien Registered User regular
    edited November 2007
    Janin wrote: »
    Does anybody know of a good "show off your game/engine" site? I've written several libraries and programs before, but they tend to be completely ignored when released. It's discouraging to invest weeks or months into a project without any payoff beyond "cool, it works!".

    Also, does anybody know of a fast, efficient algorithm for 2D collision detection between two rectangles (or circles, whichever is faster). I don't really care if it's a complex algorithm, but it does have to be fast. I'm creating a simple shoot 'em up, and exhaustive search on the sprite list starts to chug once a couple thousand bullets hit the screen.

    I don't have anything concrete for you, but I do have an idea I thought up awhile back when contemplating this exact problem.

    Obviously, the performance issues occur due to everything checking collision with everything. Ideally, you want to cut down on this.

    Here's my idea. Divide the game space into different sectors. For example, if you had a rectangular space, you might have 4 sectors: upper left, upper right, lower left, and lower right. Each object need only check for collision with other objects its sector- not the whole library. When an object moves, you check its new position to see what sector its in, then check the objects in the sector for collisions.

    Hope that helps!

    Andorien on
  • JaninJanin Registered User regular
    edited November 2007
    You'd need more than four sectors, since the sprites might exist with edges in many sectors. Also, the sectors would have to be at least as large as the largest sprites. I thought about dividing the screen into something like 32 sectors, calculate all occupied sectors for each sprite, and then check only sprites also existing in those sectors. But 2D collision detection seems like the sort of thing that some clever mathematician would come up with a really efficient algorithm for, and most articles I've read care more about 3D collision detection.

    Janin on
    [SIGPIC][/SIGPIC]
  • PrimePrime UKRegistered User regular
    edited November 2007
    have you tried just cutting out impossibles instead of finding the possible collisions?

    Ive never done 2D collision in something to that scale (1000 bullets? wtf :P) so no idea if thats suitable, but ive found that you can cut out a lot of processing by finding out "right everything below this cant hit it so dont test" "everything X pixels ahead cant hit this so dont test" etc

    Prime on
  • AndorienAndorien Registered User regular
    edited November 2007
    Janin wrote: »
    You'd need more than four sectors, since the sprites might exist with edges in many sectors. Also, the sectors would have to be at least as large as the largest sprites. I thought about dividing the screen into something like 32 sectors, calculate all occupied sectors for each sprite, and then check only sprites also existing in those sectors. But 2D collision detection seems like the sort of thing that some clever mathematician would come up with a really efficient algorithm for, and most articles I've read care more about 3D collision detection.

    The 4 sector example was just a construct to help get the idea across. I see what you mean though, it'd certainly help if there was a nice master algorithm to check against.

    Something else I've thought of. Again, this is about reducing the number of actual checks done. Rather than checking each object with every other object indiscriminately each frame, instead cull objects from the collision checker determined by their distance. Occasionally check back on the objects to check their positions. The closer they are, the more often you should check, to a max of once per frame. In effect, you increase the signal resolution when two objects are close together, and lower it when they get further apart.

    For example, your ship shoots a bullet an an enemy on the other side of the screen. There's an initial check to determine distance, then it leaves it alone for a bit because it's pretty far away. A few frames later, you check back up on them to see where they are. They're a lot closer now, so you increase the resolution. As it gets closer, you check more and more often, and eventually they collide, or it misses. If it misses, the process happens in reverse.

    Obviously, there's some things to be careful of. You need to determine the minimum amount of time it takes for the two fastest objects moving towards each other to collide, and adjust accordingly.
    Prime wrote:
    Ive never done 2D collision in something to that scale (1000 bullets? wtf ) so no idea if thats suitable, but ive found that you can cut out a lot of processing by finding out "right everything below this cant hit it so dont test" "everything X pixels ahead cant hit this so dont test" etc

    I think that running through the sprites and seeing what does and doesn't apply would be just about as slow as checking for collision in the first place.

    Andorien on
  • PrimePrime UKRegistered User regular
    edited November 2007
    Janin wrote: »
    Prime wrote:
    Ive never done 2D collision in something to that scale (1000 bullets? wtf ) so no idea if thats suitable, but ive found that you can cut out a lot of processing by finding out "right everything below this cant hit it so dont test" "everything X pixels ahead cant hit this so dont test" etc

    I think that running through the sprites and seeing what does and doesn't apply would be just about as slow as checking for collision in the first place.

    Actually it can cut time by up to half, as with collision sprite by sprite you have to check 4 sides, so with that method you only check X coord and y coord, unless he's done it another way ofc. But like i said not every method is always suitable.

    Prime on
  • AndorienAndorien Registered User regular
    edited November 2007
    Prime wrote: »
    Janin wrote: »
    Prime wrote:
    Ive never done 2D collision in something to that scale (1000 bullets? wtf ) so no idea if thats suitable, but ive found that you can cut out a lot of processing by finding out "right everything below this cant hit it so dont test" "everything X pixels ahead cant hit this so dont test" etc

    I think that running through the sprites and seeing what does and doesn't apply would be just about as slow as checking for collision in the first place.

    Actually it can cut time by up to half, as with collision sprite by sprite you have to check 4 sides, so with that method you only check X coord and y coord, unless he's done it another way ofc. But like i said not every method is always suitable.

    The way I typically check collisions is via distance from the center, so you only have one set of coordinates per object. Also, I think it makes more sense since most object aren't square.

    You're right though, if he's checking each side, your system should cut down on a good amount of processing.

    Andorien on
  • PrimePrime UKRegistered User regular
    edited November 2007
    Andorien wrote: »
    Prime wrote: »
    Janin wrote: »
    Prime wrote:
    Ive never done 2D collision in something to that scale (1000 bullets? wtf ) so no idea if thats suitable, but ive found that you can cut out a lot of processing by finding out "right everything below this cant hit it so dont test" "everything X pixels ahead cant hit this so dont test" etc

    I think that running through the sprites and seeing what does and doesn't apply would be just about as slow as checking for collision in the first place.

    Actually it can cut time by up to half, as with collision sprite by sprite you have to check 4 sides, so with that method you only check X coord and y coord, unless he's done it another way ofc. But like i said not every method is always suitable.

    The way I typically check collisions is via distance from the center, so you only have one set of coordinates per object. Also, I think it makes more sense since most object aren't square.

    You're right though, if he's checking each side, your system should cut down on a good amount of processing.

    Out of interest how do you deal with objects that are not circle dealing with measure from the center, say an object that is 64 pixels wide by 128 long? How do you stop it being an inacurate hit box? Ive never tried it that way would be good to know another method.

    Prime on
  • AndorienAndorien Registered User regular
    edited November 2007
    Prime wrote: »
    Andorien wrote: »
    Prime wrote: »
    Janin wrote: »
    Prime wrote:
    Ive never done 2D collision in something to that scale (1000 bullets? wtf ) so no idea if thats suitable, but ive found that you can cut out a lot of processing by finding out "right everything below this cant hit it so dont test" "everything X pixels ahead cant hit this so dont test" etc

    I think that running through the sprites and seeing what does and doesn't apply would be just about as slow as checking for collision in the first place.

    Actually it can cut time by up to half, as with collision sprite by sprite you have to check 4 sides, so with that method you only check X coord and y coord, unless he's done it another way ofc. But like i said not every method is always suitable.

    The way I typically check collisions is via distance from the center, so you only have one set of coordinates per object. Also, I think it makes more sense since most object aren't square.

    You're right though, if he's checking each side, your system should cut down on a good amount of processing.

    Out of interest how do you deal with objects that are not circle dealing with measure from the center, say an object that is 64 pixels wide by 128 long? How do you stop it being an inacurate hit box? Ive never tried it that way would be good to know another method.

    It IS an inaccurate hitbox, but actually so is checking each side (assuming it's not actually a box, if it is, you're gold), not much that can be done about that, short of going for per-pixel collision.

    As for sprites that tend more towards rectangular dimensions rather than the square, I typically cut it in half. So a 128x64 acts more like 2 64x64 objects side by side. It's a little strange, but comes with some benefits.

    Andorien on
  • jogernautjogernaut BisonopolisRegistered User regular
    edited November 2007
    If you're using rectangular bounding boxes, you can try using sweep and prune. You basically put all the of the objects' x-axis values in a sorted list/array and the y-axis value in another list. You re-sort it and if a swap happens between the starting x(or y)-axis of an object and the end x/y-axis of another object that is the time you actually check for collision.

    It's pretty difficult to describe with drawing stuff on paper so here's a link to a tutorial.
    http://www.shmup-dev.com/forum/index.php?page=24

    jogernaut on
    steam_sig.png
  • PrimePrime UKRegistered User regular
    edited November 2007
    nice, Ive had a quick scan of it and it seems like a good system, that might even help Janin. I'll give that way a go later on in the week

    My problem is im not used to dealing with complex dectection cause shootem ups arnt my thing, I might see if I can throw one together, might teach me something new!

    Programmer art ahoy :D

    Prime on
  • SmasherSmasher Starting to get dizzy Registered User regular
    edited November 2007
    Unless I'm missing something, it seems what you want is a Quadtree. It's sort of like your idea of sectors, except that there are several layers of sectors nested inside each other to handle objects of different sizes. Whenever you create or move an object you place it in the smallest node which will completely contain it. When checking for collisions for each object you check collisions against the other objects in its node, as well as the objects contained in the larger nodes the current object is a part of. The main benefit of this is changing the number of comparisons from O(n) to O(log n). A possible optimization you can make (though it might not be too helpful if the majority of your objects move each frame), is to add a tag to each object indicating if it moved that frame. In the collision function, if your current object didn't move you can then skip testing against any object that also didn't move that frame.

    One issue with Quadtrees is that a small object can end up straddling the dividing line between two large nodes, which forces it to get placed in a node far bigger than it needs to be (potentially even the root node). A modification of the algorithm to fix that is called Loose Quadtrees, which allows the nodes to have flexible sizes up to twice the normal size for a node of that level. The downside is that neighboring nodes partially overlap, increasing the number of object-to-node tests, but the upside is that objects are guaranteed to be placed into a node no more than twice as big as the object (with the exception of objects smaller than the smallest sized nodes) which in turn can greatly decrease the number of object-to-object tests. Information on Loose Quadtrees is surprisingly scarce on the internet, so if you're interested I have a book with more info I can relay later on.

    Smasher on
  • peterdevorepeterdevore Registered User regular
    edited November 2007
    Janin wrote: »
    Does anybody know of a good "show off your game/engine" site? I've written several libraries and programs before, but they tend to be completely ignored when released. It's discouraging to invest weeks or months into a project without any payoff beyond "cool, it works!".

    DevMaster.net has a fairly large and complete database of 3D game engines you can submit to. For showcasing games, you might want to try the GameDev.net showcase, or (for more complete/serious games) GameTunnel. The latter also reviews all kinds of indie/freeware games and has some notoriously fickle reviewers.

    If you want to publish an open source project, the most popular option is SourceForge. Once you put your project on a site like that, there are social networking sites like Ohloh to spread the word and build a community around your project.

    peterdevore on
  • JaninJanin Registered User regular
    edited November 2007
    Prime wrote: »
    Ive never done 2D collision in something to that scale (1000 bullets? wtf :P)

    It's really just an experiment to see how far I can stretch Python's gaming performance before being forced into C. It'll become C eventually anyway, to cut down on the number of libaries people would have to install, but will be a fun test any way.

    screenshotkj4.png
    jogernaut wrote: »
    If you're using rectangular bounding boxes, you can try using sweep and prune. You basically put all the of the objects' x-axis values in a sorted list/array and the y-axis value in another list. You re-sort it and if a swap happens between the starting x(or y)-axis of an object and the end x/y-axis of another object that is the time you actually check for collision.

    It's pretty difficult to describe with drawing stuff on paper so here's a link to a tutorial.
    http://www.shmup-dev.com/forum/index.php?page=24

    That looks great for the initial poly culling (I compare quads, then perform per-pixel collision on intersecting quads).
    Smasher wrote: »
    Unless I'm missing something, it seems what you want is a Quadtree [...]

    Looks like a good place to start for a more complex algorithm, but the Quadtree algorithm itself would likely fail for my case. From the wiki page:
    Wikipedia wrote:
    If geometric subdividing fails to reduce the item count for each quadrant, (e.g., for overlapping data,) QuadTree subpartitioning fails, and the capacity must be breached for the algorithm to continue. For example, if the maximum capacity for a quadrant is 8, and there are 9 points at (0, 0), subpartitioning would produce three empty quadrants, and one containing the original 9 points, and so on. Because the tree must allow more than 8 points in such a quadrant, QuadTrees can approach O(N) complexity for data sets with arbitrary geometry (e.g., maps or graphs).
    Janin wrote: »
    Does anybody know of a good "show off your game/engine" site? I've written several libraries and programs before, but they tend to be completely ignored when released. It's discouraging to invest weeks or months into a project without any payoff beyond "cool, it works!".

    DevMaster.net has a fairly large and complete database of 3D game engines you can submit to. For showcasing games, you might want to try the GameDev.net showcase, or (for more complete/serious games) GameTunnel. The latter also reviews all kinds of indie/freeware games and has some notoriously fickle reviewers.

    If you want to publish an open source project, the most popular option is SourceForge. Once you put your project on a site like that, there are social networking sites like Ohloh to spread the word and build a community around your project.

    Thanks for the links, Ohloh in particular looks useful for publishing/promotion.

    Janin on
    [SIGPIC][/SIGPIC]
  • nyxtomnyxtom Registered User regular
    edited November 2007
    Janin wrote: »
    Does anybody know of a good "show off your game/engine" site? I've written several libraries and programs before, but they tend to be completely ignored when released. It's discouraging to invest weeks or months into a project without any payoff beyond "cool, it works!".

    You're welcome. link

    nyxtom on
    companion-cube.gif
  • devoirdevoir Registered User regular
    edited November 2007
    Gnargh.

    Great Game Sex Periment.

    I need to wash my eyes out with soap.

    :P

    devoir on
  • SmasherSmasher Starting to get dizzy Registered User regular
    edited November 2007
    Janin wrote: »
    Smasher wrote: »
    Unless I'm missing something, it seems what you want is a Quadtree [...]

    Looks like a good place to start for a more complex algorithm, but the Quadtree algorithm itself would likely fail for my case. From the wiki page:
    Wikipedia wrote:
    If geometric subdividing fails to reduce the item count for each quadrant, (e.g., for overlapping data,) QuadTree subpartitioning fails, and the capacity must be breached for the algorithm to continue. For example, if the maximum capacity for a quadrant is 8, and there are 9 points at (0, 0), subpartitioning would produce three empty quadrants, and one containing the original 9 points, and so on. Because the tree must allow more than 8 points in such a quadrant, QuadTrees can approach O(N) complexity for data sets with arbitrary geometry (e.g., maps or graphs).

    I'm not sure I understand the reasoning behind the objection the article is posing. It's saying that in degenerate cases all the objects are going to get put into the same node, which is true. Why is that a bad thing? If all the objects are right next to or on top of each other, then yes you're going to need to check collisions for everything. Given that they're all touching or almost touching everything else, that seems to me to be the correct behavior, no? And if for some reason a disproportionate number of objects are getting placed into the same node and aren't colliding, then your smallest subdivision is too large and you need to add at least another level.

    Smasher on
  • JaninJanin Registered User regular
    edited November 2007
    I think it's saying that unless you take special steps, stacked objects will lead to infinite recursion.

    Janin on
    [SIGPIC][/SIGPIC]
  • SmasherSmasher Starting to get dizzy Registered User regular
    edited November 2007
    There's no reason for it to.

    Just to clarify, quadtrees are a data structure, not an algorithm. It's probably possible to make algorithms that use quadrees that do recurse infinitely, but a properly functioning one won't. The biggest potential issue that could cause problems is the details of how you handle collisions when you find them, but that's true of any algorithm. Some rhetorical questions, for example: ignoring what data structure you're using, how do you want to resolve a collision where two objects are right on top of each other? What if there are nine objects? What if there's no free space next to a colliding object to put it?

    Once someone goes through and figure out what he wants the algorithm to do in all the border cases he can think of, he'll be much more effective at designing the algorithm to take care of the how effectively.

    Smasher on
Sign In or Register to comment.