• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Muzzy A

Members
  • Content count

    197
  • Joined

  • Last visited

Community Reputation

737 Good

About Muzzy A

  • Rank
    Member

Personal Information

  • Location
    Winter Park, FL
  1. It looks like speed should be called Force.  You're applying it to the acceleration which means it's a sort of force. Velocity already contains your speed. Just a little note.
  2. You can just add or subtract the camera's position   an object is at position // Screen Coordinates x = 300; y = 300; The camera's top left is at position x = 200 y = 200 Picturing this in your head you can tell it should render at 100,100 on the screen   soooooo objX - camX = 100; objY - camY = 100; For input.... You clicked the screen at position x = 100; y = 200; Cameras top left position x = 200; y = 200;   // Coordinates in the world would then be... x = mouseX + camX; // 300 y = mouseY + camY; // 400   gridPos = worldIsoGrid( x,y,widthHalf,heightHalf);
  3. I was searching and didn't realize there aren't many free articles on this subject.   A Book:  3D Animation     You'll want a class like this class KeyFrame {     Vector2 Position;     float Scale;     float Rotation;     float StartTime; };   // Store all of your key frames into a list List< KeyFrame > frames;   // To create the key frames, I suggest making a button to push to set the key frame // You will have to set the time in which each frame starts // first frame starts at 0 seconds, second frame may start at .5 seconds, the 3rd one at .65 seconds, 4th at 1 second... etc   // or you can set it up so that you can just set the very last key frame to the length of the animation and average out the rest of the key frames times from that   // Actually playing this animation you will have to store the total time elapsed in this animation, along with the current index.   class Animation {     float fTimeElapsed;     int CurrentIndex;     List< KeyFrame > frames; };     // You'll want to interpolate between frames to get that smooth looking animation  
  4. Having a level editor will make the creation of your levels go MUCH faster.  It will save you a lot of time to go out of the way to create the editor.  Making a 2D editor should take you no time at all. ( Assuming you're using C# Windows Forms for it )
  5. There used to be an awesome guide to creating a text RPG called wrath lands that I was going to post here.  It brought everything in perspective of how you can use C++ for game programming for me.  But unfortunately it isn't there anymore :(   As it's already been said before create some simple little things.   A guessing game where you guess a number between 1-100, have a difficulty setting, easy you get 7 tries, medium you get 5 tries, hard you get 3 tries.   Try to create a text RPG, you don't have to make the full game.  But get it so that you have a battle system that works, and you can travel from town to town. Level up you skills.   Just search google for ideas to apply your skills to and learn.   Even to this date I still go to Project Euler to challenge myself.  It has a ton of logic problems and math problems to solve by programming.  And they're made so that you can't just come up with the answer in your head.
  6. XMMatrixLookAtLH()   The second parameter is the "Focus Position" not the direction.  So for that parameter you might want to add the direction vector to the position vector. // This would be the correct way to do it XMMatrixLookAt(  eyePosition, eyePosition + direction, upDirection );     EDIT: I just realized you used "LookTo" not "LookAt". so my post probably isn't helpful.   is your forward vector valid when you get to the look at function?
  7. Learn a little about AABB to Ray intersect instead of just copying the code.  It's not that difficult if you know vector math.  But there are other guides to help you.   Another topic about AABB to Line Segment ( has Ray to AABB code ) Video Explaining Ray to AABB ( No code, just the math side ) A little guide to creating Ray to AABB Checks ( Has code, gives a little bit of explanation for it too )   EDIT: After you complete that, I would look into using OBB's instead of AABB's if your cube is going to be changing orientation.
  8. PROBLEM SOLVED   My graphics card doesn't support version 3.0 pixel shaders, had to use version 2.0.  I was looking up reasons why ID3DXEffect::ValidateTechnique() would fail and found a topic on here that led me to test the version I'm using.  3.0 works with the vertex shader however... I guess I better put it down to 2.0 just to be safe, just have to be careful with how many calculations I perform.   Before I made this topic I thought about changing those down to 2.0 to see if it worked... I should have done it, but I assumed this computer was new enough to be aware of version 3.0, assumptions can cause problems.  Lesson learned.
  9. OK So trying to set the Technique gives me D3DERR_INVALIDCALL.   I can't find anything helpful on google, but I'm continuing to look.  Also, it keeps crashing in PIX when creating the ID3DXEffect.  Looking into that as well. // Returns D3DERR_INVALIDCALL HRESULT hr = pShader->SetTechnique( "Tech" ); HRESULT hr = pShader->SetTechnique( pShader->GetCurrentTechnique() );   D3DXTECHNIQUE_DESC desc; pShader->GetTechniqueDesc( pShader->GetCurrentTechnique(),&desc );   // 'desc' output is // desc.name = "Tech" // desc.passes = 1 // desc.annotations = 0   // Again here's the shader code // SimpleShader.fx float4x4 gWorld : WORLD; float4x4 viewProj : VIEWPROJECTION;   float4 gColor; float3 gLightPos = float3( 6,4,-5 );   struct VS_IN {     float4 pos : POSITION;     float3 norm : NORMAL; }; struct VS_OUT {     float4 pos : POSITION;     //float4 color : COLOR; };   VS_OUT vs( VS_IN input ) {     // Positions     float3 world = mul( float4( input.pos.xyz,1 ), gWorld ).xyz;     float4 pos = mul( float4( world,1 ),viewProj );       // Normals     float3 norm = normalize( mul( float4( input.norm,0 ), gWorld ).xyz );     float3 ldir = normalize( gLightPos - world );       // Amount of light hitting the obj     float scale = saturate( dot( ldir,norm ) );       // Save     VS_OUT output;     output.pos = pos;     //output.color = float4( gColor.rgb * scale,gColor.a  );       return output; }   float4 ps( VS_OUT input ) : COLOR {     return float4( 0,1,0,1 ); }   technique Tech {     pass pass1     {         VertexShader = compile vs_3_0 vs();         PixelShader  = compile ps_3_0 ps();           CullMode = CCW;         //FillMode = Solid;     } }
  10. Please don't be condescending, I'm trying to get help.  I never post all of my code at once, I try to keep the problem as simple as I possibly can so I can get as much help as possible.  Nobody likes to look at a HUGE wall of code to help with what might simply be a typo when rendering or making the shader =).   PIX hasn't been working well for me,  whether I have the Direct X debugging tools turned on or not.  It becomes an annoyance to mess with and get it to work correctly, which is why I've gotten lazy with using PIX lately. I'm trying again though, will reply with my result.
  11. That didn't change anything, it still returns only white.  I've updated the shader since I first posted it so I'll just re-post it here, but I highly doubt the shader is the problem. float4x4 gWorld : WORLD; float4x4 viewProj : VIEWPROJECTION;   float4 gColor; float3 gLightPos = float3( 6,4,-5 );   struct VS_IN {     float4 pos : POSITION;     float3 norm : NORMAL; }; struct VS_OUT {     float4 pos : POSITION;     //float4 color : COLOR; };   VS_OUT vs( VS_IN input ) {     // Positions     float3 world = mul( float4( input.pos.xyz,1 ), gWorld ).xyz;     float4 pos = mul( float4( world,1 ),viewProj );       // Normals     float3 norm = normalize( mul( float4( input.norm,0 ), gWorld ).xyz );     float3 ldir = normalize( gLightPos - world );       // Amount of light hitting the vertex     float scale = saturate( dot( ldir,norm ) );       // Save     VS_OUT output;     output.pos = pos;     //output.color = float4( gColor.rgb * scale,gColor.a  );       return output; }   float4 ps( VS_OUT input ) : COLOR { /*     float3 ldir = normalize( gLightPos - input.world );     float3 norm = normalize( input.norm );       float scale = saturate( dot( ldir,norm ) );       input.color.xyz *= scale;     return float4( input.color.xyz,intput.a ); */     return float4( 0,1,0,1 ); }   technique Tech {     pass pass1     {         vertexShader = compile vs_3_0 vs();         pixelShader  = compile ps_3_0 ps();           CullMode = CCW;         //FillMode = Solid;     } } Here is the result           EDIT: static volatile const unsigned long long var[5];   // ^^ WIN!! Got bored lol
  12. A* can be complicated for beginners.  But it's the most widely accepted algorithm, and after you get the Breadth First Search complete the rest should be a piece of cake ;)
  13.   Buckeye wasn't just talking about the debug tool, he was talking about debugging.  The debug tool is a Tool to help you debug, you don't always need it to debug.     EDIT:  Said debug too many times, now it has no meaning lol.
  14. Not an expert on this or anything, but no one else has replied so I will put in my opinion =P     From what your saying it seems like I would personally do something like casting a ray from the camera and get the point of collision on the terrain from that ray.  Then create a vertical cylinder, rectangle, or whatever the shape will represent your brush the best, then test that geometric shape against the terrain to find all of the tiles that are either inside or colliding with the shape.   Hope this helps!