Jump to content
  • Advertisement

cNoob

Member
  • Content count

    614
  • Joined

  • Last visited

Community Reputation

295 Neutral

About cNoob

  • Rank
    Advanced Member
  1. Aswell as irrlicht you might want to look at Ogre, theres plenty of third party tools for converting blender data (meshes, materials, animations etc...) for use with Ogre.
  2. cNoob

    Hack n Slash Diablo like creator?

    Torchlight allows mods such as new characters, classes, quests, level editing etc. Scheduled to be released this month, you may want to take a look at that :)
  3. cNoob

    Another LazyFoo Tutorial Q

    You can draw rectangles using the SDL_FillRect function. Look at how the white background was filled, the first parameter is the destination surface, the second parameter is the rectangle area to fill and the last parameter being the colour. //To draw a red rectangle 50 pixels wide/tall at x:20,y:30 SDL_Rect pos = {20, 20, 50, 50}; // left. top, right, bottom SDL_FillRect(screen, &pos, 0xFF0000);
  4. cNoob

    snake

    I would just reposition the last piece of the snake (tail) with the next position of the snakes head which would depend on the direction of the snake. Either that, or you could loop through each piece and set its position to that of the piece infront.
  5. cNoob

    Flight/Driving

    I would assume the vehicle/aircraft would have all it's forces applied to it which would result in a new position and orientation, then you would update your camera to make up for these changes (place the camera behind, apply any camera damping etc...).
  6. I'm not really sure on any methods but if you were to fire a ray from the center of the vehicle, what would happen when traveling on a non-flat surface? It may be better to cast a ray from each wheel and adjust the orientation of the car using the result of all the rays casted. Depending on how you want the car to handle (sim/arcade), you may want to plugin a physics engine and create the car from multiple rigid bodys connected with joints and let the physics engine handle the collision response with the track geometry?
  7. I recompiled the test project with no changes and it displayed the image (after i added one to the projects directory). Without the image in the directory I get a plain window, are you sure your images are in the right place and are being loaded?
  8. cNoob

    Fighting Game Basics

    You seem to have the lot covered, although how could you forget finishing moves :P
  9. cNoob

    drawing cones

    Quote:Original post by godsenddeath look around for teh old andy pike tutorials, he covers how to do this, i found a zip file containing his tutorials a couple weeks ago, although i forget where. Here perhaps?
  10. Original post by openglJunkie void render() { glClear(GL_COLOR_BUFFER_BITS|GL_DEPTH_BUFFER_BITS); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); /* This might be how you've seen your display or render function start out, but can you tell what's wrong here and tell what would happen if you started to draw stuff? Yes, because you called glLoadIdentity() on the MODELVIEW matrix the transformations you applied from the above code samples were cleared!!! Now your objects want get smaller as they move away in the zaxis and your Camera is reset to its default position so you may not see your objects. What you do after here is entirely up to you. You can put the Orthographic and Perspective code from above right here or you could put them in a function and call them, which might be a wise idea, but you have to be careful of what you put in there. */ } [/quote] I allways thought transformation calls only affect the current matrix? So the projection matrix would be left untouched as the current matrix has changed before calling glLoadIdentity? glMatrixMode(GL_PROJECTION); // setup projection matrix glMatrixMode(GL_MODELVIEW); // setup model view matrix I may be wrong however, I've only just picked up the OpenGL Super Bible so I'm still new to the OpenGL API.
  11. cNoob

    Obama Next President of the United States

    Quote:Original post by curtmax_0 But how much are you people in non-3rd world countries really affected by the US? Well, our troops are out there fighting with the US. So I'm glad Obama won, he can bring our friends and relatives back home in one piece :)
  12. cNoob

    OpenGL not rendering

    Well, now that you mentioned a beer :P A few things that spring to mind, you enable the depth buffer but your not clearing it when rendering the scene: glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); Your not specifying any vertex normals when rendering your triangle so lighting may be the issue, disable lighting before rendering the scene: glDisable(GL_LIGHTING); Your also setting your vertex positions at 0.0 on the z-axis when using glVertex2f but your not translating them so the camera will be at the same position on the z-axis. Try translating the vertices: glPushMatrix(); glTranslate(0.0f, 0.0f, -20.0f); glBegin(GL_TRIANGLES); glColor3f(1.0,0.0,0.0); glVertex2f(5.0,5.0); glColor3f(0.0,1.0,0.0); glVertex2f(25.0,5.0); glColor3f(0.0,0.0,1.0); glVertex2f(5.0,25.0); glEnd(); glPopMatrix();
  13. cNoob

    I want a phone I can code on..

    Quote:Original post by gavco98 if you jailbreak an iPhone you can install a terminal shell, vi and gcc. That would allow you to code on your phone. I have installed it on mine but have yet to actually use it. I've used vi and nano on the iPhone aswell as gcc to compile. Compiling times are surprisingly fast but I guess it makes up for the time lost trying to code anything useful with the onscreen keyboard (not recomended :P)
  14. cNoob

    OpenGL Rotation Origin Problems

    Woops, thats what I get for having two solutions with the same name (different locations ><), I've fixed the old code block in the previous post with the correct version. // Also, you can post an image using the <b>img</b> html tag: <img src="http://link.to.image/screenshot.png"> // and you can post code in a neat block using: (without spaces) [ source ]code goes here[ /source ] :)
  15. cNoob

    OpenGL Rotation Origin Problems

    May I suggest you pass the origin as a parameter to your blitting function, that way you won't allways be limited to having the origin at the center. All you would need to do then is subtract the origin position from the sprites position. Heres my simple sprite drawing function which is working perfectly fine for my current project. ///////////////////////////////////////////////////////////////////////////////////////// // DrawSprite() ///////////////////////////////////////////////////////////////////////////////////////// void DrawSprite(Texture texture, Vector2 position, Rect source, Colour tint, Vector2 origin, float angle) { glPushMatrix(); glLoadIdentity(); glTranslatef(position.X, position.Y, 0.0f); glRotatef(angle, 0.0f, 0.0f, 1.0f); glBindTexture(GL_TEXTURE_2D, texture.TextureID()); glBegin(GL_QUADS); glColor3f(tint.r, tint.g, tint.b); glTexCoord2f((float)source.X / texture.Width(), (float)source.Y / texture.Height()); glVertex2f(-origin.X, -origin.Y); glTexCoord2f((float)(source.X+source.Width)/texture.Width(), (float)source.Y/texture.Height()); glVertex2f(-origin.X+(float)source.Width, -origin.Y); glTexCoord2f((float)(source.X+source.Width)/texture.Width(), (float)(source.Y+source.Height)/texture.Height()); glVertex2f(-origin.X+(float)source.Width, -origin.Y+(float)source.Height); glTexCoord2f((float)source.X / texture.Width(), (float)(source.Y+source.Height)/texture.Height()); glVertex2f(-origin.X, -origin.Y+(float)source.Height); glEnd(); glBindTexture(GL_TEXTURE_2D, NULL); glPopMatrix(); } EDIT: Added correct function ^^ [Edited by - cNoob on September 16, 2008 5:06:17 PM]
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!