|
Been playing with PyODE, the python wrappers for the ODE physics engine. Plays real nice with PyGame. http://pyode.sourceforge.net/tutorials/tutorial2.html Added a bunch of nodes and motors and poo poo to the tutorial, and just watch it flail around. Neat as hell. Putting extreme values into things makes some pretty loopy 'physics'.
|
# ? Dec 10, 2007 22:08 |
|
|
# ? Apr 23, 2024 22:56 |
|
Why is my perspective projection matrix looking down positive z rather than negative z?code:
code:
Thug Bonnet fucked around with this message at 23:00 on Dec 10, 2007 |
# ? Dec 10, 2007 22:56 |
|
Well, the first thing I notice is that your degree/radian conversion is wrong- all those 360s should be 180.
haveblue fucked around with this message at 23:04 on Dec 10, 2007 |
# ? Dec 10, 2007 23:02 |
|
f and n need to be negated before being passed in, by the looks of it. Since you're looking down negative Z, then the clip planes are actually at -0.1 and -500.0.
|
# ? Dec 12, 2007 14:38 |
|
Does anybody know how far back ATI hardware supports FBOs and non-power-of-two textures (or at least texture rectangles)?
|
# ? Dec 18, 2007 11:46 |
|
I've been learning C++ for a while now hoping to get started writing meaningful games myself, and I think I have a good enough grasp of the language to start applying it. (I have some experience with Java, so I had a decent knowledge of OOP before I even looked at C++). I am not interested in 3D games at all really, 2D is more my sort of thing. Are there any decent tutorials out there for using DirectX (or hell, OpenGL or some other graphics API) in a 2D context? Most of the ones I find seem to focus on 3D, and that seems like a gigantic branch of games development that I'ld rather not go near if I can help it.
|
# ? Dec 18, 2007 15:57 |
|
Danbo Daxter! posted:I am not interested in 3D games at all really, 2D is more my sort of thing. Are there any decent tutorials out there for using DirectX (or hell, OpenGL or some other graphics API) in a 2D context? Most of the ones I find seem to focus on 3D, and that seems like a gigantic branch of games development that I'ld rather not go near if I can help it. If you've already done some 2D programming with a 2D graphics library, feel free to disregard the next paragraph. I haven't seen any such tutorials myself, though they may very well be out there. If you're looking for a quick way to start, I'd suggest looking up some SDL tutorials, and going from there. For high-performance 2D, you'll still want to use Direct3D or OpenGL, but 3D libraries are significantly more complicated than straight 2D blitting libraries, in my opinion. To go ahead using a 3D library, if you can't find some good tutorials on using OpenGL or Direct3D for 2D display or a library that does it for you, the best way would probably just be to start with normal 3D tutorials. Once you've got a grasp on the concepts, it's pretty easy to just draw lots of screen-aligned polygons with an orthographic projection matrix.
|
# ? Dec 18, 2007 17:17 |
|
Danbo Daxter! posted:I've been learning C++ for a while now hoping to get started writing meaningful games myself, and I think I have a good enough grasp of the language to start applying it. (I have some experience with Java, so I had a decent knowledge of OOP before I even looked at C++). It's also written in C++ and not in C like SDL is, which I prefer. I've been using it on and off for a few years now and in my opinion it is really well done and also quite mature at this point. I've always been wondering why there don't seem to be many people using it, the only reason I can come up with is that some people like to do lower-level stuff themselves as well. It may look overwhelming at first, but the good thing is that it's very modular so you don't have to use it all at once.
|
# ? Dec 18, 2007 19:53 |
|
Danbo Daxter! posted:I am not interested in 3D games at all really, 2D is more my sort of thing. Are there any decent tutorials out there for using DirectX (or hell, OpenGL or some other graphics API) in a 2D context? Most of the ones I find seem to focus on 3D, and that seems like a gigantic branch of games development that I'ld rather not go near if I can help it. Part of the reason you'll see so few tutorials is because 2d projects, at least in Direct3d (I'm not terribly familiar with OpenGL), are relatively straightforward. Books like this spend about one chapter covering the D3DXSprite and D3DXFont interfaces because they really are that simple. Anything you need to know about their usage can be gleaned fairly easily from the actual DirectX SDK documentation once you're past all the normal DirectX boilerplate code. If you're going to go beyond D3DXFont/D3DXSprite* you'll need to know at least the basics of working with Direct3d "normally" so any tutorial or book will do. Other than that, I agree that using SDL or Clanlib is a good idea, but learning to use Direct3d or OpenGL "raw" at some point wouldn't hurt either. *In my experience D3DXSprite should pretty much be sufficient for anything. The only good reason I can imagine to roll your own sprite class/library would be if the D3DXSprite interface was missing some feature you needed. D3DXFont, on the other hand, is still abysmally slow for text-heavy projects.
|
# ? Dec 18, 2007 20:28 |
|
Wuntvor posted:ClanLib Wow, this sure has come a long way since I looked at it ~5 years ago, though still no version 1.0 (for whatever that's worth). I'll definitely have to look into it more when I get a chance, but if it's as good as you say, then this seems like a good choice for Danbo Daxter!
|
# ? Dec 18, 2007 22:29 |
|
kewlpc posted:Does anybody know how far back ATI hardware supports FBOs and non-power-of-two textures (or at least texture rectangles)? I don't have the answer, but you could probably find out with the database in the OpenGL Extension Viewer http://www.realtech-vr.com/glview/ A pretty useful application especially for that kind of thing.
|
# ? Dec 19, 2007 01:48 |
|
Awesome, thanks. Looks like I'm going to have to use texture rectangles instead of NPOT textures, though
|
# ? Dec 19, 2007 03:23 |
|
kewlpc posted:Awesome, thanks. The hardware usually pads NPOT textures to POT textures anyway, might as well remove that overhead and do it yourself.
|
# ? Dec 19, 2007 17:51 |
|
tyrelhill posted:The hardware usually pads NPOT textures to POT textures anyway, might as well remove that overhead and do it yourself. Do you have any literature backing this claim up? Specifically OpenGL 2.0 on Nvidia.
|
# ? Dec 19, 2007 22:47 |
|
Isn't that fairly well known? At least for older cards, which is what most people have.
|
# ? Dec 19, 2007 23:16 |
|
Stanlo posted:Isn't that fairly well known? At least for older cards, which is what most people have. I've not seen any official documentation stating this and would be VERY interested in reading some. It's pretty important to me that I can keep an accurate handle on GPU memory usage. Yay for not having a glGetTextureMemoryUsage method.
|
# ? Dec 20, 2007 00:20 |
|
So I'm working on a browser based game and can't decide how to implement a fog of war on the game map. If you don't know what a fog of war is, it basically means that every player sees the map but they don't know what's surrounding them until they go there. The map runs on a coordinate system like this: 0,0 1,0 2,0 3,0 4,0 0,1 1,1 2,1 3,1 4,1 0,2 1,2 2,2 3,2 4,2 0,3 1,3 2,3 3,3 4,3 Each coordinate pair would be assigned a number, eg. 1,2,4, etc... What would be the best way to implement a fog of war? I'm thinking store the visited sectors onto a list and store that into a MySQL Text field and explode/implode them.
|
# ? Dec 20, 2007 09:01 |
|
drcru posted:What would be the best way to implement a fog of war? I'm thinking store the visited sectors onto a list and store that into a MySQL Text field and explode/implode them. Well, it depends on what you mean by best. You have several options for representing maps and at different points you may want to use them all: -List or 1d array of references to given locations, what you have. In this case probably the best because you're only returning a list of what you need to know, so you don't waste your processing power and bandwidth on the remainder. The list/array consideration has to do with how your data gets accessed and rewritten. -2d array of references. Not hugely different to the list, but semantically easier when working with known sizes of map. -Graphs where each location references other locations near it. This is a good way to search and navigate a map, but inflicts serious penalities when one tries to grab the entire graph at once. So not good for getting a fog of war or other "summary" data. -Other data structures? You can put caching and lower-resolution versions and other things on top of the others, but these are mainly used as optimizations. I don't know of other (sane) ways to represent tiled maps in games. And there's a basic decision underlying all of these - whether to dump all the data in each location into a single structured data type, or to parcel out some of the data into their own maps independent of the others, using primitive data types. In some cases you could see a speed boost from the many-maps/primitive-types approach, but it's much harder to maintain a unified structure that way, and the optimization comes mostly from reducing indirection(which has to be weighted against the cost of doing the same lookup amongst multiple maps). Ultimately it's an architectural decision to figure out the data representation(s) your game needs. There's no one right answer, and most games will use some kind of mixed approach, like an array of terrain and a list of units.
|
# ? Dec 20, 2007 10:41 |
|
tyrelhill posted:The hardware usually pads NPOT textures to POT textures anyway, might as well remove that overhead and do it yourself. So, for example, 100x100 texture gets broken into 9 POT textures, as follows; 64x64 64x32 64x4 32x64 32x32 32x4 4x64 4x32 4x4 Hence the performance hit related to NPOT texture use. This may just have been something that Java3D did (that was the platform I developed on), before sending textures to the GPU, but it's been over a year since I looked at this so I can't really remember. Barrackas fucked around with this message at 16:58 on Dec 20, 2007 |
# ? Dec 20, 2007 13:29 |
|
duck monster posted:Been playing with PyODE, the python wrappers for the ODE physics engine. Plays real nice with PyGame.
|
# ? Dec 20, 2007 16:05 |
|
Barrackas posted:I can't remember where I picked this up, but it's in the back of my head somewhere that older cards that don't support with NPOT textures will actually deal with them by breaking the NPOT texture down into the a series of POT textures. I think it's something Java3D did. If a graphics card doesn't support rectangular textures then they can't be used in OpenGL, it's an optional extension (at least, it used to be, and rectangular texture support has been present in all 3D cards for the past several generations).
|
# ? Dec 20, 2007 17:45 |
|
I'm a comp sci junior and I want to do an independent study for next semester. I'm thinking making a video game because it will be a learning process with a very concrete result, I've talked to my advisor about it and he agrees that it's a good foundation. However, I'm not really sure what is in or out of my scope. Right now I'm thinking about using C# and the XNA platform (which I know.. exists, and that's all I know about it). I'm very experienced in Java, I'm very familiar with C# syntax and features, so that's not going to be the hard part. The hard part is defining a project that has significant milestones that I can complete in a reasonable amount of time. I've never done a game from scratch before so I really have no gauge on what I can accomplish in a semester. Right now I'm thinking that creating a platformer is a good simple task to start out with. Anyone have any advice on the subject? I'm, of course, open to using other languages and frameworks (Except Python. I'm a Perl guy. And I'd like to move past Java) or even creating multiple small game platforms (IE a demo Pong, a demo Asteroids, a demo platformer, and a demo RPG/RPG engine). Basically I just need some guidance because I have no idea where to get started. Also how screwed am I if I hate linear algebra?
|
# ? Dec 20, 2007 19:29 |
|
IcePotato posted:Right now I'm thinking about using C# and the XNA platform (which I know.. exists, and that's all I know about it). I'm very experienced in Java, I'm very familiar with C# syntax and features, so that's not going to be the hard part. The hard part is defining a project that has significant milestones that I can complete in a reasonable amount of time. I've never done a game from scratch before so I really have no gauge on what I can accomplish in a semester. If you know C#, you should be fine with XNA. At least, if you have problems, it won't be because of the platform or the language. You're really just limited by your own software engineering skills. I can say with mild confidence that forums.xna.com has better support than probably any other platform you might consider. A small platformer is probably a good idea. I don't think people will be impressed by pong or asteroids, as they can be made in an afternoon. And, not to be a jerk, but even if you come up with a decent RPG engine, any game you make for it is going to suck if you're working by yourself and have a single semester. If you're making a 2D game you don't really need to know any linear algebra at all. If you make a 3D game you don't need to know much. Any competent person can learn the basics.
|
# ? Dec 20, 2007 19:50 |
|
HB posted:I think it's something Java3D did. If a graphics card doesn't support rectangular textures then they can't be used in OpenGL, it's an optional extension (at least, it used to be, and rectangular texture support has been present in all 3D cards for the past several generations). There's nothing stopping the driver (for non-NPOT hardware) from claiming NPOT support and then just padding NPOT textures out to POT ones, or doing what Barrackas said, or some other method. Just like drivers could claim FBO support when the underlying hardware doesn't and then just do a copy operation behind the scenes. Texture rectangles are a different beast than NPOT textures, BTW.
|
# ? Dec 20, 2007 19:54 |
|
forelle posted:Do you have any literature backing this claim up? Not exactly what I said, but this quote is from this book: http://www.amazon.com/gp/product/im...82225765&sr=1-3 stuff on loading textures posted:It is important to note that prior to OpenGL 2.0, these dimensions must be integer powers of 2. There is no requirement that texture maps be square, but a texture loaded with non-power of two dimensions on older OpenGL implementations will cause texturing to be implicitly disabled. Even though OpenGL 2.0 (and later) allows non-power of two textures, there is no guarantee that they will necessarily be fast on the underlying hardware. Many performance-minded developers still avoid non-power of two textures for this reason. I am actually taking a class where the author of this book is lecturing so I'll ask him tomorrow what exactly happens.
|
# ? Dec 20, 2007 21:56 |
|
IcePotato posted:XNA Stuff... Yes, use XNA. If you're going to do anything complicated with translation and rotation you're probably going to have to have at least a little understanding of linear algebra. As long as you stay 2D, you can keep things pretty simple math wise. I would also suggest you try out using just the DirectX SDK instead of XNA. There's alot more you have to do yourself with DirectX that XNA usually handles but you'll learn a million times more about graphics programming using DirectX than XNA.
|
# ? Dec 20, 2007 22:09 |
|
quote:It is important to note that prior to OpenGL 2.0, these dimensions must be integer powers of 2. There is no requirement that texture maps be square, but a texture loaded with non-power of two dimensions on older OpenGL implementations will cause texturing to be implicitly disabled. This isn't true. There are a few OpenGL 2.0 cards that don't support npot textures (I'm looking at you ATi X800). I got bitten by this pretty badly about a year ago when I made the assumption that any OpenGL2.0 card can support npot textures. Always make sure that the GL_ARB_texture_non_power_of_two is present, at least until ATi get themselves in line with their old graphics drivers (unlikely).
|
# ? Dec 20, 2007 22:11 |
|
tyrelhill posted:I would also suggest you try out using just the DirectX SDK instead of XNA. There's alot more you have to do yourself with DirectX that XNA usually handles but you'll learn a million times more about graphics programming using DirectX than XNA. I disagree. I think you'll end up wasting time on unimportant details if what you want to do is make a game. It doesn't really hide that much either. It will setup D3D for you - not very exciting, and setup a render loop for you - trivial. You can override device creation too and just a tiny bit of hacking, use your own render loop if you really want too. Render targets are a little weird since they need to be compatible with the 360, but nothing too fancy is going on. I can't really think of anything else it does that D3DX doesn't already do. You'll probably have a better understanding of DirectX too since you're doing a lot of the same things while not getting frustrated with reference counting or lost devices.
|
# ? Dec 20, 2007 22:58 |
|
tyrelhill posted:Not exactly what I said, but this quote is from this book: Cool, Sounds like an interesting course. I'm not really bothered about pre-2.0 cards or low end cards either.
|
# ? Dec 21, 2007 00:49 |
|
We can't all target Quadros
|
# ? Dec 21, 2007 01:42 |
|
Some time ago, I wrote an application that renders some 2D polygons. I was lazy about handling complex cases so I used the GLU tesselator to handle drawing them. I'm rewriting the rendering code using DirectX as a learning experience, but I can't find a DirectX equivalent to the tesselator. As a stop gap measure, I've used the tesselator to do the tesselation and then just render the primitives with DirectX. I'm hoping there's a better way though. Does anyone have any experience with this sort of thing in DirectX?
|
# ? Dec 21, 2007 02:08 |
|
Stanlo posted:If you know C#, you should be fine with XNA. At least, if you have problems, it won't be because of the platform or the language. You're really just limited by your own software engineering skills. I can say with mild confidence that forums.xna.com has better support than probably any other platform you might consider. Sweet, thanks. I'm assuming the normal track is to create an engine, create editing tools, and then make levels using the tools?
|
# ? Dec 21, 2007 23:36 |
|
IcePotato posted:Sweet, thanks. Probably more likely that you'll create the engine, create some content manually, and then make the content editing tools.
|
# ? Dec 21, 2007 23:47 |
|
Ugg boots posted:Probably more likely that you'll create the engine, create some content manually, and then make the content editing tools.
|
# ? Dec 22, 2007 00:39 |
|
Even better, you write the loading (and storing) code for the editor and then add those files to the game engine project.
|
# ? Dec 22, 2007 05:15 |
|
Thanks for all the help guys, I'll write up my proposal over break and probably be back with questions once the semester starts again
|
# ? Dec 22, 2007 06:22 |
|
http://www.amazon.com/Introduction-Game-Programming-Direct-9-0c/dp/1598220160/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1198303208&sr=8-1 Just bought this book from Barnes & Noble. You can get it for $30 on Amazon. So far it's been an incredible read. The first three chapters went from vectors, to rays, to matrices, and it never lost me! I'm about to get into Part II (Nerdy DX Goodness.)
|
# ? Dec 22, 2007 13:11 |
|
SnakeByte posted:http://www.amazon.com/Introduction-Game-Programming-Direct-9-0c/dp/1598220160/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1198303208&sr=8-1 Yeah, I've recommended this book here before and I still say it's the only C++/DirectX book that's actually worth buying. Most online tutorials are terrible, so if you can't get what you need from the SDK documentation it's probably the best way to learn the API. The math coverage is a little light, though, so I think picking up something to supplement that (assuming you don't already know everything you need) isn't a bad idea.
|
# ? Dec 22, 2007 17:12 |
|
I've just finished writing Vector,Quaternion and Matrix classes (c++). I understand vectors and matrices (well I hope I understand enough). I want to make a class which can be used to rotate things through 6dof. I can use the quaternions to make a basic fps camera which works fine but I have no idea how I am supposed to make a 6dof camera.
|
# ? Dec 24, 2007 04:44 |
|
|
# ? Apr 23, 2024 22:56 |
|
FlyingDodo posted:I've just finished writing Vector,Quaternion and Matrix classes (c++). I understand vectors and matrices (well I hope I understand enough). I want to make a class which can be used to rotate things through 6dof. I can use the quaternions to make a basic fps camera which works fine but I have no idea how I am supposed to make a 6dof camera. By "basic fps camera" do you mean a camera that uses Euler angles? If you can convert the angle and axis from a quaternion to an orientation matrix, you can use it to transform the camera just like any other object. Then, to spin the camera around a relative axis like in Descent, you transform the target axis with the camera quaternion, convert the result and the magnitude to a quaternion, and multiply it back into the camera orientation. If that didn't make any sense, I can try to find the book I got this from in the first place. It's been a really long time since I had to work with quaternions.
|
# ? Dec 24, 2007 06:13 |