Thread: Getting started

  1. #1
    Registered User
    Join Date
    Aug 2003
    Posts
    28

    Getting started

    How can I get started writing games for windows? I bought this book "Teach yourself Game Programming in 24 hours", but none of the examples will compile in Dev, and I can't afford anything else. Does anybody have a game engine that compiles in Dev that they want to let me use?
    ---Rainer
    Digital pimp, hard at work

  2. #2
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    Do you have all the required library files? I don't know the specific book, so I can't help you much, but it might use directX, in which case you would need the DirectX SDK ... If the book came with a cd then it would probably be on that, otherwise it probably tells you somewhere what you need to get started...
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  3. #3
    Registered User actionbasti's Avatar
    Join Date
    Dec 2002
    Posts
    48
    Originally posted by JaWiB
    but it might use directX, in which case you would need the DirectX SDK ...
    I have the book and its quite good!

    It does not use Direct X at all, to make it easyer in the beginning.
    The CD has everything you need to make the programs run! Watch out the book does not have all the code always listed. You either have to be smart enough to type it ion your own, or you just retrieve it from the examples on the CD. Also you need to get all the Icons and bitmap resources from the CD to compile the programs successfully!

    Even if you have no clue about Win32 API, like in my case, read the book and type the code. YOU WILL get a hand of it and become very comfortable with it. I was realy frustrated in the beginning, but then after chapter 5 or 6 everything went just fine.

    --<Action>--

  4. #4
    Registered User
    Join Date
    Aug 2003
    Posts
    28
    But nothing compiles. How am I supposed to learn if nothing compiles? Do you know of any alternatives or game engines that work in Dev?
    ---Rainer
    Digital pimp, hard at work

  5. #5
    Registered User
    Join Date
    Aug 2003
    Posts
    28
    actionbasti, since you're familiar with the book, here is what happens when I try to compile the example from hour three:

    c:\windows\TEMP\ccPvGs1a.o: In function `GameInitialize(HINSTANCE__ *)':

    //c/windows/desktop/gamesk~1/skeleton.cpp:18: undefined reference to `GameEngine::GameEngine(HINSTANCE__ *, char *, char *, unsigned short, unsigned short, int, int)'

    C:\DEV-C_~1\LIB\\libmingw32.a(main.o)(.text+0x8e): undefined reference to `WinMain@16'

    (btw, I changed the code around a little, by removing all of the #pragma once commands)
    ---Rainer
    Digital pimp, hard at work

  6. #6
    Registered User
    Join Date
    Aug 2003
    Posts
    22
    I'm still a newbie but I'm pretty sure that you're trying to compile this code as a console application, when it should be a win32 application. Make sure when you create a new project that you select the win32 project. I hope this helps.

  7. #7
    Registered User
    Join Date
    Aug 2003
    Posts
    28
    I got strange results. At first I wasn't compiling it as a project at all, and that didn't work. I switched it to a win32 project and it compiled, but the icons were the dev project default icons, not the right ones that I included in the resource file. After this I switched to the free borland compiler, but no windows programs compile on this. For some reason, the compiler acts like I didn't include windows.h. Any ideas before I abandon programming forever?
    ---Rainer
    Digital pimp, hard at work

  8. #8
    Registered User glUser3f's Avatar
    Join Date
    Aug 2003
    Posts
    345
    I wonder if you know C++ well before diving into Win32 API and DirectX, and there is no need for leaving programming just because your first try to compile something didn't work well.
    The first time I tried to compile something was a Java Hello World program, I typed it exactly as it was written in the book, but I game me like 20 errors or something, I kept trying but no go, I was depressed in the beginning and thought of leaving programming, later I figured out the errors and everything went well.

    You shouldn't really care about the icons right now, does the program run well after compiling?

  9. #9
    Registered User
    Join Date
    Aug 2003
    Posts
    28
    but wouldn't it make sense that an example from a tutorial that was compiled on the borland compiler should compile on the borland compiler? Wouldn't that only seem logical(which is what programming is all about in the first place)?
    1: I do know C++ well enought to delve into the API, and It's not my first try.
    2: I've been trying to compile stuff for a long time, with no success.
    3: The program was a skeleton windows app using a game engine, and it worked alright (by doing nothing). I think I know what was wrong with the resource file.
    Last edited by Rainer; 09-19-2003 at 05:00 PM.
    ---Rainer
    Digital pimp, hard at work

  10. #10
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    There is an intro to video game programming package that Best Buy sells for about 29.99. It comes with an introductory version (academic) of MSVC 6. This version is really all you need. All of the other bloat for MSVC 6 is utilities, samples, libraries, and stuff for businesses to use on their networks (multiple people working on the same project, etc). Since you will never use the enterprise portion of MSVC for games, you really only need the basic MSVC package.

    Check out Best Buy and purchase this intro kit. I think Circuit City also has it. It comes in a yellow box and is nearly impossible to miss. Good investment IMO.

    Trying to get Borland to work with DirectX is like trying to fit a square peg in a round hole. It just doesn't work. Many claim you can do it, but you must alter the headers extensively, redefine and undefine certain constants, blah, blah, blah blah blah. So my advice is to get MSVC 6 before tackling DirectX. It will be hard enough w/o having to fight with your compiler.

  11. #11
    Registered User
    Join Date
    Aug 2003
    Posts
    28
    Thanks, I'll look for that. Does it come with some kind of guide, or is it just the nessesary software?
    ---Rainer
    Digital pimp, hard at work

  12. #12
    Registered User
    Join Date
    Aug 2003
    Posts
    56

    Ha ha ha

    It will be hard enough w/o having to fight with your compiler.
    Lol... that is almost as good as the quote that says if you stick with it in a year or so... you too will be able to make a spinning cube.

    As for the subject at hand? Dont let the compiler get you down. If it could be thrown across a room, it would be in many pieces all ready.

    Load up Gimp, photoshop, or even the little windows app Paint.exe. Then get the spray can tool and fill up a page with 10 different colors.... very relaxing. Just back and forth, up and down, over and over....LOL.

    Or do whatever it is that you do to take a break.

    Then go back and try it again... The others are right about the MSVC thing too. Just focus on one platform for now and worry about portability later, when your knowledge base will be much better.

  13. #13
    Registered User RussMan's Avatar
    Join Date
    Sep 2003
    Posts
    14
    Hey man i know how hard it is to get up and running with game dev. I myself was once in the same position you are now. I have a pdf book with all the examples (In zip format) plus i have directx7 which it uses for all examples. I know all of them compile and I have read the book from front to back and highly suggest it. Email me at [email protected] and i will find a means to send you the book and source with dx7 sdk.

  14. #14
    Registered User
    Join Date
    Aug 2003
    Posts
    28
    Sorry for the delay; internet trouble. I've been getting the examples to compile a chapter at a time. I'm up to chapter 6, and I get this error:

    bitmap.cpp line 226: implicit declaration of 'int TransparentBlt(...)'

    I know I'm not supposed to have someone "write my program for me", but I can't figure this out on my own.
    ---Rainer
    Digital pimp, hard at work

  15. #15
    Registered User
    Join Date
    Aug 2003
    Posts
    28
    I think I attached the project as a zip file, but I don't see it when I view the thread. Oh well, here's a link from my website chapter 6.zip
    ---Rainer
    Digital pimp, hard at work

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help getting started..matrices
    By BobDole11 in forum C Programming
    Replies: 7
    Last Post: 11-15-2008, 09:51 PM
  2. Help getting started :(
    By blackocellaris in forum C Programming
    Replies: 4
    Last Post: 11-05-2006, 06:50 PM
  3. Getting started
    By panzeriti in forum Game Programming
    Replies: 3
    Last Post: 06-28-2003, 10:13 AM
  4. How to get started?
    By anoopks in forum Linux Programming
    Replies: 0
    Last Post: 01-14-2003, 03:48 AM
  5. Need help getting started
    By Unregistered in forum C++ Programming
    Replies: 4
    Last Post: 09-02-2001, 11:08 PM