Advertisement

Novice needs HELP!

Started by September 01, 1999 04:06 PM
8 comments, last by Dupp 25 years, 3 months ago
Well, you're problem might be easier to solve than expected.

Do you have somewhere in your program the following function?:

void main{
};

Between the {} you'll put your main code since the program starts here.

I hope it solved your problem.

If you are a novice game programmer, get a book called "Windows Game Programming for Dummies" by Andre Lamothe. You must know C/C++ first before you can use the book.
Advertisement
My recommendation to you is learn C or C++ first and get to know it will before you jump into game programming, it is a good idea to learn about pointers and arrays and all that stuff before you jump into games because when working with video memory that is mostly what you do...The book you have is a good one for beginners that is the same book i have along with about 20 others on every other kind of programming known to man..i would get Watcom C/C++ compiler I personally think it is better, for memory management and code optimizing. goto www.sybase.com for info.

but like i said before, learn C/C++ first although you wont get into the cool stuff for awhile. You will be better off in the long run if you want to be a serious game programmer.
Check ya later..

------------------
E-mail with questions, comments, and retorts.
InvalidSyntax@icqmail.com

-Lucas
I already have a pretty good understanding of the programming side of C/C++. That's not the problem.

The problem is compiler settings. The code is not my own. It's off the CD that came with the book. Written in Borland 4.?. The compiler I have is 3.1. I'm not sure if that would make much difference. Anyway, I just need to get these programs to run. The code that's written should be correct. It's simply the settings. It's a linker error as well. I've manipulated the linker settings and...nothing. When I go to library settings and choose Turbo Vision along w/Graphics Library the error changes to "can't find TV.LIB" and I don't have TV.LIB. So that's a no go. But maybe that's what I needed.

Opinions?

I had considered the Dummies Guide to Game Programming. But I assume Andre would use the same settings he's used to. Which would very likely be the same for the book I have.
I've followed his instructions for settings. That's done. But something's missing.

Please help guys. I'm tired of creating text games for experience and drawing lines on the screen isn't very interesting. I want 13h mode and loading pcx graphics! SOMETHING!

Dupp.

If you want mode 13h type this:
asm{
mov ax, 0x13
int 0x10
};

Easy huh?
Now back to text:
asm{
mov ax, 0x3
int 0x10
};
Just fill ax with different numbers and you'll get different screenmodes. There is also VESA but that's not the subject.
If you want to learn asm you can read my tutorial at: http://skyscraper.fortunecity.com/compiler/379/assemble.html
I hope this helped and you got a taste of the power of asm.

lesson1: get a good (and I mean REAL good) book about C++.
lesson2: Get DJGPP and ALEGRO (type "djgpp alegro" in yahoo to find them)
lesson3: any questions mail me
mb313@hi.fontys.nl

------------------
Programming is an art

Programming is an art
Advertisement
About the assembly code above - does anyone know what TASM32.EXE is? I assume that it is the inline assembler that comes with Borland 5.0, but in the Borland manuals it says that it uses its own inlne assembler - BASM.EXE.

If anyone know what I can do to get assembly working in Borland, please reply!

Just type:
asm{
};

Put your code behind the '{}'.
This worked well for me.

Hello fellow programmers,

I'm an ex-QBasic programmer now become a novice C/C++ programmer. Where to begin...

I've picked up pretty well on the the language itself using Borland's 3.1 compiler, having more success in learning the DOS platform than the Windows (though later I wish to turn my focus to Windows platform).

I'm self-studying with the interest in game development. I purchased the book "Black Art of 3D Game Programming" by Andre Lamothe. This book receives high claim for learning game programming by other programmers. It contains code and explaination for ultilities like 13h and modez. I DYING TO TRY IT!!! HOWEVER... I've followed the books instruction for the compiler settings. Though I keep getting a linker error: "Undefined symbol _main in module c0.asm".
Under the Linker/Library settings I have the Standard Run-Time Library set on Static.

I assume by the (.asm) ext. It's an error concerning assembly code (which IS contained in the sourcecode). Changing the settings for handling assembly code hasn't had any effect.

The book says the code was made in Borland 4.?. Could that make the difference? These compiler settings could drive a man insane to interpret their effect.

This book really is fantastic, though if I can't run the sourcecode it's useless.

Please help me out.

Thanx
Dupp.

Pee ES:
If these problems persist I'm going to purchase Microsoft's Visual C++ 6.0 and move on to the Windows platform. (Which I plan to do anyways). But I don't want to run away from my problems. I'ts best experience to solve them. Though for future reference, What books do you recommend for Windows platform C/C++ game programming.

To answer the original question...

I seem to remember seeing this error from my old days with BC++ 3.1. I can't for the life of me remember how I solved it, but it seems like you're on the right track. I seem to remember that 3.1 has several different memory models - Compact, Small, Medium, Large... could it have something to do with these?

The reason you got a different error message when you tried TurboVision is because the first thing the linker does is look for neccessary LIBs... then, once it knows it's got everything, it starts linking. Even if you had TV.LIB, you would have encountered the same "c0.asm" error eventually.

Try this: make a simple project with the same settings as those in the book. put a small main function into it, like:

main() { printf("\nHello World."); }

and see if that compiles.

Mason McCuskey
Spin Studios
www.spin-studios.com

Founder, Cuttlefish Industries
The Cuttlefish Engine lets anyone develop great games for iPad, iPhone, Android, WP7, the web, and more!

This topic is closed to new replies.

Advertisement