• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

120 Neutral

About Jeremy6996

  • Rank
  1. Thanks rumblesushi, I've decided instead of using points to describe the position of the bones in a given frame, I'll use rotation. This allows me to use the AngleJoint in the physics engine to move them to where they must be. So now a key frame will describe how a bone must be rotated by the time it's finished, which is preferable as the relative rotation of a bone is more predictable than the absolute position of a point in a bone. The problem I was having with the origin is: the physics points & bones are not contained in any sort of body and thus I can get the position of say a joint in the 'body', or a bone in the 'body', but of all the bones and points what actually defines the center of the physical body? I solved this by welding a point(0,0) to a defined 'anchor point' so that when that anchor point moves so does the center point welded to it and thus the so called 'position' of the body will change aswell. Sorry this is hard for me to explain :X I really appreciate the help from you and all those who came across my thread. I've solved the problem, thanks.
  2. Alright, so I have a single physical body which consists of a series of points and bones which ultimately represent a charachter skeleton. This skeleton is registered in the physics engine(I'm using Farseer Physics). Each physical body can have numerous animations which consist of keyframes. These key frames give the position the points in the physical body must match at the time the frame has finished(I use linear interpolation to get the vertices where I want them over a period of time to give it a smooth effect). The primary problems come into play when: A) Farseer Physics (AFAIK) requires the joints have absolute position, so how do I translate the relative positions in the key frame to their corresponding absolute positions in the world if I have no origin to work off of? B )I don't want my animation system to fight with my physics engine; how is this handled if an incomplete animation can cause the game to look kind of ugly.
  3. Design flaw, help.

    Alright, thanks. Sorry, I wasn't sure if it was an acceptable practice. Phew, was afraid I was in for a big rewrite!
  4. I think I may have made a really big mistake in my game engines design and I need a bit of help fixing it. Here's my situation: What I've done is wrapped XNA in a module called "GraphicsAPI" which would, simply put, wrap the api incase I later decided to switch to OpenGl, DirectX, etc... Overtop of that module I have my graphics engine which provided a child-parent node way of organizing graphics, it also manages loading of graphics models and a couple other functions. All my modules share a math library (Wrapper for that provided by XNA), so that no conversions need to take place when the graphics module needs to send, ie, a vector over to the game engine. So as it stands, my game engine module does not have any knowledge or access to any XNA components and is using the common math library for vectors and matrices. The problem comes in when: Most C# physics engines are dependent on XNA, it would be really messy to have the game engine use the XNA framework and continuously convert my Math library vectors to XNA vectors. I'm thinking maybe I can have the physics engine work closely with the graphics api wrapper, but that too sounds like a pretty messy idea. Thanks.
  5. I'm interested in creating a game with a map system similar to that of FF7. Where the environment is primarily 2D. With some 3D elements(such as characters). I've written an isometric engine before, but I'm not sure if an isometric engine is sufficient or too much. I just can't figure out how collision would work. Here's a ss of FF7's mapping system: http://bulk2.destructoid.com/ul/137223-barr.jpg Notice 2D environment(which looks 3D), and 3D characters & a couple scene elements.
  6. Thank you all for your suggestions. I think I've found a good book, but I don't want to advertise it until I'm sure it is sufficient. I'm reading through it now, and I'll post regarding what I think of it most likely next week.
  7. Thanks. I am reading into vector-mathematics and trig and I find it is helping my understand a lot more. I'm still trying to find a good physics book though.
  8. Quote:Original post by grhodes_at_work Can you say which books you tried reading before? I was going to offer some advice, but I realized I might be pointing you to something you've already tried. I don't necessarily believe you'll find something that meets all of the needs you list perfectly, but if we know what didn't work for you, maybe we can offer something else. One more question...you said you have studied some linear algebra, and some trig....what about basic geometry other than trig? What about calculus? Anything at all? I remember studying geometry in 7th grade and calculus in 11th grade, and like you will be doing I first studied physics in 11th grade...but I don't know where things are now really. Yes, I've done some 2D geography in math class. As far as 3D geography is concerned, I have an OK understanding of the subject, which was self-taught after working with 3D graphics. We've done basic slope(I.e y = mx + b and Ax + By + C = 0). Translations, rotations, and scaling in 2D space. (I understand yaw-pitch-roll, the matrix multiplication pattern, but haven't the slightest clue how a matrix object works, I've been using APIs to create 3D rotations and translation matrices). I've tried O'Riley Physics For Game Developers, but was confused while it was explaining quantities(Which is the first chapter XD). It began to talk about the dot-product of two vectors(which we've not covered in GR10), and using symbols(not variables, but for example a large italic I or L looking symbol in the middle of the expression) which've not been explained. Sorry for being so vague. The book gives me the impression it was made as a reference(or for someone to expand) on their physics knowledge before taking courses in a post-secondary education course. I haven't done any calculus courses just yet.
  9. I've procrastinated writing the physics engine for my game a while now. It's not that I don't find the topic interesting, I DO want to learn about physics, and I am taking a physics course next year. I've tried purchasing and reading two different physics books, but I don't understand anything past the first chapter. This is mostly due to the terminology used, and the unexplained symbols in the formulas. I want to find a book which : A ) Assumes they're dealing with a GR10 math student(I.e, not presenting weird symbols in formulas, and expecting the reader to understand them. Like a big italic 'L' looking symbol in the middle of an expression.) B ) Will prepare me for next-year's physics course(which is Physics11, there is no physics10, so this will be my first physics course). C ) Will be applicable to writing a physics engine. In grade ten we understand linear algebra, some trig(though I did some of this in grade 9, we still haven't covered it in GR10 math just yet. I would need a refresher on the basics of trig). Well, tbh, I can't recall everything we are taught in GR10, there's probably a list that I can get\make for you. I know it's probably difficult to find such a book, but I don't want to make use of a pre-existing physics engine, as the whole point of writing my game engine is to gather experience in the areas of game development.
  10. Help understanding trilinear interpolation formula

    Quote:Original post by haegarr Quote:Original post by Jeremy6996 I need to perform trilinear interpolation between two 3 dimensional vectors in my vertex shader.Are you sure you actually mean tri-linear interpolation? A linear interpolation is done between 2 values (w/o restricting "values" to scalars here, i.e. they can be vectors, too). A bi-linear interpolation is a linear interpolation of 2 already linear interpolated values. And a tri-linear interpolation is a linear interpolation between 2 already bi-linear interpolated values. That said, a tri-linear interpolation is done using 8 values (2x2x2). Now, you actually have 6 scalar values due to 2 3D vectors. Even if these 6 velues are uncommonly organized in 2 3D vectors (I mean uncommonly w.r.t. the scheme described above), there would be a lack of 2 values. Hence you probably just want to perform a linear interpolation of 2 3D vectors. Assuming that the vector is defined in Cartesian space, this means to do 3 independent linear interpolation between the 2 scalars of each dimension. Yeah, sorry, I was doing some wiki-ing, and I got confused when it said something about trilinear on 3 dimensional vectors. Linear is what I'm after. Thanks. pu = p0 + u(p1 - p0) So(pseudo code) float[] vec1 = float[3]; float[] vec2 = float[3]; float[] interpolatedVec[3]; for(int i = 0; i < 3; i++) interpolatedVec[i] = vec1[i] + fAmount(vec2[i] - vec1[i]);
  11. I need to perform trilinear interpolation between two 3 dimensional vectors in my vertex shader. I haven't been able to find well explained formula for doing this. If someone doesn't mind linking me or giving me a brief explanation, that would be appreciated. Up to this point I've just been using the Lerp routines in the vectors. Thanks
  12. Quote:Original post by Kapoef some1 very smart told me once that the order that u multiply the matrices are important. It is. The multiplication order of a matrix is ISR(O)T Matrix Identity * Scale * Rotation * (Origin Matrix) * Translation D3DTS_WOLRD tells D3D to set the world transformation in (I assume) the vertex-shader. In XNA we have no default shader, I'm not sure about DirectX, but you must be using one in some form or way. Just as D3DTS_VIEW sets the view transformation. This is the orientation of your "camera" view. D3DTS_PROJECTION sets the projection matrix which describes how everything should be rendered. I.e aspect ratio, near-plane, far-plane, etc is held here.
  13. Using multiple vertex streams

    Quote:Original post by MJP Well in general they're simpler than you think. On the app side of things, you simply create multiple vertex buffers. Your VertexDeclaration must contain all of the elements in all of your vertex streams. Then you bind your buffers to different input streams, in render. In your vertex shader, you then get data from all of your streams simultaneously using semantics that match your declaration. So for instance let's just say you had positions. You would create two vertex buffers of the same size, with a Vector3 for each vertex. Then in your declaration you would first have usage set to Position and a usage index of 0, bound to stream 0. Then your second element would be another Position with usage index 1, and stream 1. Your vertex shader input would look like this: struct VSInput { float4 Position0 : POSITION0; float4 Position1 : POSITION1; }; Ah, thank you. This makes perfect sense.
  14. Using multiple vertex streams

    Quote:Original post by MJP If you're targeting the Xbox 360, it might be easier for you to just pack your animation data into textures that you sample in the vertex shader. I was going to do this, but I am also interested in how multiple vertex streams work.
  15. Quote:Original post by murdock I've been debating some design issues today and thought I would open my quandry up for some feedback/opinion. I already have a basic Tile Engine that I'm going to be adding to and reworking through the course of this project, but I'm also thinking about how to do my NPCs and Treasure Chest stuff. Currently, my tile engie is a Drawable Game Component build upon a 3d array. Initially, I had my array only hold ints that determined what tile to display. Now I'm trying to figure out how I would connect my NPCs to the array(Map); as well as, my treasure chest stuff. I have thought about having drawable game components for each of these and use some game services to interact with the Tile Engine and update the array(Map). Should I just store the locations of the NPCs and chests in a Game Component and use those to define functions for interactions with each and only use the Tile Engine for updating the locations of each in the Array(Map) ? Does this sound like a good idea?mattheweston Chaos Rift Newbie Posts: 37 Joined: Mon Feb 22, 2010 2:32 am I too encountered this issue when I was working on my isometric game engine. I concluded that each player would not be directly connected to the tiles. Instead, when doing logic related code(such as path finding(collision detection), etc) I would locate which tile the player was on. The same worked for rendering. I would find out which tile the player was on, and then render him as an object would be rendered on the tile.
  • Advertisement