Advice sought - games programming for Windows

WildW

Senior member
Oct 3, 2008
984
20
81
evilpicard.com
Hi folks,

in my time I've been an old-school bedroom coder and I used to enjoy making simple computer games. Originally this was in BASIC on old 8-bit computers, and I graduated to the PC in the 90's via QBasic and later to Windows using Blitz Basic. But Basic is hardly ideal.

I would like to be able to bury myself in a coding project again but I'm never sure which way to go in Windows. Weird thing is, my job is coding, mostly in C but also bits of assembler, but only ever for embedded projects or Windows/Linux console applications. Beyond Blitz Basic I've never done anything graphical in Windows.

I recall looking at DirectX years ago and finding it way beyond me, but that was when I was back at university, before I'd spent 7 or 8 years in a coding/engineering job. My question really is can anyone recommend a path into developing simpleish games (most likely 2D rather than 3D) in Windows. I'd rather be coding in C, but C++/C#/Java are options I guess. I don't think I want to go down the Flash route. I'd like to be able to make fast full-screen type software.

What I'd really like is something with the old-school draw-to-the-screen functionality that the likes of Blitz Basic has, but using C. Does anything like that exist or should I just bite the OO bullet and dive into Visual Studio Express and a nightmare of DirectX classes?

 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
Check out XNA Game Studio from Microsoft. It'll let you code in any .NET language and there is a pretty decent community behind it so finding help on the web is easy.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Check out the Fastgraph library by Ted and Diana Gruber. They are still evolving it and it still has a strong native C API.

Fastgraph

XNA Game Studio is an impressive tool, but I don't think there is anything associated with it that falls into the "old school draw to the screen" category. Getting stuff on the screen with DirectX is a huge chore, unless you go with one of the canned game engines.

You might also want to play with Flash and Silverlight. If you're looking to do simple graphical games the "render in the browser" model might open up some new possibilities for you.
 

Cogman

Lifer
Sep 19, 2000
10,286
147
106
You might consider the SDL, I don't believe that it is OO (Am I wrong here?) And it has some pretty good support for 3d/2d image rendering.
 

JasonCoder

Golden Member
Feb 23, 2005
1,893
1
81
If you liked moving ascii around the screen in basic, you'll love XNA Game Studio. It's not costly (free) and you can draw 2d sprites or go as far as you want with full 3d. You'd probably get a hoot out of sliding 2d sprites around and then gradually check out the 3d stuff.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Originally posted by: JasonCoder
If you liked moving ascii around the screen in basic, you'll love XNA Game Studio. It's not costly (free) and you can draw 2d sprites or go as far as you want with full 3d. You'd probably get a hoot out of sliding 2d sprites around and then gradually check out the 3d stuff.

Has it really gotten that easy to do? Last time I looked at it basically it was managed directX plus the XNA content pipeline stuff. Managed directX definitely looked much more approachable than the native API, but I don't remember a sense of "hey, I can toss a sprite on the screen."

Maybe I should look at it again.
 

jdport

Senior member
Oct 20, 2004
710
0
71
the pipeline part of XNA that you mentioned is what gives you the "hey, I can toss a sprite on the screen" :)
 
Sep 29, 2004
18,656
68
91
Old school C calls to native libraries! heck, you can get teh windows handle for your desktop if you want and draw directly to that. I did it once just to see that I could.
 

JasonCoder

Golden Member
Feb 23, 2005
1,893
1
81
Originally posted by: Markbnj
Originally posted by: JasonCoder
If you liked moving ascii around the screen in basic, you'll love XNA Game Studio. It's not costly (free) and you can draw 2d sprites or go as far as you want with full 3d. You'd probably get a hoot out of sliding 2d sprites around and then gradually check out the 3d stuff.

Has it really gotten that easy to do? Last time I looked at it basically it was managed directX plus the XNA content pipeline stuff. Managed directX definitely looked much more approachable than the native API, but I don't remember a sense of "hey, I can toss a sprite on the screen."

Maybe I should look at it again.

Yeah it's pretty easy to do 2d in XNA. 3d is harder because you have to learn the math, z plane, culling, etc. Managed DX was what I did before XNA and XNA takes all the boilerplate crap out of the picture and helps you just focus on your game. Things like high precision timing for your game loops are there out of the box.

This guy put together a 3d rpg on a weekend at GDC a couple years ago. I remember thinking that game was better than some of the early stuff I played.

I think XNA has a chance even in serious game projects. All the heavy lifting doesn't happen in program code anymore... it's all shaders nowadays.
 

tatteredpotato

Diamond Member
Jul 23, 2006
3,934
0
76
Originally posted by: Markbnj
Originally posted by: JasonCoder
If you liked moving ascii around the screen in basic, you'll love XNA Game Studio. It's not costly (free) and you can draw 2d sprites or go as far as you want with full 3d. You'd probably get a hoot out of sliding 2d sprites around and then gradually check out the 3d stuff.

Has it really gotten that easy to do? Last time I looked at it basically it was managed directX plus the XNA content pipeline stuff. Managed directX definitely looked much more approachable than the native API, but I don't remember a sense of "hey, I can toss a sprite on the screen."

Maybe I should look at it again.

In XNA you just have a sprite object which is easily loaded with the ContnetManager. Then you just call

spriteBatch.Begin();
spriteBatch.Draw(what you draw and where); // Repeat this for every sprite you draw
spriteBatch.End()

It's hard to really make it much easier IMHO.

Note: It's been awhile since I've tinkered, so I might have a few details off here, but it's the basic idea.