Archived

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

DreaZ

Starting

Recommended Posts

Hi there, I want to start programming games, but i don''t know where to start. i see sites who tell, tell, teel, but don''t say nothing so, plz, who can help me with these questions? (1) - can I use windows XP for game programming? (2) - can someone show me, step by step, how to create a simple .exe file, in c/c++, that print something, or do some action. thats all i want :D (3) - can I make a game that when downloaded don''t require an installed programming library (or someway to te game auto-install it) plz, help me to start. i''m PHP programmer, and i want to start with c/c++, or delphi. thank you very much

Share this post


Link to post
Share on other sites
(1) - can I use windows XP for game programming?
Well, I dunno... I heard you can''t really code anything on Windows XP, you need a special OS to do that.

(Yes, you can use WinXP. The OS doesn''t change a thing as to wether you can program or not. Though different OSes can use different programming tools, such as the Win32 API built-in Windows: a library of commands you can place in your program to do nifty things that would otherwise take a while to code on your own).

(2) - can someone show me, step by step, how to create a simple .exe file, in c/c++, that print something, or do some action. thats all i want :D
Assuming you have MSVC, create a new console app (file -> new project; select ''Console App'' or the closest equivalent from the list; give it a name in the little text box), click next, blank console app, next, next, blah until the box goes away.
Write the following...

#include <stdio.h>

void main(void)
{
printf("Hello World!");
}

Press F5. Tadah!

(3) - can I make a game that when downloaded don''t require an installed programming library (or someway to te game auto-install it)
Sure, you can just include the .exe and all required files in a zip and distribute the zip. It''s what most people do for small freeware projects, typically.

Share this post


Link to post
Share on other sites
hey, thank you.

ok, i did it, using borland 3 .. what is MSVC?

this show me a DOS window like, i would want something more like a game ..

im tryng to use allegro, but i cant convert the examples files into .exe files, to u know how do i do that?

thanx

Share this post


Link to post
Share on other sites
MSVC = Microsoft Visual C++, which offers one of the best development environments around, though not always the best compiler.

If you really want to learn to program games you are going to need to get yourself a couple good books to get started. First, it sounds like you need a good C++ primer, then maybe an intro to game programming book. There are tons of both on the shelves, and I haven''t kept to close of an eye on the intro stuff lately, but I have noticed a book called C++ for Game Programmers, which looks pretty good, and might be a good starting point.



And to respond to your comment about wanting an example more like a game, that is quite a bit more complex than you would think, because you need to go through the whole process of manually creating your window, and then depending on what API you plan to use for your graphics (DirectX/3D, OpenGL, GDI) you have some additional steps to take to get that up and running as well. So again I would suggest starting with a C++ primer and moving from there to some graphics examples. If you are looking to do 3D stuff and OpenGL is your thing, check out nehe.gamedev.net there are some good examples there. The most basic example on the site demonstrates the whole process of creating the window and initializing OpenGL.

"That''s a very nice hat."
-Korben Dallas

Share this post


Link to post
Share on other sites
For the sake of reference, you''ll probably find yourself writing anywhere between 30-50 lines just to create a basic Windows window with the text "hello world" in it. Rough estimate, though. You could get away with less, particularly if you put multiple instructions on the same line (though that''s cheating )

Your best bet is to look for a few beginner tutorials for Windows programming. Once you''re familiar with some basic API functions and C/C++ constructs, you should be able to get around to trying to write your first, probably not-too-good-but-cool-since-you-made-it, buggy game. From that point on, you can only get better...

Share this post


Link to post
Share on other sites