|
Staggy posted:I've just managed to get collision detection working between OOBBs, using the Separated Axis Theorem. What I'm trying to figure out now is how I can detect which face of the box is doing the colliding in each case. I just spent my weekend working on this. Read up on GJK: http://en.wikipedia.org/wiki/Gilbert%E2%80%93Johnson%E2%80%93Keerthi_distance_algorithm The author of Box2D has a presentation from GDC 2010 up in their SVN that explains it well. This will allow you to find the points on the bounding boxes closest to each other, allowing you to use them as the points of collision. It also uses a lot of vector math similar to SAT, so once you understand it, it's pretty easy to mix in with your collision checks.
|
# ? Nov 24, 2010 02:51 |
|
|
# ? May 12, 2024 02:19 |
|
Bakkon posted:I just spent my weekend working on this. Read up on GJK: http://en.wikipedia.org/wiki/Gilbert%E2%80%93Johnson%E2%80%93Keerthi_distance_algorithm Thanks, that's exactly what I'm looking for. I'll give it a look over in the morning.
|
# ? Nov 24, 2010 23:24 |
|
I'm working on a game in java, using LWJGL and I've gotten to the point where I'm trying to implement maps of some sort. I've looked at Tiled before and decided to use it (since it makes everything a WHOLE lot easier). Now, Slick, which is built upon LWJGL already has easy-to-use classes to actually load and use these Tiled maps so instead of making it myself (which would be a nightmare, I've never done any XML-parsing before) I opted to use Slick. Now, if I load up the map it works excellent, but as soon as I also load my sprites the map's texture will get horribly corrupted. Basically, from what I can guess it somehow uses the texture ID of the last sprite I loaded. This is really frustrating, as I'm not really in control of how these maps are even loaded so it's very hard to find out what's wrong. What's even weirder is that I'm using Slick's (or rather, cokeandcode's) texture-loading classes. Every Entity in my code has a Sprite (which gets loaded at the start of the game), and every Sprite has a Texture and a TextureLoader. Is there something wrong with my approach? Could the TextureID's get mixed up because each sprite has their own TextureLoader? Or perhaps there's a bug in Slick's code? I really hope some of you have an idea what might be causing this, because I don't want to write my own map format when such a convenient thing as Tiled exist fake edit: I guess I could use Slick for everything.. but it's so horribly documented that I really don't want to unless I need to. Hurr durr why is it that whenever I make a post asking for help, I fix the problem a few minutes later? I used Slick's SpriteSheet class which actually made my code much cleaner than before (AND working!). Guess I shouldn't be too scared of it. Your Computer fucked around with this message at 03:10 on Nov 25, 2010 |
# ? Nov 25, 2010 01:25 |
|
I'm interested to hear how you guys doing independent projects get your art and what kind of prices you pay*. For development I've used some free junk, but my project is rapidly getting to the point where I need to make it more professional (it's an Android app). All I need is 2D art (map tiles, non-animated character sprites, and splash/loading screens). *I expect it's probably a significant amount of money, but it would really help to know specifics.
|
# ? Nov 25, 2010 03:32 |
|
Okay, new question (and a really stupid one at that!) I'm completely new to things like collision-detection, and while I have a good grip on vector-maths and the like I just don't have the brains to actually.. use it See, I'm making a tile-based game, but where the player can move freely. I'm using Tiled for the maps (which lets me get all sort of neat info, such as tile-properties and position, width, height etc. of a given tile. I set tile-properties such as "solid" and value "true", but that's about where I stopped.. I can sort-of find the tile I'm standing on by dividing the player's position by the tile-size, but this doesn't really help me since I'm clueless. Another thing I really want is for the player to not collide 100%, that is, if only one corner of the player is colliding with a wall, I want the player to slide over to the side. Like in the old Zelda 2D games. Does that make sense? Anyone care to lend me a hand or direct me to somewhere where this is explained?
|
# ? Nov 25, 2010 06:02 |
|
InternetJunky posted:I'm interested to hear how you guys doing independent projects get your art and what kind of prices you pay*. For development I've used some free junk, but my project is rapidly getting to the point where I need to make it more professional (it's an Android app). All I need is 2D art (map tiles, non-animated character sprites, and splash/loading screens). A pixel artist guy made some isometric pixel art (as yet unused unfortunately) for me. I can give you his contact address if you're interested. I think I met him on SA.
|
# ? Nov 25, 2010 15:24 |
|
InternetJunky posted:I'm interested to hear how you guys doing independent projects get your art and what kind of prices you pay*. For development I've used some free junk, but my project is rapidly getting to the point where I need to make it more professional (it's an Android app). All I need is 2D art (map tiles, non-animated character sprites, and splash/loading screens). There are some goon artists in Creative Convention that do digital art professionally, you could lurk around the threads there and find someone who has a style you like and then PM them to see if they want any freelance work. This thread and this thread come to mind, they aren't pixel art per se but I'm sure some of the posters there can either do 2D in their sleep or can point you to someone who can. They also have a general hire-an-artist thread here that may give you a sense of pricing.
|
# ? Nov 25, 2010 18:25 |
|
Your Computer posted:(...) collision-detection (...) tile-based game (...) These might be helpful: http://www.metanetsoftware.com/technique/tutorialA.html http://www.metanetsoftware.com/technique/tutorialB.html (from http://www.metanetsoftware.com/technique.html)
|
# ? Nov 26, 2010 16:44 |
|
InternetJunky posted:I'm interested to hear how you guys doing independent projects get your art and what kind of prices you pay*. For development I've used some free junk, but my project is rapidly getting to the point where I need to make it more professional (it's an Android app). All I need is 2D art (map tiles, non-animated character sprites, and splash/loading screens). Nearly everybody will classify "a significant amount of money" a little differently, but I will give you the general advice to pay whatever you can comfortably afford -- don't go looking for the cheapest bidder. This is for a number of reasons: 1) The more you pay, the more likely people are to take the job seriously in terms of effort, timely communication, and getting things done. 2) If you like an artist (and if not, why are you using them?) it's a great way to support and encourage them and give a little something back to the creative ecosystem. 3) It can help you stay focused on your own work when you can tell yourself "I shopped around and this style is perfect", it helps keep you passionate about it. 4) It makes your final product look more bad-assed and polished looking.
|
# ? Nov 26, 2010 20:35 |
|
plams posted:These might be helpful: Awesome, I came in here looking for this. Thanks! e: Mostly handy. Lemon King fucked around with this message at 05:32 on Nov 27, 2010 |
# ? Nov 27, 2010 04:40 |
|
plams posted:These might be helpful: Thanks, I got something resembling collision detection now! Now to find out how to make it better..
|
# ? Nov 27, 2010 12:21 |
|
Anyone got any recommendations for suitably licensed music to include in a free game? I only really need a short looping affair but bad as my programmer art is my programmer music is worse. I guess I could shell out a tiny amount for it, but I'd much rather it be free as I get no revenues.
|
# ? Nov 27, 2010 15:20 |
|
danishcake posted:Anyone got any recommendations for suitably licensed music to include in a free game? I only really need a short looping affair but bad as my programmer art is my programmer music is worse. I guess I could shell out a tiny amount for it, but I'd much rather it be free as I get no revenues. What kind of style of music are you looking for? I might have something lying around or be able to throw together a quick loop for you.
|
# ? Nov 27, 2010 21:01 |
|
I'm not even sure if this question belongs in this thread, and apologies if it doesn't, but for the Android game I'm developing I needed to write a custom java server that loads game information from a database and that also acts as a game server -- coordinating game traffic between clients. Everything works fine pointed to localhost, but I'm at the point where I need to install the server on an external IP. I'm a newbie when it comes to web stuff, so I have no idea how best to do this. I assume I cannot just simply buy shared web hosting from some company, install my server process on their server, and ask them to open a range of ports for my application. Anyone have experience doing something similar, or can offer advice on what I should do?
|
# ? Nov 27, 2010 23:39 |
|
InternetJunky posted:I'm a newbie when it comes to web stuff, so I have no idea how best to do this. I assume I cannot just simply buy shared web hosting from some company, install my server process on their server, and ask them to open a range of ports for my application. Anyone have experience doing something similar, or can offer advice on what I should do? You'll need more than a $5/month web hosting package. If you rent a virtual server, or even a dedicated server, you can do whatever you want and open any ports you need. Check out Linode and Sliceshost for examples and pricing ideas.
|
# ? Nov 27, 2010 23:55 |
|
Senso posted:You'll need more than a $5/month web hosting package. If you rent a virtual server, or even a dedicated server, you can do whatever you want and open any ports you need.
|
# ? Nov 28, 2010 00:02 |
|
InternetJunky, you might also want to look into something like Amazon EC2 or Google App Engine, for hosting on the cloud (both have very generous free evaluation deals right now).
|
# ? Nov 28, 2010 01:26 |
|
danishcake posted:Anyone got any recommendations for suitably licensed music to include in a free game? I only really need a short looping affair but bad as my programmer art is my programmer music is worse. I guess I could shell out a tiny amount for it, but I'd much rather it be free as I get no revenues. The only requirement is that you credit the author somewhere. Everything is there in the FAQ.
|
# ? Nov 28, 2010 01:51 |
|
h_double posted:What kind of style of music are you looking for? I might have something lying around or be able to throw together a quick loop for you. It's for a Chu Chu Rocket clone on Android(edit: It's called ShokoRocket), so something suitably light, which won't drive the user up the wall. The music in the original is rather distinctive, but basically a 15 second loop. Anything like that would do. Nalin posted:If you need some royalty-free music, check out http://incompetech.com/ I'll check this out too, thanks. danishcake fucked around with this message at 12:53 on Nov 28, 2010 |
# ? Nov 28, 2010 07:30 |
|
I'm interested in building a side-scrolling shooter al'a UN Squadron or R-type. I'm competent enough in Java to do whatever I really want so in looking for an engine to work with, I found Unity, which you can script in C# (Which is remarkably similar to Java, so I'm told). Unity however, is a 3D engine so while I'm completely inexperienced with this, my intuition tells me that I would be complicating things by building a 2D Sidescroller in a 3D engine. My question for you fine gentlemen is "What engine(s) should I look into" and maybe even "Where the hell should I start".
|
# ? Dec 1, 2010 01:04 |
|
Canine Blues Arooo posted:I'm interested in building a side-scrolling shooter al'a UN Squadron or R-type. I'm competent enough in Java to do whatever I really want so in looking for an engine to work with, I found Unity, which you can script in C# (Which is remarkably similar to Java, so I'm told).
|
# ? Dec 1, 2010 01:14 |
|
Canine Blues Arooo posted:I'm interested in building a side-scrolling shooter al'a UN Squadron or R-type. I'm competent enough in Java to do whatever I really want so in looking for an engine to work with, I found Unity, which you can script in C# (Which is remarkably similar to Java, so I'm told). ActionScript with Flixel or FlashPunk is perfect for stuff like this. In fact, the first Google result for "Flixel Tutorial" has you making a sidescrolling shooter. ActionScript is really easy to pick up and is fun to work with.
|
# ? Dec 1, 2010 21:29 |
|
Ive spent a couple of days going through the implementation of the GJK-algorithm, and I've got the basics down - I can find the closest points on lines/triangles/polygons, and I can work out the closest distance between two polygons. However, I'm having a hard time fitting it all together for collision detection - mainly in finding the closest points on each polygon as opposed to just the distance between them. Does anyone have a link to something that goes over this, as opposed to just the bare mathematics of 'point-line'/'point-triangle', etc.? I've got that down fine, but it's using the information that it gives me that I'm finding hard.
|
# ? Dec 4, 2010 23:17 |
|
PnP Bios posted:I did a writeup on how reflection can be useful for building a game editor for your .NET game. Let me know what you think? The engine I'm working on is a hybrid of Stackless Python and C++ though, so I don't have that problem since I'm using wxPython to create my editor (which is awesome). But that information will be useful if I ever decide to work on a C# project. By the way, is anyone here familiar with RakNet? I've just checked it out and I'm really impressed at the features it offers and how easy it is to set everything up. It's exactly what I wanted since I didn't want to have to use TCP or make my own solution for reliable variable replication. It's also extremely easy to set up and integrate.
|
# ? Dec 4, 2010 23:57 |
|
Staggy posted:Ive spent a couple of days going through the implementation of the GJK-algorithm, and I've got the basics down - I can find the closest points on lines/triangles/polygons, and I can work out the closest distance between two polygons. However, I'm having a hard time fitting it all together for collision detection - mainly in finding the closest points on each polygon as opposed to just the distance between them. A guy at mollyrocket.com made a pretty good video describing GJK used for collision detection. It's a bit wordy at times (the whole thing is nearly an hour long) but he does go beyond the pure math and into the physical interpretation of what it all means. e: After skimming through the video again, I'm not sure if it answers your question. I'm not even sure if I understand fully what you're trying to do. For collision detection GJK is searching for a set of points in the Minkowski difference of two convex hulls that enclose the origin - if that set of points exists the shapes intersect. The set of closest points or the distance between points doesn't matter, you just have to enclose the origin. PDP-1 fucked around with this message at 02:15 on Dec 5, 2010 |
# ? Dec 5, 2010 01:38 |
|
Right now I'm developing a sort of plays-itself RPG to get some experience with different AIs, and I'm not entirely sure where to start. The way I've designed it right now is that every intelligent entity in the game has an 'AI Module', which basically has a 'doStuff' method that's called every tick. Each of the modules have what they need to proceed, like a destination waypoint for a simple goThere module, or what have you. Is there a better way to do this? Everything I look up online is basically either really high-level design, or really low-level code stuff.
|
# ? Dec 5, 2010 03:07 |
|
Could someone explain to me (and then help me when I gently caress up) xna sprite collision? Some people say I need to use bounding boxes, other say I can just use the intersect method in the sprite, and I'm so confused I just need direct help from someone. I don't need pixel perfect, just general rectangles. I tried to do:code:
|
# ? Dec 5, 2010 04:47 |
|
PDP-1 posted:A guy at mollyrocket.com made a pretty good video describing GJK used for collision detection. It's a bit wordy at times (the whole thing is nearly an hour long) but he does go beyond the pure math and into the physical interpretation of what it all means. I think I've gotten the wrong end of the stick then. I already have SAT for collision detection; I was under the impression that GJK would let me work out where on the 'surface' of each polygon the collision takes place. The problem I have right now is that I have two OOBBs colliding, but I need to be able to move them apart once they overlap, and work out which face of each one was involved in the collision.
|
# ? Dec 5, 2010 12:01 |
|
Staggy posted:I think I've gotten the wrong end of the stick then. I already have SAT for collision detection; I was under the impression that GJK would let me work out where on the 'surface' of each polygon the collision takes place. The problem I have right now is that I have two OOBBs colliding, but I need to be able to move them apart once they overlap, and work out which face of each one was involved in the collision. That's where the Voronoi regions and Barycentric coordinates come into play. GJK will get your the vertex of a polygon closest to the other polygon, but it's possible that a point on the edge will be closer. Check out the source on Erin Catto's "Computing Distance with GJK" here: http://code.google.com/p/box2d/downloads/list
|
# ? Dec 5, 2010 22:26 |
|
Bakkon posted:That's where the Voronoi regions and Barycentric coordinates come into play. GJK will get your the vertex of a polygon closest to the other polygon, but it's possible that a point on the edge will be closer. I've still got the wrong end of the stick then. That slideshow is awesome, and I've actually been using it to get everything working so far, but it doesn't address my (poorly explained) problem. What I have is situation a. I need to work out the coordinates of the points where the two bounding boxes cross. Absolute or relative to the box doesn't matter, as I can easily convert between the two. I just need the position of those two ( or one, if the vertex of one box was just inside the other) red points. But GJK just gives me situation b. Yes, the origin being within the combined polygon tells me that the two boxes overlap, and if it wasn't I could perform point-to-polygon testing from the origin on it to determine the separation distance of the two boxes, but this doesn't really help. I've got point-to-line, point-to-triangle , point-to-polygon and polygon-to-polygon testing working fine. Each of those ( apart from the last ) would give me a useful coordinate. But because you have to use the Mikowski Difference for Polygon-to-Polygon testing, all I have is a direction vector ( and therefore distance ) in the case of no overlap, and confirmation of overlap - I already have the latter working through SAT and the former isn't of any use if the two are overlapped ( and I'm only testing if I already know that they are ). I think I'm barking up the wrong tree here. Summary: I don't care about checking for a collision, I need to know the point(s) of collision so I can move the objects apart, I think I'm going crazy.
|
# ? Dec 6, 2010 00:35 |
|
Staggy posted:Summary: I don't care about checking for a collision, I need to know the point(s) of collision so I can move the objects apart, I think I'm going crazy. Ah, I see. Sorry there, I misinterpreted your original problem. I thought you wanted point of impact so you could do rotational calculations for physics, because that's what I was using it for. You're just looking for the minimal overlap so you can remove interpenetration, correct? SAT alone can find the projection vector to do that. (Referencing the stuff seen here: http://www.metanetsoftware.com/technique/tutorialA.html) The direction is the axis of minimum overlap and the distance is the difference of the two projections.
|
# ? Dec 6, 2010 01:17 |
|
I find myself endlessly fretting over what objects should have access to what other objects. I've got the notion in my head that less = better, but I'm not sure whether or why that is true beyond simplicity's sake. For example, I have a Unit class that represents humanoid objects that can move around. Right now the class only has information about that unit (name, position, HP, etc.) with no access to other game subsystems. But suppose I want a Unit to follow a moving target. In the Unit's update method I have to find a path to the target, which is a call to a function in the AI class. The only options I can think of are to include the AI in the parameters to Update (at which point, why not have a permanent reference), pass a permanent reference in the constructor, or move the pathfinding function call up outside of Unit into the class that has access to other things (which will fill that class with all the implementations of certain actions that can't be in the "lower" classes). I'm thinking of just passing a reference to the main game manager to everything and being done with it. Besides being highly inelegant, what cons does this solution have? Is there a better way? I'm using C# and XNA.
nibe fucked around with this message at 02:13 on Dec 6, 2010 |
# ? Dec 6, 2010 02:10 |
|
nibe posted:I find myself endlessly fretting over what objects should have access to what other objects. I've got the notion in my head that less = better, but I'm not sure whether or why that is true beyond simplicity's sake. For example, I have a Unit class that represents humanoid objects that can move around. Right now the class only has information about that unit (name, position, HP, etc.) with no access to other game subsystems. But suppose I want a Unit to follow a moving target. In the Unit's update method I have to find a path to the target, which is a call to a function in the AI class. The only options I can think of are to include the AI in the parameters to Update (at which point, why not have a permanent reference), pass a permanent reference in the constructor, or move the pathfinding function call up outside of Unit into the class that has access to other things (which will fill that class with all the implementations of certain actions that can't be in the "lower" classes). I'm thinking of just passing a reference to the main game manager to everything and being done with it. Besides being highly inelegant, what cons does this solution have? Is there a better way? I'm using C# and XNA. My thought about passing a reference to a master object (containing SoundManager, CollisionManager EntityManager etc. etc.) lately has been: Pros: poo poo gets done faster Cons: Not so reusable. I was swept into the 'reuse is fundamental' argument for too long. As long as you are writing readable code, code is not going to be that hard to reuse in the next project with some tiny refactoring. But the savings from actually getting poo poo done is hard to ignore. It's said that the extra time spent making code reusable doesn't pay itself back until you use the code in 3 projects, so all the headache and messing around probably wont be useful. (I know I've never used the same code for more than 3 games) In the meantime you can do the important things like code the fun stuff instead of being stuck in refactor hell. As an aside, even the big boys cheat. Source Engine has a bunch of singleton managers.
|
# ? Dec 6, 2010 02:41 |
|
nibe posted:I find myself endlessly fretting over what objects should have access to what other objects. I've got the notion in my head that less = better, but I'm not sure whether or why that is true beyond simplicity's sake. For example, I have a Unit class that represents humanoid objects that can move around. Right now the class only has information about that unit (name, position, HP, etc.) with no access to other game subsystems. But suppose I want a Unit to follow a moving target. In the Unit's update method I have to find a path to the target, which is a call to a function in the AI class. The only options I can think of are to include the AI in the parameters to Update (at which point, why not have a permanent reference), pass a permanent reference in the constructor, or move the pathfinding function call up outside of Unit into the class that has access to other things (which will fill that class with all the implementations of certain actions that can't be in the "lower" classes). I'm thinking of just passing a reference to the main game manager to everything and being done with it. Besides being highly inelegant, what cons does this solution have? Is there a better way? I'm using C# and XNA.
|
# ? Dec 6, 2010 02:44 |
|
iopred posted:As an aside, even the big boys cheat. Source Engine has a bunch of singleton managers. Source is an abomination for many, many reasons
|
# ? Dec 6, 2010 03:35 |
|
Otto Skorzeny posted:Source is an abomination for many, many reasons
|
# ? Dec 6, 2010 06:18 |
|
Source was built out of Half-Life which was built out of Quake. Therefore it carries all of the old engine structure paradigms around with it. For example it's the only AAA engine I can think of that still uses BSP as its main scene management. It's tools are poorly supported and under-featured (Hammer only recently included a crappy lighting preview) and Valve provides little or no documentation other than the wiki which is not really enough. I've said it many times but here it is again: Source works great for Valve and what Valve does but nobody else should be using it. The only people who should use Source in my opinion are Valve and TF2/L4D modders.
|
# ? Dec 6, 2010 07:36 |
|
Vino posted:Source was built out of Half-Life which was built out of Quake. Therefore it carries all of the old engine structure paradigms around with it. For example it's the only AAA engine I can think of that still uses BSP as its main scene management. It's tools are poorly supported and under-featured (Hammer only recently included a crappy lighting preview) and Valve provides little or no documentation other than the wiki which is not really enough.
|
# ? Dec 6, 2010 08:01 |
|
Oh I actually like how their netcode work. There's a CEntity class for the server and a C_Entity class for the client, and they're tied together with some special code where if you update an entity on the server all of the data gets automatically propagated over to the client. So if the CEntity gets created/deleted/modified then it gets automatically created/deleted/modified on the client too. Then you put client-specific code in the C_ version like rendering and prediction and yadeya and server-specific code like game logic in the C version. Or if you wanted to you could have both the C and C_ version be the same class and file and use shared code. Everybody talks trash about the Source net code but I've been down in the belly of that beast and I came away impressed. Too bad only Valve really understands it. How's it work in Unreal? I've never coded in Unreal.
|
# ? Dec 6, 2010 08:17 |
|
|
# ? May 12, 2024 02:19 |
|
Vino posted:There's a CEntity class for the server and a C_Entity class for the client, This is a horrible, horrible naming convention (unless you just pulled it out of your rear end for this example). quote:How's it work in Unreal? I've never coded in Unreal. As I understand it Unreal works at the level of individual variables. Object instances are identical on the server and all clients (with the server authoritative) and certain members are tagged as replicated, which causes them to be asynchronously kept up to date with the values of their remote equivalents. You can request different priorities, interpolation types, etc for each of them. The core network layer marshals all the pending updates into bundles, invisibly.
|
# ? Dec 6, 2010 18:37 |