• 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

388 Neutral

About doctorsixstring

  • Rank
    Advanced Member
  1. The article looks to be about three years old, based on the first comment in the associated thread. I just did some research on rendering heightmaps with multitexturing and shaders, and it seems promising. However, wouldn't multitexturing limit me to a small (4-8) number of terrain types? I suppose that many terrain types would be pushing it for a heightmap, anyways. For curiosity's sake, is there any solution to the original question?
  2. This image is of three separate, overlapping triangles where each triangle has a single vertex with alpha 1.0 (the other two verts are alpha 0.0). When rendered together, the accumulated alpha at the center of the final triangle is less than 1.0 (it seems to be closer to 0.7). I expected the triangle to be 100% white (i.e. the sum of the alpha for each pixel from the three triangles is 1.0). What can I do to achieve this effect? Is it possible to adjust the color interpolation equation? FYI, I'm trying to develop an alternative solution to the "dark center of triangles" problem described in this height map rendering article.
  3. Wow, you learn something every day. Hollower's comments make more sense now. I'll keep that in mind, since I want to support Mac with my Python game development, which has so far been limited to Windows and Linux.
  4. The simplest solution is to just store your art in the same directory as your py script, and use a relative path to load it.
  5. OpenGL

    OpenGL is only a graphics library. It won't help you with physics (gravity) or collision detection with walls and other entities in your game world. Look for some decent articles or libraries under those topics.
  6. OpenGL

    Quote:Original post by Yann L Keep in mind that uniforms declared without being actively used by the shader will be optimized away by the GLSL compiler. That makes perfect sense, and I immediately noticed the problem after reading this. If you look closely at the code in my original post, you'll notice that I was simply setting gl_FragColor = sample[1]. A multi-line comment was started (but not ended) after that, so the tc_offset usage was optimized away. I just changed it to the following code, and glGetUniformLocation returns 1 for the variable, and glGetProgramiv with GL_ACTIVE_UNIFORMS returns 2. gl_FragColor = (sample[0] + (2.0*sample[1]) + sample[2] + (2.0*sample[3]) + sample[4] + (2.0*sample[5]) + sample[6] + (2.0*sample[7]) + sample[8]) / 13.0; Thanks!
  7. OpenGL

    That makes sense. I did some reading on glGetUniform, and it looks like I first need to query the location of a uniform variable with glGetUniformLocation() before setting it with glUniform(). If that's the case, then I'm not sure what I'm doing wrong. Calling glGetUniformLocation for the tc_offset variable returns -1. Calling it for sampler0 returns 0, so that seems to indicate a problem with tc_offset. I also tried creating other variables (e.g. "uniform int a;"), but -1 was returned for those, too. I also noticed that calling glGetProgramiv with GL_ACTIVE_UNIFORMS returned 1, regardless of how many uniform variables I declared. Here's a code snippet. I'm using Python, but the GL calls should be clear regardless: self.program = glCreateProgram() glAttachShader(self.program, fragmentShader) glLinkProgram(self.program) glValidateProgram(self.program) print glGetUniformLocation( self.program, "sampler0" ) # returns 0 print glGetUniformLocation( self.program, "tc_offset" ) # returns -1 That code is executed after creating and compiling the shader (stored in the fragmentShader variable).
  8. I'm trying to implement the blur fragment shader from the OpenGL Superbible, but I'm confused as to where the tc_offset variable is being set. Here's the code: uniform sampler2D sampler0; uniform vec2 tc_offset[9]; void main(void) { vec4 sample[9]; for( int i = 0; i < 9; i++ ) { sample[i] = texture2D( sampler0, gl_TexCoord[0].st + tc_offset[i] ); } // 1 2 1 // 2 1 2 / 13 // 1 2 1 gl_FragColor = sample[1];/*(sample[0] + (2.0*sample[1]) + sample[2] + (2.0*sample[3]) + sample[4] + (2.0*sample[5]) + sample[6] + (2.0*sample[7]) + sample[8]) / 13.0; } Is tc_offset automatically set to the texture coordinates of the neighboring texels, like sampler0 is automatically set to the first texture unit?
  9. Python does have type safety. It does type-checking at runtime, rather than compile time. In other words, its type-checking is dynamic, rather than static. Also, Python is not a new language by any stretch. The version appeared in '91. It is very robust and has a huge community behind it. As for the OP, I agree with the earlier recommendations for C# w/ XNA or Python w/ Pygame (or Pyglet). I use Python for my gamedev, and C# at work.
  10. An Alternative View of "Hit Points"
  11. Quote:Original post by lostzac ...I just think no matter what level you are you get whacked on a few times with a sword you should feel it or be going down...it lacks a certain realism. I remember hearing somewhere about hit points representing both physical health and a character's ability to avoid being hit. You could say that a player with 100 hit points could still be killed by a single sword strike, but he is five times better at dodging than a character with 20 hit points. You could probably come up with other reasons to suit your game.
  12. Check out the pickle module for serializing objects into strings that can be read from and written to files. There is even an example showing how to write a serialized object to a file.
  13. Thanks for the replies, guys. I'll go ahead and start working on using fixed-length time steps, and running one or more updates per frame, depending on frame length. I'll apply gravity, ship thrust, and other external forces as a summed acceleration vector at the start of each frame. Since we've established that it would be extremely difficult to create a single formula, I won't be able to use it to solve for vehicle thrust with a desired final position. So in order to calculate power and angle of launched missiles, it sounds like I'll need to use brute force to calculate a solution. I will calculate each frame's update logic ahead of time and see where the missile will end up. If it misses, I'll keep re-running the trajectory calculation for a slightly changed power/angle until the missile hits. This seems pretty computationally expensive, but I don't see any other way.
  14. Given the motion equation (d = v*t + 0.5*a*t2), I can find a vehicle's position after a given passage of time with a given starting velocity and constant acceleration. Solving this equation for two dimension allows me to calculate spaceship movement in a Gravity Wars-style game. That same formula can also be used by missiles that the ships will shoot at each other. Now I want to throw in some gravity wells (planets, black holes, etc.). How can I calculate the final position of a missile or ship at a given time, with an initial velocity, acceleration, and one or more sources of gravity? Is there a formula for calculating the trajectory of a vehicle with those parameters? I know I could simply apply gravity to the ship's position each game tick, but that would yield different results depending on the length of each tick. I would really like a solution that yields identical results regardless of the change in time. Any thoughts? - Mike
  15. Quote:Original post by Lezbein Can anyone elaborate on this idea any more? Explaining a direct example,like how would the program calculate a mountain from a far then near? Or how would a seem less entry from space into the planet's atmosphere -through the clouds then to the the ground- all work? Check out fractals and Perlin noise. Fractal Fractal Landscape Perlin Noise