#2: Basic 2D Shooter Mini-tutorial

Started by
17 comments, last by Evil_Greven 20 years ago
Alrighty, Oluseyi. Thanks.

Alpha_ProgDes,

Pausing a game is pretty easy, all you have to do is have a global variable (boolean in this case named PAUSED), and in the main game loop, you check to see if PAUSED is true (or 1 or 10 or whatever, you could also use a hexidecimal-type coding system for a single GAMESTATE variable), and if PAUSED is true, then the game does not move anything.

PAUSED is set to true or false in TheWindowProc() function, which translates messages from the WinMain() function - in this case, a keypress of the Pause key.

-Greven
Advertisement
quote:Original post by Thorbjorn
Greven.

Can I ask you if you know how to handle that my Tetris-clone is available for play when Microsoft Visual C++ is open and less available to be opened as a unit?

Thorbjørn.

The code is available at www.tomsborg.no/Moleculesfiler


Maybe you have the intro version of VC. I don''t think that it allows you to create exe''s. Everything has to be run through the IDE.
Thanks Greven, Raging_Jakl.

When i compile with what I suppose is the Release-Compiler (Go), I get these messages:

Loaded ''C:\WINNT\System32\ntdll.dll'', no matching symbolic information found.
Loaded ''C:\WINNT\system32\kernel32.dll'', no matching symbolic information found.
Loaded ''C:\WINNT\system32\user32.dll'', no matching symbolic information found.
Loaded ''C:\WINNT\system32\gdi32.dll'', no matching symbolic information found.
Loaded ''C:\Documents and Settings\Thorbjørn Wilhelm To\Local Settings\TempIadHide3.dll'', no matching symbolic information found.
Loaded ''C:\WINNT\system32\advapi32.dll'', no matching symbolic information found.
Loaded ''C:\WINNT\system32\rpcrt4.dll'', no matching symbolic information found.
Loaded ''C:\WINNT\system32\indicdll.dll'', no matching symbolic information found.
Loaded ''C:\WINNT\system32\imm32.dll'', no matching symbolic information found.

Can you tell me if that is right?
Thorbørn.

www.tomsborg.no
Thorbjørn.www.tomsborg.no
If it''s MSVC++ then Go is the debugger. Hit the red exclaimation mark to execute (Ctrl+F5)

The way you change the settings from Debug to Release (usualy it''s Debug by default) is going to Build->Set Active Configurations, then pick Release and hit OK.

But, raging_jakl said that you cannot run a stand-alone program with the cheapest version of MSVC++ (enterprise I think?). You''ll have to go for the Standard or Professional if that''s the case.

-Greven
Thanks Greven.

I have set the active configurations to Release. The size, pointer and name is as in the source-text. Can you tell me if that is a less-expencive Microsoft Vicual C++ Studio function?

quote:Original post by raging_jakl

Maybe you h ave the intro version of VC. I don''t think that it allows you to create exe''s. Everything has to be run through the IDE.


raging_jakl.
May I ask you what the IDE is?


Thorbjørn.

www.tomsborg.no
Thorbjørn.www.tomsborg.no
quote:Original post by Thorbjorn
Thanks Greven.

I have set the active configurations to Release. The size, pointer and name is as in the source-text. Can you tell me if that is a less-expencive Microsoft Vicual C++ Studio function?


Functions like structures, map, graphic is less present.



Thorbjørn.

www.tomsborg.no
Thorbjørn.www.tomsborg.no
quote:Original post by Thorbjorn
Thanks Greven.

I have set the active configurations to Release. The size, pointer and name is as in the source-text. Can you tell me if that is a less-expencive Microsoft Vicual C++ Studio function?

quote:Original post by raging_jakl

Maybe you h ave the intro version of VC. I don''t think that it allows you to create exe''s. Everything has to be run through the IDE.


raging_jakl.
May I ask you what the IDE is?


Thorbjørn.

www.tomsborg.no


The IDE is simply the program you use to develop with - stands for Integrated Develop Environment, if you can''t create .exe files then grab a copy of Dev-C++, you can still do all developing/testing in MSVC but once it''s finished you can compile the code with Dev-C++ to create the .exe file for distribution.

Thanks Spudder.

I notice that SDL.dll is mentioned freqently. May I ask if the SDL.dll is relevant to the Tetrisclone-in-an-hour program?


Thorbjørn.

www.tomsborg.no
Thorbjørn.www.tomsborg.no
Yes!

My Spacegame is playable.


Thorbjørn.

www.tomsborg.no
Thorbjørn.www.tomsborg.no

This topic is closed to new replies.

Advertisement