Game programming

Moderators: None (Apply to moderate this forum)
Number of threads: 2070
Number of posts: 5361

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
3d game programming Posted by garwain on 13 Jun 2001 at 12:49 PM
I've been toying with ideas for a game, and have got code in both VC++ and Delphi that generates a 3d world using OpenGL to display bitmaps and allow the player to walk around using the arrow keys. (soon going to add in the mouse as well)

Anyone have ideas on how to make sprites (have some critters to hack away at)? I was thinking about making them with 3D Studio Max, but i'm not sure yet. What have you seasoned 3d programmers done to solve the problem of making sprites walk around and do some action ie. swing a sword, lie down, stand up etc?

Any ideas are appreciated

Report
Re: 3d game programming Posted by gautam on 18 Jun 2001 at 6:17 PM
Hey,
You pack a set of bytes(4 bytes packing) into a character array and use glBitmap to make sprites, here below is an example of a smiley sprite.

static GLubyte smiley[] = /* 16x16 smiley face */
{
0x03, 0xc0, 0, 0, /* **** */
0x0f, 0xf0, 0, 0, /* ******** */
0x1e, 0x78, 0, 0, /* **** **** */
0x39, 0x9c, 0, 0, /* *** ** *** */
0x77, 0xee, 0, 0, /* *** ****** *** */
0x6f, 0xf6, 0, 0, /* ** ******** ** */
0xff, 0xff, 0, 0, /* **************** */
0xff, 0xff, 0, 0, /* **************** */
0xff, 0xff, 0, 0, /* **************** */
0xff, 0xff, 0, 0, /* **************** */
0x73, 0xce, 0, 0, /* *** **** *** */
0x73, 0xce, 0, 0, /* *** **** *** */
0x3f, 0xfc, 0, 0, /* ************ */
0x1f, 0xf8, 0, 0, /* ********** */
0x0f, 0xf0, 0, 0, /* ******** */
0x03, 0xc0, 0, 0 /* **** */
};

glBitmap(16, 16, 8, 8, 0, 0, smiley);

(Unpacking is done from bottom to top, so make the array(the picture) upside down.


: I've been toying with ideas for a game, and have got code in both VC++ and Delphi that generates a 3d world using OpenGL to display bitmaps and allow the player to walk around using the arrow keys. (soon going to add in the mouse as well)
:
: Anyone have ideas on how to make sprites (have some critters to hack away at)? I was thinking about making them with 3D Studio Max, but i'm not sure yet. What have you seasoned 3d programmers done to solve the problem of making sprites walk around and do some action ie. swing a sword, lie down, stand up etc?
:
: Any ideas are appreciated
:





 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.