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

Archived

This topic is now archived and is closed to further replies.

raislam

i think this is a newbie question...

15 posts in this topic

ok, i have been learning c++ for 4 years now and have been writing dos text-based programs... but, i got sick and tired of that, but i hadn''t found any books on loading bitmap files... i just want to load it to an offscreen surface so that i can use the RECT type to use them in a tile based game... what is the simplest way to load a bitmap to an offscreen surface? (could you explain how to do it either to load directly from a file instead of a rescource file?) thank you, ur help is very appreciated
0

Share this post


Link to post
Share on other sites
If I remember rightly, there is some example code of how to do this in the sdk. The file with the bmp loader is called something like ddutil.cpp at least that was the name in the dx7 sdk.
Anyway, I suggest that you look in the examples as the sdk''s tend to have a lot of quite easily understandable code.
Regards,
Devore
0

Share this post


Link to post
Share on other sites
If you are needing help of this kind you need to get started from the ground up. I suggest that you get a good book on the subject such as "The Zen of Direct3D Programming" which also covers lots of 2D stuff similar to what you want to do.
0

Share this post


Link to post
Share on other sites
I''d suggest you learn the Win32 API first. Try Programming Windows by Charles Petzold or Windows 98 Programming from the Ground Up by Herbert Schildt. After that, if you want to learn DirectX, I would suggest Tricks of the Windows Game Programming Gurus by André LaMothe.
0

Share this post


Link to post
Share on other sites
is there any way to do it with 1 function, or just smaller? could i have some code that inserts a bmp file called "grass.bmp" with 32x15 dimensions... it is for an isometric game.. and if possible, some tiling code
0

Share this post


Link to post
Share on other sites
is there any way to do it with 1 function, or just smaller? could i have some code that inserts a bmp file called "grass.bmp" with 32x15 dimensions... it is for an isometric game.. and if possible, some tiling code
0

Share this post


Link to post
Share on other sites
There is no one little magical function to create a game for you. You have to do it yourself or use an API like DirectX or OpenGL.
0

Share this post


Link to post
Share on other sites
i know that... i just want a DirectDraw function that displays a *.bmp file... i know that there is one, but i get a little lost when i go through the huge header files in the sdk...
0

Share this post


Link to post
Share on other sites
Based on what you said that you were writing text-based applications, I assume you don''t know DirectX. You can''t use a DirectDraw function without actually going through all the initialization and such. There is Blt(), but you can''t just throw it in the middle of your code and expect it to work. You have to initialize DirectDraw and stuff. You''ll also need to write your own bitmap loader, or you could use LoadBitmap() from the Win32 API.
0

Share this post


Link to post
Share on other sites
www.winprog.org

they have some easy to comprehend tutorials.

"I''''ve sparred with creatures from the nine hells themselves... I barely plan on breaking a sweat here, today."~Drizzt Do''''Urden
0

Share this post


Link to post
Share on other sites
so, that must be why the code is always so long... i have seen a couple examples that are long (most were long to free the memory after the program is closed), and a lot of stuff about "HBITMAP" and "BITMAP" classes... a also heard about "LOADFROMFILE" that could be put into the declaration of the LoadImage() function from the ddraw.h file, but i''m never told where the filename should go...
0

Share this post


Link to post
Share on other sites
LoadImage is from the Win32 API, not from DirectDraw. It is defined as:

HANDLE LoadImage(
HINSTANCE hinst,
LPCTSTR lpszName,
UINT uType,
int cxDesired,
int cyDesired,
UINT fuLoad
);


hinst is the instance handle to your application. It is passed to WinMain when the program starts. lpszName is where you either specify the name of the resource, or in your case, the filename. uType is the type of image to load. Use IMAGE_BITMAP here. cxDesired and cyDesired is the dimensions you want the bitmap to be loaded in, use 0 if you want the bitmap to retain its normal size. fuLoad should be LR_LOADFROMFILE if you want to load from a file, but it can be a combination of other flags as well. The function returns an HBITMAP which you can blit to a surface.
0

Share this post


Link to post
Share on other sites