• 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.

CmasterG

Members
  • Content count

    9
  • Joined

  • Last visited

Community Reputation

120 Neutral

About CmasterG

  • Rank
    Newbie
  1. Hi! I mean zooming. I already have the corner points from my rectangle, and now I want to zoom in. The rectangle can be everywhere on the screen and I use perspective projection. Can you give me a link for the formulas ? I don't know how to calculate it. Thanks :)
  2. Hi! After my fit to screen question I have the next problem. Now I want to box select a section of my screen and then zoom in that selection. So I have four corner points (my rectangle which I can drag with the mouse) in pixel coordinates. I have a perspective projection. Can anyone help me with this? I have no idea how to do that. I guess that I have to calculate maybe a view frustum for my section?   Respectfully,                    CmasterG
  3. Hi. Thanks it works now :)
  4. HI! What I want is that the model (bridge) will fit to screen. So when I am too close with my camera I want that it zoom out so that the model fits to screen, and when my camera is too far away, I want that it zooms in so that the model fits to screen. I want sort of a focus function like when you press in Autodesk Maya the "F" Key, but with the difference that it should zoom in or out in the direction of the looking vector. Do you know what I mean?  For the position of the camera I use sphere coordinates instead of cartesian coordinates. So  I have two angles and a length. For zooming I only have to change my length to the object. What I did with the code was the following: I take my corner points of the model (bounding box) and transformed them from world coordinates in screen coordinates by multiplying the coordinates of the corner points with my world matrix, view matrix and projection matrix. Then I took the ratio between the size of the whole screen (screen_width, screen_height) and the size of the rectangle which is formed by the bridge on the screen ( height = max_y - min_y of the bridge in screen coordinates, width = max_x - min_x) and then I multiplied my camera length by this ratio. The result is that it is jumping back and forth when pressing the key for the fit to screen function. BTW: the bridge is always in the center of my "world". Do you have an idea why it is not working correct?
  5. Hi! I have the following problem. I want to zoom to my object. I have the camera in sphere coordinates. So the camera position has 2 angles and a length. For zooming I want to change the length of the camera, so that the object has the maximal expansion on the screen. The object is a bridge. So it has 8 corner points, which I transformed into screen space. This is what I tried to get the length, but it is not working correct. Can anyone help me? Can anyone see the problem: float xmin, xmax, ymin, ymax, zmin, zmax; xmin = - m_width / 2; xmax = m_width / 2; ymin = -(m_height * scale_factor - m_height/2); ymax = m_height /2; zmin = -m_length / 2; zmax = m_length / 2; std::vector<D3DXVECTOR4> points; D3DXVECTOR4 point; point = D3DXVECTOR4(xmin, ymin, zmin,1.0f); points.push_back(point); point = D3DXVECTOR4(xmin, ymin, zmax, 1.0f); points.push_back(point); point = D3DXVECTOR4(xmin, ymax, zmax,1.0f); points.push_back(point); point = D3DXVECTOR4(xmin, ymax, zmin,1.0f); points.push_back(point); point = D3DXVECTOR4(xmax, ymin, zmin, 1.0f); points.push_back(point); point = D3DXVECTOR4(xmax, ymin, zmax, 1.0f); points.push_back(point); point = D3DXVECTOR4(xmax, ymax, zmax, 1.0f); points.push_back(point); point = D3DXVECTOR4(xmax, ymax, zmin,1.0f); points.push_back(point); D3DXMATRIX worldMatrix, projectionMatrix, viewMatrix; m_Begrenzung->GetWorldMatrix(worldMatrix); m_D3D->GetProjectionMatrix(projectionMatrix); m_Camera->GetViewMatrix(viewMatrix); for(int i = 0; i < points.size(); i++) { D3DXVec4Transform(&points.at(i), &points.at(i), &worldMatrix); D3DXVec4Transform(&points.at(i), &points.at(i), &viewMatrix); D3DXVec4Transform(&points.at(i), &points.at(i), &projectionMatrix); points.at(i).x = points.at(i).x / points.at(i).w; points.at(i).y = points.at(i).y / points.at(i).w; points.at(i).z = points.at(i).z / points.at(i).w; points.at(i).w = 1.0f; } xmin = xmax = points.at(0).x; ymin = ymax = points.at(0).y; for(int i = 1; i < points.size(); i++) { if(points.at(i).x < xmin) xmin = points.at(i).x; if(points.at(i).x > xmax) xmax = points.at(i).x; if(points.at(i).y < ymin) ymin = points.at(i).y; if(points.at(i).y > ymax) ymax = points.at(i).y; } float width, height, scale, length; if(abs(xmax) > abs(xmin)) width = abs(xmax); else width = abs(xmin); if(abs(ymax) > abs(ymin)) height = abs(ymax); else height = abs(ymin); if(width > height) scale = 1/width; else scale = 1 / height; length = m_Camera->getLength(); m_Camera->setLength(length / scale);
  6. I think it is a good idea to make tutorials for OpenGL or DirectX. Have a look at rastertek.com or http://www.opengl-tutorial.org/ It is good to know this low level things, because then you can work with every engine you want to.   Unity is very simple. It depends on what do you want to make. If you want to make a game just for fun than take Unity. You can make great games with it, but when you want to become a game programmer than learn OpenGL or DirectX.
  7. Hi! I am the same opinion. At university I started with C, then with Assembly, then Java.  C++ and C# I have learned on my own. It was really easy when knowing C. So I think it is good to know a low level language, because it is very easy then to learn higher level languages. Now I can also Python, which I have also learned on my own.
  8. Hi! I have the following problem. I want to zoom to my object. I have the camera in sphere coordinates. So the camera position has 2 angles and a length. For zooming I want to change the length of the camera, so that the object has the maximal expansion on the screen. The object is a bridge. So it has 8 corner points, which I transformed into screen space. This is what I tried to get the length, but it is not working correct. Can anyone help me? Can anyone see the problem: float xmin, xmax, ymin, ymax, zmin, zmax; xmin = - m_width / 2; xmax = m_width / 2; ymin = -(m_height * scale_factor - m_height/2); ymax = m_height /2; zmin = -m_length / 2; zmax = m_length / 2; std::vector<D3DXVECTOR4> points; D3DXVECTOR4 point; point = D3DXVECTOR4(xmin, ymin, zmin,1.0f); points.push_back(point); point = D3DXVECTOR4(xmin, ymin, zmax, 1.0f); points.push_back(point); point = D3DXVECTOR4(xmin, ymax, zmax,1.0f); points.push_back(point); point = D3DXVECTOR4(xmin, ymax, zmin,1.0f); points.push_back(point); point = D3DXVECTOR4(xmax, ymin, zmin, 1.0f); points.push_back(point); point = D3DXVECTOR4(xmax, ymin, zmax, 1.0f); points.push_back(point); point = D3DXVECTOR4(xmax, ymax, zmax, 1.0f); points.push_back(point); point = D3DXVECTOR4(xmax, ymax, zmin,1.0f); points.push_back(point); D3DXMATRIX worldMatrix, projectionMatrix, viewMatrix; m_Begrenzung->GetWorldMatrix(worldMatrix); m_D3D->GetProjectionMatrix(projectionMatrix); m_Camera->GetViewMatrix(viewMatrix); for(int i = 0; i < points.size(); i++) { D3DXVec4Transform(&points.at(i), &points.at(i), &worldMatrix); D3DXVec4Transform(&points.at(i), &points.at(i), &viewMatrix); D3DXVec4Transform(&points.at(i), &points.at(i), &projectionMatrix); points.at(i).x = points.at(i).x / points.at(i).w; points.at(i).y = points.at(i).y / points.at(i).w; points.at(i).z = points.at(i).z / points.at(i).w; points.at(i).w = 1.0f; } xmin = xmax = points.at(0).x; ymin = ymax = points.at(0).y; for(int i = 1; i < points.size(); i++) { if(points.at(i).x < xmin) xmin = points.at(i).x; if(points.at(i).x > xmax) xmax = points.at(i).x; if(points.at(i).y < ymin) ymin = points.at(i).y; if(points.at(i).y > ymax) ymax = points.at(i).y; } float width, height, scale, length; if(abs(xmax) > abs(xmin)) width = abs(xmax); else width = abs(xmin); if(abs(ymax) > abs(ymin)) height = abs(ymax); else height = abs(ymin); if(width > height) scale = 1/width; else scale = 1 / height; length = m_Camera->getLength(); m_Camera->setLength(length / scale);
  9. Hi!   I have the following problem. I have an object, which I have to blur and this object is in sort of a box, but only in the edges of this box (box is an open box). To blur the object, I render it in a texture -> then in the next step I downscale this texture -> then I blur it vertically and back to a texture -> then I blur this texture horizontal -> then I scale the texture up and render it to the screen   To draw also the box object, I render this object to another texture but only with lighting and then I draw this with additive blending on the screen.   The problem is that the blurred object is now transparent, and I have lost my depth values. So I have the choice if the box object is rendered over the blurred object or the other way round. But I want that the blurred object is inside the box object.   How can I make this the right way. I guess it is impossible the way I do that. Has anyone an idea?   I am using C++ with DirectX 11.   Respectfully,                 CmasterG