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


  • Content count

  • Joined

  • Last visited

Community Reputation

119 Neutral

About SetsudanHana

  • Rank
  1. The way i'm doing lookat for my camera: void Camera::update() { double sinAlfa = glm::sin(m_alfa * DAG2RAD); double sinBeta = glm::sin(m_beta * DAG2RAD); double cosAlfa = glm::cos(m_alfa * DAG2RAD); double cosBeta = glm::cos(m_beta * DAG2RAD); m_viewMatrix = glm::lookAt( m_position, glm::vec3(m_position.x + sinAlfa*cosBeta, m_position.y - sinBeta, m_position.z - cosAlfa*cosBeta), glm::vec3(0.0f, 1.0f, 0.0f)); } just counting sin and cos function for each of angles of your camera, and with little math you can count point your camera is looking at. DAG2RAD is just pi/180 to convert my angle to radiants. I dont know if it solves your problem, but i hope it will help.
  2. OpenGL

    Sry i didnt answer, timezone...   But what about texture initializing, i did everything according to the tutorial and there was no line about setting any TexParameter. I checked out values in CodeX and you may be right about this filtering, i will try to save those textures as an image from my code and check results there.   And yeah i will have to think about optimalization, but now it is my least problem.
  3. So i'm trying to implement deffered rendering in my first "graphic engine" using this tutorial: http://ogldev.atspace.co.uk/www/tutorial35/tutorial35.html . And got some issues with drawing my position and normal to the texture. I think i'm sending everything alright, cause before it worked normally with forward rendering. This is how it looks. Position: Normal:   Texture coords, diffuse and depth buffer are looking fine.   Here are my shaders for model geometry (for terrain it is similar, just with additional calculation)   VS: #version 400 layout(location = 1) in vec3 vertex_position; layout(location = 2) in vec2 vertex_texture; layout(location = 3) in vec3 vertex_normals; uniform mat4 pvw_matrix; uniform mat4 world; layout(location = 0) out vec2 texture_coords; layout(location = 1) out vec3 normals; layout(location = 2) out vec3 world_pos; void main() { vec4 tmp = (world * vec4(vertex_normals, 0.0)); normals = tmp.xyz; tmp = (world * vec4(vertex_position, 1.0)); world_pos = tmp.xyz; texture_coords = vertex_texture; gl_Position = pvw_matrix * vec4( vertex_position, 1.0 ); } FS: #version 400 layout(location = 0) in vec2 TexCoord; layout(location = 1) in vec3 Normal; layout(location = 2) in vec3 WorldPos; layout (location = 0) out vec3 WorldPosOut; layout (location = 1) out vec3 DiffuseOut; layout (location = 2) out vec3 NormalOut; layout (location = 3) out vec3 TexCoordOut; uniform sampler2D sampler; void main() { vec4 texel = texture(sampler, TexCoord); WorldPosOut = WorldPos; DiffuseOut = texel.xyz; NormalOut = normalize(Normal); TexCoordOut = vec3(TexCoord, 0.0); } Thanks for any clues, that will help me solve this riddle. I will paste more code if necessary. Link to my repo is here: https://github.com/SetsudanHana/Tsukuyomi---OpenGL-engine  
  4. it works, i knew that it is something so simple... I'm just dumb
  5. loadTextFile function: std::string ResourceManager::loadTextFile(const std::string& path) { std::ifstream file(path); if(!file.good()) { OutputDebugStringA("File not found"); return nullptr; } std::stringstream stream ; stream << file.rdbuf(); file.close(); return stream.str(); } i cant use cout, becuase i dont have console, but OutputDebugStringA on each of them gives this:     last line dont have '\n', thats why they looked merged   EDIT:   changing to multibyte, didnt do anything
  6. Yeah, it is faster to ask on few sites.   Yes, i found this suggestion on stackoverflow, but it changed nothing
  7. @mhagain   yes it is set up to unicode   @Ectara   i added '\0' by myself, and now it throws this one:       EDIT:   i changed every 1.0 to 1.0f in my shaders, and i'm back to my previous error
  8. length() function is giving me valid value so i do think, they do have null terminator
  9. i'm getting those errors while compiling shaders, this is code from my ShaderLoadingClass: ResourceManager manager; std::string container = "Just simple container"; container = manager.loadTextFile(file + ".vs"); const char* vertex_shader = container.c_str(); container = manager.loadTextFile(file + ".fs"); const char* fragment_shader = container.c_str(); unsigned int vs = glCreateShader (GL_VERTEX_SHADER); glShaderSource (vs, 1, &vertex_shader, NULL); glCompileShader (vs); unsigned int fs = glCreateShader (GL_FRAGMENT_SHADER); glShaderSource (fs, 1, &fragment_shader, NULL); glCompileShader (fs); checkErrors(vs); checkErrors(fs); unsigned int shader_programme = glCreateProgram (); glAttachShader (shader_programme, fs); glAttachShader (shader_programme, vs); glLinkProgram (shader_programme); return new ShaderClass(shader_programme);
  10. Ok, so i'm starting my adventure with openGL 4 and shaders. And i occured weird syntax error while compiling vertext shader. Even when i take simple vertex shader: #version 400 in vec3 vector_position; void main() { gl_Position = vec4(vector_position, 1.0); } i do get this error:       What is weird about this, my fragment shader is compiling without errors: #version 400 out vec4 color; void main() { color = vec4(1.0, 0.0, 0.0, 1.0); } and gives this message:       I tried testing those shaders by putting them as const char* in code, and they work fine. To make it easier here are some additional informations:   using SDL 2.0 initializing OpenGL by SDL2.0 using GLEW to load extensions reading text files by this function: std::ifstream file(path); if(!file.good()) { OutputDebugStringA("File not found"); return nullptr; } std::stringstream stream ; stream << file.rdbuf(); file.close(); return stream.str(); Thank you for fast answer.