|
ValhallaSmith posted:I've been trying this out as well now that it supports authoring on windows. Its very handy for simple stand alone games and is about the only reasonable game in town for browser 3d games. Short of requiring someone to DL a plugin for each game. I didn't think I'd like it at first but after about a week of working with it (only a couple hours a night) I've got the basic framework of an RTS going. I'm leaning very heavily towards picking up the license once the trial runs out.
|
# ? Apr 3, 2009 15:56 |
|
|
# ? May 9, 2024 23:19 |
|
Alright, I worked out a bunch of lingering problems and added a neat thing to play with the camera (press TAB)... It's still a silly demo, but I would still like to hear if anyone has problems/glitches because I don't know anything about packaging poo poo for distribution Get it here TSDK posted:It looks very much like you need to check out the rasterisation rules and texel lookup rules, because that's exactly the sort of effect I'd expect if you haven't got the pixel->UV->texel alignment, or pixel coverage right. Man I spent so many goddamn hours staring at OpenGL docs when I first had this problem Hubis posted:No problems here (nice camera motion tracker btw) Yeah, I'm not doing anything weird. I'm leaning towards a lovely OpenGL implementation on my old laptop's onboard video card. Thanks for looking, glad it works on at least one other person's machine
|
# ? Apr 4, 2009 00:19 |
|
not a dinosaur posted:Alright, I worked out a bunch of lingering problems and added a neat thing to play with the camera (press TAB)... It's still a silly demo, but I would still like to hear if anyone has problems/glitches because I don't know anything about packaging poo poo for distribution Ahh yeah, that could be it. I've run into problems in the past where, say, the texture coordinate interpolators seem to have fewer bits of precision than they should. Definitely a possibility for integrated graphics hardware.
|
# ? Apr 4, 2009 00:54 |
|
I am writing a simple tile based game using XNA, and I'm looking at improving my render path. My tiles are based off of these: Click here for the full 700x720 image. I'm storing all my tiles in a 2x2 array of Cells (where a cell has all the information about that 'column' of blocks). Right now, I've got, say 2000x2000 cells. Currently, my render path looks like: -- If my cached render is dirty, redraw all my Cells from back to front, left to right. The cells themselves draw from the bottom up. I only draw the cells currently within the viewport. I also cull any blocks that have a block on top of them and in front of them. After the block is drawn, I draw the appropriate shadow on top of the block. There are 101 different possible combinations of the 9 different shadows. For example, a tile can have both a western and eastern shadow. Rather than draw each shadow separately (resulting in up to 4 or file extra calls to Spritebatch.Draw()) I cache combinations of shadows as their own textures. All of this draw is rendered to a rendertarget, and is saved off as a texture, which is then drawn. -- If I haven't moved my camera, or selected a new tile, I just draw the saved cache. This gives me fantastic frame rates. Currently, I am only drawing the blocks, and none of the objects or characters. It's working great so far, keeping acceptable frame rates on my cruddy laptop. But I'm worried about drawing characters who move every frame. Nominally, I would just render each character when I render the cell they are standing on. However, because I do not render my cells every frame to improve performance, I cannot simply draw the character when I draw the cell. So I thought I would just draw all the tiles, then draw all the characters, but that doesn't work either, because the characters can be occluded by the world. My thought was to do a multi-pass render, but I've got very little experience doing something like this. Help me figure out if this process would work: 1.) Render all the block's color (no shadow data) to a texture the size of my viewport. (Call this BlockColor.) 2.) Render the depth of the block to a texture. Render my textures as solids with a color representing their depth. (Call this BlockDepth.) 3.) Render all of my shadows to a texture, using BlockDepth to do my occlusion of the shadows. (Call this ShadowColor.) 4.) Draw BlockColor to the screen. 5.) Draw each character to the screen, using BlockDepth to do my occlusions. (Ie, if a character is halfway behind a block, only draw his upper half.) 6.) Draw ShadowColor to the screen. Note: Steps 1-3 are only done when the camera moves, or blocks are added/removed from the scene. They are expensive, but easily cached. Can this be done? Is this easy to do? Is this the right way to do it? Can you think of any other optimizations to this algorithm? Is there something that does this sort of thing automatically? I'm reading about depth buffers, but I'm still not entirely sure what that is, how they are used,
|
# ? Apr 4, 2009 01:25 |
|
I have a hard time believing you're running into performance problems rendering a couple thousand quads (unless you're rendering the entire world for some reason).
|
# ? Apr 4, 2009 01:47 |
|
It's on my old rear end laptop, with no video card, and 1 gig of ram for Vista, my video card, and all my other applications. Even then, it runs it pretty solid at 40 frames per second or so when I'm drawing a 40x40 grid. On average, each cell draws ~2-3 blocks and a shadow. So that's 5600 quads roughly, and I don't know how much of a performance hit using managed code brings. I am smart about only drawing the tiles that intersect with my viewable area. (I use a division and a mod to determine this, then just count N cells to the right and down.) I've got plenty of early outs for preventing draws. My desktop runs it fine, but I'm interested in learning some new techniques and ways of organizing things in a more efficient manner. Knowing how to make XNA put a sprite on screen is one thing -- knowing what other tools I have access to is another.
|
# ? Apr 4, 2009 07:50 |
|
Would this be the appropriate place to ask about using open source kit like WorldForge and Ember and the like?
|
# ? Apr 5, 2009 20:41 |
|
metztli posted:Would this be the appropriate place to ask about using open source kit like WorldForge and Ember and the like? If no one knows the answer, no one will reply to your post, so just ask.
|
# ? Apr 5, 2009 23:07 |
|
Pfhreak posted:It's on my old rear end laptop, with no video card, and 1 gig of ram for Vista, my video card, and all my other applications. Even then, it runs it pretty solid at 40 frames per second or so when I'm drawing a 40x40 grid. On average, each cell draws ~2-3 blocks and a shadow. So that's 5600 quads roughly, and I don't know how much of a performance hit using managed code brings. How are you drawing your sprite batch? The biggest hit you can take is when you change textures. The standard method is deferred, which does no sorting, try using textured instead. http://msdn.microsoft.com/en-us/library/bb195102.aspx -- SpriteBatch.Begin http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.spritesortmode.aspx -- SpriteSortMode
|
# ? Apr 6, 2009 08:54 |
|
What is a commonly used file format for game models? What's one that wouldn't be mind numbingly hard to create an implementation for? What I'm looking for: -Ascii format and at least somewhat human readable -Animation and texture map support -Easily exported from maya or blender Right now I'm looking at MD5, but the exporters for blender are either bizarre or badly implemented and I haven't looked much at the maya ones. I want to know if there is some alternative model format that I've been overlooking.
|
# ? Apr 6, 2009 09:17 |
|
Contero posted:What is a commonly used file format for game models? What's one that wouldn't be mind numbingly hard to create an implementation for? What I'm looking for: Source SMD: Crude as gently caress, but easy to parse and IT STORES NORMALS which means no hosed up seams or other horrible stitching issues id Tech 3 MD5: Fairly straight-forward pretransformed weight based format Unreal PSK/PSA: Fairly straight-forward reference/palette based format. Get the specs here: http://udn.epicgames.com/Two/BinaryFormatSpecifications.html The IDEAL target, which is unfortunately a lot more difficult, would be COLLADA or FBX. Both were designed as powerful, very complete interchange formats and are supported by virtually every modeling/animating package under the sun. For COLLADA you can use FCollada (open-source parsing library) to greatly simplify the process of loading them, but it's still going to give you a shitload more information than you'll probably need and you'll need to muck around a lot to get things usable. Also, parsing animations from COLLADA files is a pain in the rear end. Not coincidentally, every open-source engine that supports COLLADA meshes does NOT support COLLADA animation yet!
|
# ? Apr 6, 2009 10:01 |
|
Contero posted:What is a commonly used file format for game models? What's one that wouldn't be mind numbingly hard to create an implementation for? What I'm looking for: OBJ is basically the BMP format for models. It's Ascii and easy to parse, there's no built-in animation support, but blender can export each keyframe as an individual file. It supports grouping, normals, materials, UV texture coordinate mapping, etc.
|
# ? Apr 6, 2009 19:28 |
|
Contero posted:What is a commonly used file format for game models? What's one that wouldn't be mind numbingly hard to create an implementation for? What I'm looking for: In practice most games (or engines, really) end up putting together their own formats, and write their own exporters for them. Primarily because each engine have their own specific ways of doing things and chances are there isn't going to be an existing format which is a perfect fit for that (and making a file format of your own when you don't have to worry about forwards/backwards compatibility etc isn't all that hard). COLLADA and things like that are mostly used as just intermediate formats (i.e. it's what your tools will use), but you'll generally want to convert them to a more efficient (binary) format for the actual game. If you just need something temporary or for testing and/or don't want to make your own exporter, the MDx formats are fairly straightforward. And you could take a look at the Milkshape 3D format as well, there's a NeHe tutorial for that one (it's not ASCII though).
|
# ? Apr 6, 2009 22:42 |
|
MS3D can export an ASCII format as well. As far as feature support, having normals and tangent/binormals (if you're using bumpmapping) in the format are very helpful with getting seamed models to work properly. SMD supports normals, COLLADA/FBX support both (they need to be enabled in the export options), PSK/PSA and MD5 support neither. If you want I can give you the source to the import tool I'm using on my own project, which supports all three and will convert them into a wonky binary format that's designed to be fairly neutral in regards to what technique it uses to transform the weights: http://svn.icculus.org/*checkout*/teu/trunk/tertius/docs/tmrf.html?revision=192 OneEightHundred fucked around with this message at 00:12 on Apr 7, 2009 |
# ? Apr 7, 2009 00:06 |
|
I'm trying to make a simple 2D game and it happens to be in C++. I have graphics and whatnot going but I am trying to figure out collision detection. Can anyone provide a good link or explain the logic behind it? I can't wrap my head around it easily. Pseudo-code will do just fine, I want to figure out the concept.
|
# ? Apr 7, 2009 02:27 |
|
Sylink posted:I'm trying to make a simple 2D game and it happens to be in C++. Here's an extremely simplistic brute-force approach. code:
|
# ? Apr 7, 2009 03:00 |
|
Sylink posted:I have graphics and whatnot going but I am trying to figure out collision detection. Buy this book: http://realtimecollisiondetection.net/ It's really the only real advice for you.
|
# ? Apr 7, 2009 03:03 |
|
Ugg boots posted:Buy this book: http://realtimecollisiondetection.net/ Book owns. Doesn't really talk about collision resolution though, which I think is a lot more challenging.
|
# ? Apr 7, 2009 03:04 |
|
Avenging Dentist posted:Book owns. Doesn't really talk about collision resolution though, which I think is a lot more challenging. Ugh, tell me about it. I've had too many problems with bounding boxes getting stuck on each other to count.
|
# ? Apr 7, 2009 03:05 |
|
What exactly do you not understand about collision detection? Is it how to check if two given objects are colliding with each other, or is it about how to do that for a bunch of objects? If you clarify what you don't understand maybe one of these jerks can help.
|
# ? Apr 7, 2009 03:10 |
|
There's so many non-trivial problems in game design (such as collision detection) that I really recommend that anyone who hasn't done so already should take a course in algorithm design (and possibly data structures, usually addressed at the same time).
|
# ? Apr 7, 2009 04:41 |
|
The tutorials made by Metanet (the guys behind the game "N") were extremely helpful when I was trying to implement collision for my 2D game, and can most likely be useful for any kind of collision detection in 2D games. They talk about stuff like implementing broad and narrow phase collision, Separate Axis Theorem for AABB objects and Circles, and all that stuff that I now pretend to understand. Metanet Software Tutorials This is probably worth a read for just about everyone trying to refresh their knowledge of 2D collision detection. I'm interested in more qualified folk's opinions on their method.
|
# ? Apr 7, 2009 17:49 |
|
PnP Bios posted:How are you drawing your sprite batch? The biggest hit you can take is when you change textures. The standard method is deferred, which does no sorting, try using textured instead. I'm using immediate mode currently. I have a '3D' world composed of 2d blocks. It looks something like the code posted before. The problem with textured based sorting is that sometimes I'll want to draw my stone texture first, and other times I'll want to draw my dirt texture first -- even within one cell. It completely changes the way I navigate during my draw. That wouldn't be a problem, really, except I tested it with only one texture and didn't see any significant improvement. (1-2 fps.) code:
|
# ? Apr 8, 2009 05:48 |
|
Pfhreak posted:I'm using immediate mode currently. I have a '3D' world composed of 2d blocks. It looks something like the code posted before. The problem with textured based sorting is that sometimes I'll want to draw my stone texture first, and other times I'll want to draw my dirt texture first -- even within one cell. It completely changes the way I navigate during my draw. What does cells[x,y].GetTexture() do?
|
# ? Apr 8, 2009 05:59 |
|
terminatusx posted:The tutorials made by Metanet (the guys behind the game "N") were extremely helpful when I was trying to implement collision for my 2D game, and can most likely be useful for any kind of collision detection in 2D games. They talk about stuff like implementing broad and narrow phase collision, Separate Axis Theorem for AABB objects and Circles, and all that stuff that I now pretend to understand. Those tutorials are really useful for getting some of the concepts together and making basic, non-sucky collision. They don't really last once you try to do something different from N, though. Doing a SAT-based response on two AABBs of differing sizes, for example, is considerably trickier than AA-squares of equal size. Particularly, situations like this: code:
With that in mind, I've simplified to a slightly less ambitious goal with groups of fixed-size tiles: http://dl.getdropbox.com/u/254701/examplemultitile.swf This was relatively straightforward in comparison, as now the world collision stays strictly on the grid, and the player is a composition of equal-sized tiles that only need to check - at most - four world tiles each. So then the question is only about reconciling different pushout vectors to find the preferred one. I needed a few tries to get it, but the algorithm I resolve that particular part with is: 1. Apply a temporary velocity vector to each tile and collide using that. 2. Get the pushout vector returned from each tile in the group. 2a. If none of them return a pushout vector, there is no collision here and the original vector is safe to use. 2b. If one of them says they hit but can't find any pushout, you're running into a corner, so end the computation and return a zero vector. 3. Run the pushout again using each of the solutions. The first solution that doesn't hit anything is a good solution, so end there. If none of them work you're blocked, so return a zero vector. It seems to be pretty fast as-is; at least, it holds up when I try stacking hundreds of excess tiles on the player collision, but I don't have a really good test case yet.
|
# ? Apr 8, 2009 08:48 |
|
t_rf posted:Those tutorials are really useful for getting some of the concepts together and making basic, non-sucky collision. They don't really last once you try to do something different from N, though. Doing a SAT-based response on two AABBs of differing sizes, for example, is considerably trickier than AA-squares of equal size. What. Both of those are really, really easy. Also your example situation is silly, since you can just roll the player back in time until he's not intersecting anything. It's straightforward to modify SAT to provide you with the delta-t of any intersection and you can just take the minimum of that. (Granted, you may sometimes need to tweak things to deal with floating-point error, but floating-point limitations crop up pretty often anyway.) Avenging Dentist fucked around with this message at 08:56 on Apr 8, 2009 |
# ? Apr 8, 2009 08:53 |
|
I have a neato continuous collision detection setup using Minkowski sums, and now I'm trying to add impulse-based collision response on top of it. It works great, except when you try to actually push objects around (as opposed to just hitting them). This basically causes a near infinite number of collisions between the two objects in one timestep. It seems like this would be a common problem with impulse-based resolution- does anyone know a clever way to get around this? Right now I'm trying to come up with a way to move both objects as one for the duration of the timestep, or at least until they disconnect, in which case I have to somehow detect this moment of disconnection so I can integrate up to it... This seems really ugly and I keep finding more exceptions to work around. I should note that for now I am only working with 2D non-rotating quads
|
# ? Apr 8, 2009 10:54 |
|
Avenging Dentist posted:What. Both of those are really, really easy. Rolling back in time alone gives you a fairly lovely collision response - no sliding behavior, your player sticks on the walls when moving at any diagonal - that you have to add hacks over to make work in gameplay. Hence I'm going back and looking for a more general solution.
|
# ? Apr 8, 2009 17:54 |
|
Isn't collision response the job of the integrator, not the collision detection system?
|
# ? Apr 8, 2009 20:35 |
|
Ugg boots posted:What does cells[x,y].GetTexture() do? Returns a texture2D from a dictionary based on the cell type. Each cell has a CellType enum that has entries like Stone, Wood, Dirt, etc.
|
# ? Apr 9, 2009 03:37 |
|
Some of the GDC 09 tutorials have slides up: http://www.gdconf.com/conference/tutorials.html There might be audio/video next week. The Insomniac slides on PS3 programming [1][2][3][4][5] are very interesting - very different from what I'm accustomed to. Unfortunately without audio/video some slides are a little hard to follow, although there is some overlap with the material they've released on their website: http://www.insomniacgames.com/tech/techpage.php I think it's awesome that they go into so much detail about their engine and implementation, and I wish more games companies did the same.
|
# ? Apr 9, 2009 22:41 |
|
I just found this link http://cohpatch.relic.com/relic/Relic_AStarKit.zip Could be worth a look.
|
# ? Apr 9, 2009 23:49 |
|
Fib posted:I think it's awesome that they go into so much detail about their engine and implementation, and I wish more games companies did the same.
|
# ? Apr 10, 2009 01:17 |
|
I am looking for some information about different 3D model formats that support animation data (and 3D model animation in OpenGL in general). The only good resource I could find was using the MD2 format. Is this still an acceptable format to use? It seems dated. Are there better? I also understand that there's formats that support vertex animations and bone animations. I only have (limited) experience with vertex animations. Is bone animation something to consider even in a simple project without any complicated physics - or is it best (and easier) to just stick with vertex animations?
|
# ? Apr 14, 2009 20:40 |
|
supster posted:I am looking for some information about different 3D model formats that support animation data (and 3D model animation in OpenGL in general). Start here: http://forums.somethingawful.com/showthread.php?noseen=0&threadid=2692947&pagenumber=34#post358983362
|
# ? Apr 14, 2009 20:51 |
|
Avenging Dentist posted:Start here: http://forums.somethingawful.com/showthread.php?noseen=0&threadid=2692947&pagenumber=34#post358983362 Anyway, thanks for pointing that out. I am still curious about vertex animation vs bone animation - but that is general enough that I am sure I can google enough information. At this point I think this project's limited use of 3D models will be simple enough to just stick with vertex animations. If I stick with vertex animations I guess MD2 is my best choice? I am unsure about MD3, I've found conflicting information about if it uses bone animations or vertex animations.
|
# ? Apr 14, 2009 21:03 |
|
md3 is all vertex animation.
|
# ? Apr 14, 2009 22:08 |
|
Or just use Assimp and use whatever format(s) you happen to find the best exporter for.
|
# ? Apr 14, 2009 23:03 |
|
krysmopompas posted:Or just use Assimp and use whatever format(s) you happen to find the best exporter for. What an unfortunate name.
|
# ? Apr 14, 2009 23:05 |
|
|
# ? May 9, 2024 23:19 |
|
krysmopompas posted:Or just use Assimp and use whatever format(s) you happen to find the best exporter for.
|
# ? Apr 15, 2009 05:55 |