Advertisement

LaMothe's BOB engine

Started by March 26, 2002 06:12 PM
13 comments, last by Spearhawk 22 years, 11 months ago
I had some help with it but yeah I got it working, its a lot easier than the bob engine I''ll tell you.

Use the graphics engine that you create and from that just basically copy his examples and it works, I had no probs with it really.

If you need some code examples or something let me know.

Pk
quote:
Original post by gamesmaster2
Oh man you got the loadbitmap to work??How did you do that.When I tried to do it I got so many compiler errors I just dropped it.

I had some trouble geting the bitmap to load too. But no compiling error. My problmes was with the 16bit bitmap not being displayed correctly and that his bitmap loading function wouldn't load bitmaps made in Photoshop.
If found out that the first problem was caued by the macro for 16bits color. The one that finaly worked for me is: #define _RGB16BIT(r,g,b) ((b%32) + ((g%32) << 6) + ((r%32) << 11))
The second problme was just an oversight in his loading function and the fix for that was to insert this:

  // Check to make sure that the biSizeImage isn't empty (which it is if it's a Photoshop bitmap)if(bitmap->bitmapinfoheader.biSizeImage == 0) {	bitmap->bitmapinfoheader.biSizeImage = (int)bitmap->bitmapinfoheader.biWidth*bitmap->bitmapinfoheader.biHeight*(bitmap->bitmapinfoheader.biBitCount>>3);}   

just before bitmapinfoheader.biSizeImage was used for the first time.


EDIT: Code box


[edited by - Spearhawk on April 1, 2002 10:50:52 AM]
Advertisement
Tricks of the windows game programming gurus: 2D and 3D fundamentals
- Andre Lamothe''

I dont'' know if the title is totally correct, but I believe their is a 16-bit version of his BOB engine on this.. This book uses the same engine. I read both at the same time WGPFD and this, but that doesn''t mean I understand anything about game programming (really, I don''t).


~ me ~
I'm not the brightest something or other in a group or similar.~ me ~
quote:
Original post by Militant
Tricks of the windows game programming gurus: 2D and 3D fundamentals
- Andre Lamothe''

I dont'' know if the title is totally correct, but I believe their is a 16-bit version of his BOB engine on this.. This book uses the same engine. I read both at the same time WGPFD and this, but that doesn''t mean I understand anything about game programming (really, I don''t).


~ me ~


Trust me I know how you feel.I keep studying code hoping that if I stare at it or copy what I see long enough it will stick in my head.On somethings it works.But for the really innovative things it seems like it never does.I guess nothing will help that but time.I''ve got to admit Game programming is one of the hardest things I''ve ever taken upon myself to do.But one day when I make a Zoids video game that rivals MechWarrior 4 I''ll look back at post like this and laugh.

The road to hell is paved in good intentions
The road to hell is paved in good intentions
before re-writing the 256 colour BOB library, actually go and use it for something. The first 2 games that I wrote used that library. In the first I didn''t alter the library at all. In the second I altered it fairly heavily (still using 256 colours though).
In a pong type first game, 256 colours is tons.
In my second game, It used cartoon style graphics, so I didn''t need heaps of colours for realism.

The main reason I don''t suggest you actually re-write the entire library is because you''ll soon ditch directdraw altogether and move onto direct3d or opengl. Then all this directdraw stuff will be absolutely useless, since it was dropped as of directx 8.

just my opinion though
Toby

Gobsmacked - by Toby Murray

This topic is closed to new replies.

Advertisement