HardwareHeaven.com

HardwareHeaven.com

Looking for the skin chooser?
 
 
  • Home

  • Hardware reviews

  • Articles

  • News

  • Tools

  • Gaming at HardwareHeaven

  • Forums

 

Go Back   HardwareHeaven.com > Forums > Software / Tools > Programming, Coding, (Web)Design


Programming, Coding, (Web)Design Discuss all your programming or design needs with likeminded people.

Reply
 
Thread Tools
Old Jan 27, 2003, 04:20 PM   #1
DriverHeaven Junior Member
 
Join Date: Aug 2002
Location: Cincy, OH, USA
Posts: 55
Rep Power: 0
Gremmie is on a distinguished road

Making a 2D game with C++

For my Software Development class, me and a couple of other guys have to make a game with C++. I was wondering if anyone can point me in the direction for some good Directx tutorials online, or some good books. In my past programming classes, all we've programed under is Unix, so this is my first true experience of Windows programming. Also, I'm pretty decent at C++, but I'm no master of the language or anything like that. Thanks for any info.

Edit: I heard the book "Tricks of the Windows Game Programming Gurus" by Andre Lamothe was a good book, and I was thinking about picking it up. Has anyone had any experience with this book?

Last edited by Gremmie; Jan 27, 2003 at 04:32 PM.
Gremmie is offline   Reply With Quote


Old Jan 27, 2003, 04:30 PM   #2
A Legend in Underwear
 
UberLord's Avatar
 
Join Date: May 2002
Location: Unknown
Posts: 5,255
Rep Power: 0
UberLord will become famous soon enough

Why does it have to be graphical? Write a MUD using a server + client solution over TCP/IP. Or use the DirectPlay part of the DirectX suite.

This would demonstrate being able to program logic and a Human Interprator.

Graphics are nice and stuff, but then you need to be fairly artistic as well. I'm a programmer and can't do much artwork well.
__________________
Gentoo Linux - Developer (baselayout)
Read my blog

"I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours."
Stephen Roberts
UberLord is offline   Reply With Quote
Old Jan 27, 2003, 09:58 PM   #3
Unbiased.
 
Join Date: Jun 2002
Posts: 4,812
Rep Power: 0
ToshiroOC is on a distinguished road

I happen to have the Tricks of the Windows Game Programming Gurus (second edition), and its hard to say really how useful it is.. You see, it doesn't start out at a beginner level - it assumes some familiarity with a lot of stuff, including C++ and some STL... it starts off with the relevant Windows API information, and then ramps up pretty quickly from there - I don't know enough C++ ATM to really understand whats going on in the later chapters. Good book from what I've read though - I just don't know the language well enough. If you aren't pretty good with C++ (as in you could, say, make this same game but with a text interface, and have nice, neat code), then I would suggest Bruno Miguel Teixeira de Sousa's book "Game programming all in one" (I have a copy of this too) - the series editor is again, LAmothe, and it starts out at a much simpler level. It uses some API interfacing thing called Mirus so you don't need to deal with anywhere near as much nitty gritty DirectX and COM stuffs, it starts out assuming you have at most some familiarity with some programming concepts and maybe some C or C++, no more - it takes you (not very well though) through polymorphism and advanced class/object stuff... It takes you through some text-only games also... Chapter 10 in the Sousa is the first one that deals with Windows programming, and Chapter 2 (and some of one) deals with Windows programming in the Lamothe... both are really good books, but which one you should get depends fully on how much C++ and Win32 API you already know, and how well you can handle steep and quick learning curves...

ToshiroOC

Hope this helps!
__________________
[img][/img]
[color=White]Peace be with you, Joe.[/color]
Driverheaven Staff Member (Supermoderator)
ToshiroOC is offline   Reply With Quote
Old Jan 30, 2003, 04:54 AM Threadstarter Thread Starter   #4
DriverHeaven Junior Member
 
Join Date: Aug 2002
Location: Cincy, OH, USA
Posts: 55
Rep Power: 0
Gremmie is on a distinguished road

ToshiroOC, thanks for the info. I'm pretty familiar with C++. While I'm not even close to the best, I know the basics, and I'm pretty decent at working with Data Structures in C++, such as stacks, queues, and sorting algorithms. I've heard from a buddy of mine at school that the LaMothe book is great, but I'm going to check out the one you recommended.
Gremmie is offline   Reply With Quote
Old Jan 30, 2003, 05:07 AM   #5
Unbiased.
 
Join Date: Jun 2002
Posts: 4,812
Rep Power: 0
ToshiroOC is on a distinguished road

Any time... if you can create any decent data processing program that is text only, then the Gurus book would be good for you.
__________________
[img][/img]
[color=White]Peace be with you, Joe.[/color]
Driverheaven Staff Member (Supermoderator)
ToshiroOC is offline   Reply With Quote
Old Apr 30, 2003, 11:02 PM   #6
DriverHeaven Junior Member
 
Join Date: Apr 2003
Location: Midway City, California
Posts: 22
Rep Power: 0
Dalik is on a distinguished road

Why not use SDL for your programming API, on the windows platform it uses DX anyway but its all simple. The book on SDL is like $20 and covers everything you need. To get a basic game up like pacman without all the levels and other hard work, would take about 2 weeks for all of you guys to put together. You dont need a book on how to make a game, its very straight forward. goto www.gamedev.net and you can get more details from there.

The basic setup of your game is

main
init()
gameloop()
cleanup()

init()
setup SDL
load graphics and sounds


gameloop()
load level data
create objects

while(done != TRUE)
getInput()
playMusic()
Blit images



not very hard, with SDL it makes it a lot easier to use then DX
I wouldnt bother with a "game programming book" all the information you need
is on the internet at gamedev.net and if your lost ask.
Dalik is offline   Reply With Quote
Old May 1, 2003, 03:45 PM   #7
A Legend in Underwear
 
UberLord's Avatar
 
Join Date: May 2002
Location: Unknown
Posts: 5,255
Rep Power: 0
UberLord will become famous soon enough

Good point Dalik - SDL is also cross platform. NWN Linux beta's use it
__________________
Gentoo Linux - Developer (baselayout)
Read my blog

"I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours."
Stephen Roberts
UberLord is offline   Reply With Quote
Reply

Thread Tools