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

raphaelvanier@videotron.ca

Members
  • Content count

    18
  • Joined

  • Last visited

Community Reputation

104 Neutral

About raphaelvanier@videotron.ca

  • Rank
    Member
  1. Ok thanks, I`ll start looking into shaders.
  2. My original intent was to make a class to make some cool post-render effects. After everything is drawn, apply some modifiers to the pixels on the buffer. Like some fade out to black between screen transition... Or maybe some blur effects applied on the render directly when the character is dizzy. So glRead and glDraw too slow? Better use some quads with alpha to make the special effects? Is this possible any other way? Thanks
  3. Hello there, I am trying to do some post rendering effect like a color shift to red when the character dies, or maybe a shift to black to make it darker. Here's the piece of code I have cooked up: ---- float normalColor[3] = { float(colorToShift.Get().r.Get()) / 0xFF, float(colorToShift.Get().g.Get()) / 0xFF, float(colorToShift.Get().b.Get()) / 0xFF }; GLfloat *data = ((GLfloat *)malloc(3 * screenWidth.Get() * screenHeight.Get() * sizeof(GLfloat))); if( data ) { glReadPixels(0, 0, screenWidth.Get(), screenHeight.Get(), GL_RGB, GL_FLOAT, data); } else { return; } for( int i = 0; i < screenWidth.Get() * screenHeight.Get() * 3; i += 3 ) { GLfloat *dataR = data + i + 0; GLfloat *dataG = data + i + 1; GLfloat *dataB = data + i + 2; *dataR = min( 1.0, max( 0.0, *dataR + ( normalColor[0] - *dataR ) * degree.Get())); *dataG = min( 1.0, max( 0.0, *dataG + ( normalColor[1] - *dataG ) * degree.Get())); *dataB = min( 1.0, max( 0.0, *dataB + ( normalColor[2] - *dataB ) * degree.Get())); } glDrawPixels(screenWidth.Get(), screenHeight.Get(), GL_RGB, GL_FLOAT, data); ------ The program has read the pixel fine with glReadPixel, the pixel processing is working, but glDrawPixel is not doing anything. I basically want to rewrite the pixels I see on the screen. What am I doing wrong?? thanks
  4. Okay, I have solved the transparency problem myself. Otherwise, the text look all choppy and pixelized. Any way to fix this?
  5. I second that, PC is easiest. If you're programming with C#, go with SharpGL: http://sharpgl.codeplex.com/
  6. Why not use the alpha of each image you put out on the screen as an alpha map? Alternatively, you could set up an alpha map as a separate black & white image or a circuit path on your image (a bunch of 2D triangle to test out. As for avoiding tiles, Putting some images together of what you want to show, texture them on quads, putting the quad at Z = 0.0 with not rotation in ortographic projection (a 2D setting and that should work. I prepare my 2D like this: int Gui2D_Manager::Prepare2D() { glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(0.0f, GameWindow::Inst()->getScreenWidth(), GameWindow::Inst()->getScreenHeight(), 0.0f); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glTranslatef(0.375, 0.375, 0.0); glDisable(GL_DEPTH_TEST); glDisable(GL_LIGHTING); return TRUE; } I put an image like this: glPushMatrix(); applyTransfo(); srcImg->Bind(); glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); glColor4f (1,1,1, alpha); glBegin(GL_QUADS); //Draw our four points, clockwise. glTexCoord2f(0, 0); glVertex3f(0.0f, height, 0); glTexCoord2f(1, 0); glVertex3f(width, height, 0); glTexCoord2f(1, 1); glVertex3f(width, 0.0f, 0); glTexCoord2f(0, 1); glVertex3f(0.0f, 0.0f, 0); glEnd(); glColor4f (1,1,1, 1.0f); glPopMatrix(); There's some functions there, but I use a standard transformation 4x4 matrix to do the transformation but never apply transfo on Z. I blend the bitmap the standard way, and it work.
  7. Hi there, I am currently using the font trick from nehe tutorial in my game: http://nehe.gamedev.net/tutorial/bitmap_fonts/17002/ (the tutorial) this is the result in my game: [img]http://www.imagitiel.com/forum/writing1.jpg[/img] First of all, I am applying an alpha of 0.1 to the image and text with the following code: glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); glColor4f (1,1,1, alpha); font->glPrint(text.c_str()); // Print GL Text To The Screen // render the image the same way. glColor4f (1,1,1, 1.0f); 2 problem: - The alpha blending work with the image but not with the text. - The text is choppy and pixelized. I am using "Calibri" height 28, bold. So... My question is, is the a better alternative to writing 2D text on the screen without these 2 problems? Other than putting my font in an image and cutting it out in tiles of course. Thanks.
  8. Ha never mind. If I put the directory in VC++ directory - Library C:\Users\Admin\Documents\Visual Studio 2008\librairies\OpenAL 1.1 SDK\libs\Win32 instead of C:\Users\Admin\Documents\Visual Studio 2008\librairies\OpenAL 1.1 SDK\libs\Win64 It works!
  9. Hi there, I am making my first steps with OpenAL. I get the following error: 1>AudioManager.obj : error LNK2019: unresolved external symbol __imp__alcOpenDevice referenced in function "public: bool __thiscall AudioManager::initializeAudio(void)" (?initializeAudio@AudioManager@@QAE_NXZ) I have only put the following code #include <al.h> #include <alc.h> ..... bool AudioManager::initializeAudio() { ALCdevice *dev; ALCcontext *ctx; struct stat statbuf; // Create the device dev = alcOpenDevice(NULL); /*if(!dev) { return false; } ... return false; } Of course, in my VC++ directory - Library file I have included: C:\Users\Admin\Documents\Visual Studio 2008\librairies\OpenAL 1.1 SDK\libs\Win64 And in my project, I have put in Linker - Input - Additional Dependencies: OpenAL32.lib But it doesn't seem to work. Any help? Thanks
  10. Finally solved it by myself.
  11. Hi there, I am currently following the OpenGL Nehe tutorial: [url="http://nehe.gamedev.net/lesson.asp?index=02"]http://nehe.gamedev....on.asp?index=02[/url] I am at the point where he put texture on his cube. He is using a BMP image. That's all dandy and well, but I really plan to use lossless format with alpha channels like .TGA or .PNG. I have been trying to tweek his code to first add an alpha component to his BMP texture loading. Here is a class I did: [code] #pragma once #ifndef OPENFL_DECL #define OPENFL_DECL #include <windows.h> // Header File For Windows #include <stdio.h> // Header File For Standard Input/Output #include <gl\gl.h> // Header File For The OpenGL32 Library #include <gl\glu.h> // Header File For The GLu32 Library #include <gl\glaux.h> // Header File For The Glaux Library #endif //OPENFL_DECL #include <string> #include <bitset> using namespace std; class Texture { private: GLuint TextureHandle[1]; // Storage For One Texture AUX_RGBImageRec *TextureImage[1]; // Create Storage Space For The Texture int SizeX, SizeY; unsigned char * imageData; public: Texture(void); ~Texture(void); void DeleteAndFree(); bool LoadTexture(char *Filename); // Load texture // for BMPs AUX_RGBImageRec *LoadFromBMP(char *Filename); // Loads A Bitmap Image void TransferAndConvertBMP(); bool PowerOf2Test(); void Bind(); }; [/code] [code] #include "Texture.h" Texture::Texture(void) { } Texture::~Texture(void) { DeleteAndFree(); } void Texture::DeleteAndFree() { if (TextureImage[0]) // If Texture Exists { if (TextureImage[0]->data) // If Texture Image Exists { free(TextureImage[0]->data); // Free The Texture Image Memory } free(TextureImage[0]); // Free The Image Structure } if(imageData) { free(imageData); } } bool Texture::PowerOf2Test() { std::bitset<32> bit_setX(TextureImage[0]->sizeX); std::bitset<32> bit_setY(TextureImage[0]->sizeY); return (bit_setX.count()<2 && bit_setY.count()<2); } bool Texture::LoadTexture(char *Filename) { int Status=FALSE; string name = Filename; size_t found; found = name.find(string(".bmp")); if(found) { // Status Indicator memset(TextureImage,0,sizeof(void *)*1); // Set The Pointer To NULL // Load The Bitmap, Check For Errors, If Bitmap's Not Found Quit if (TextureImage[0]=LoadFromBMP("res/textures/NeHe.bmp")) { if(PowerOf2Test()) // both sizes must be power of 2 { Status=TRUE; // Set The Status To TRUE TransferAndConvertBMP(); glGenTextures(1, &TextureHandle[0]); // Create The Texture // Typical Texture Generation Using Data From The Bitmap // glBindTexture(GL_TEXTURE_2D, TextureHandle[0]); glTexImage2D(GL_TEXTURE_2D, 0, 4, SizeX, SizeY, 0, GL_RGBA, GL_UNSIGNED_BYTE, imageData); // glTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage[0]->sizeX, TextureImage[0]->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]->data); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); } else { DeleteAndFree(); } } } found = name.find(string(".png")); if(found) { // Status Indicator } return Status; } AUX_RGBImageRec *Texture::LoadFromBMP(char *Filename) // Loads A Bitmap Image { FILE *File=NULL; // File Handle if (!Filename) // Make Sure A Filename Was Given { return NULL; // If Not Return NULL } File=fopen(Filename,"r"); // Check To See If The File Exists if (File) // Does The File Exist? { fclose(File); // Close The Handle return auxDIBImageLoad(Filename); // Load The Bitmap And Return A Pointer } return NULL; // If Load Failed Return NULL } void Texture::TransferAndConvertBMP() { SizeX = TextureImage[0]->sizeX; SizeY = TextureImage[0]->sizeY; int GlobalSize = SizeX * SizeY; imageData = new unsigned char [GlobalSize * 4]; for(int i = 0; i < GlobalSize; i++) { imageData[i*4+0] = TextureImage[0]->data[i*3+0]; imageData[i*4+1] = TextureImage[0]->data[i*3+1]; imageData[i*4+2] = TextureImage[0]->data[i*3+2]; imageData[i*4+3] = 255; // full alpha since its a BMP } } void Texture::Bind() { glBindTexture(GL_TEXTURE_2D, TextureHandle[0]); } [/code] Right now, all I'm getting is a white spinning cube with no texture. if I put the line (glTexImage2D(GL_TEXTURE_2D, 0, 4, SizeX, SizeY, 0, GL_RGBA, GL_UNSIGNED_BYTE, imageData) in comment and I remove the comment of the one after it, it works! I get a perfectly well textured spinning cube. If I can get the alpha component to work, the next thing I'll do is to make a few functions to load .PNG and .TGA manually. So, any help with this?
  12. Ok, with the squares it's better than ([url="http://i759.photobucket.com/albums/xx234/Jackwriter/Untitled-3.jpg"]http://i759.photobuc.../Untitled-3.jpg[/url]). Very very simple design I guess, a lot of cut & paste of character from squares to squares. But no need in arguing about the level for someone who is beginning. You are at the level you are at and that's it. The jokes are ok I guess. I have done some professional manga like stuff, I can tell you quality takes a lot of time. Sometimes, you have to cut some corner to do quantity. As I said in the other post, nfries88 is giving you an offer, take it! this will allow you to better your style.
  13. I have always used 3DS Max, I'm just more used to it. I think the 2008 version is $139.99. It's a really complete tool with ok stuff for texturing. But then again, blender is free. I have seen people do ok thing for most garage games with blender.
  14. Might as well throw in another photo-realistic frog in there, making that leather armor took me forever: [url="http://www.imagitiel.com/images/portfolio/frogman_warrior.jpg"]http://www.imagitiel.com/images/portfolio/frogman_warrior.jpg[/url] Well, usually my problem are the feets, hands and fingers. They can be too small, too short or sometimes in a weird position. I sometimes have that little problem too when arms and legs are in a special position like folded. Well, I guess practice makes perfect.
  15. Maybe I was a little hard in the other post. This is your best work so far: http://i759.photobucket.com/albums/xx234/Jackwriter/Dincky.png The facial expression is good, the eye will have a tendency to zero in on it since it's the best feature of the drawing.. Put the same amount of work you have put in the face in the limbs. I see that you have attempted to do a little shading. You have used brown, try instead a shade of gray or black with some opacity. Let's say you're shading red, use a brick red for shading. For green use a darker green, etc... This is not too bad either: http://i759.photobucket.com/albums/xx234/Jackwriter/LusterPurge.png Take the font in illustrator instead of drawing big letter, that will fix some things. The cartoon: http://i759.photobucket.com/albums/xx234/Jackwriter/Untitled-3.jpg You've put some work in colouring, but there's 2 things. They are small, we cannot appreciate the work much, it's hard what kind of animal the characters are. Zoom in on their body and faces. Also, put some squares around each scenes, like a good old cartoon. Right now, your scenes are like stuff strewn randomly on a floor. Putting squares around it will be like putting everything on shelves. You can overlap the talking bubbles on the squares if you want. For the rest, color them. Again my motto, Practice, practice, practice!