newGame project
newGame project
Hello everyone,
While Chili was away for a bit, I started reading the book "Sam's Teach Yourself Game Programming in 24 Hours by Michael Morrison." The book focuses on the GDI for it's graphic components. The book was really easy to follow, but its framework lacks in comparison to any DirectX framework. Anyways...
I created this Battleship clone using the framework from the book. I stayed as close as possible to the framework, even though I had to make some modifications to it to get the game to work like I wanted. (Pretty sure most people would!)
I was in the process of converting it to Chili's framework and realized "Why reinvent the wheel?" So, instead, I present the game using what I call the samProject framework! I hope everyone enjoys it...
** EDIT: newGame - Space Battleship Update is the updated fix for Release mode. Thanks to theToddfather for discovering this... [11]
Natories
While Chili was away for a bit, I started reading the book "Sam's Teach Yourself Game Programming in 24 Hours by Michael Morrison." The book focuses on the GDI for it's graphic components. The book was really easy to follow, but its framework lacks in comparison to any DirectX framework. Anyways...
I created this Battleship clone using the framework from the book. I stayed as close as possible to the framework, even though I had to make some modifications to it to get the game to work like I wanted. (Pretty sure most people would!)
I was in the process of converting it to Chili's framework and realized "Why reinvent the wheel?" So, instead, I present the game using what I call the samProject framework! I hope everyone enjoys it...
** EDIT: newGame - Space Battleship Update is the updated fix for Release mode. Thanks to theToddfather for discovering this... [11]
Natories
- Attachments
-
- newGame.zip
- newGame - Space Battleship Update
- (846.03 KiB) Downloaded 317 times
Last edited by Natories on December 20th, 2013, 5:00 am, edited 2 times in total.
Re: newGame project
Nice! The artwork is nice! but i must ask... why use 'BOOL' and not 'bool'? for some reason that really seems to bother me
Re: newGame project
Well, it bothers me too, GreatJake, but I was remaining true to the framework from the book. If you notice inside some of my functions, I do end up using the bool instead of BOOL.
I understand the purpose of it, to ensure that a FALSE is 0 and that TRUE is 1, but I like the 'little' bool too! LOL
Thanks for the comment on the artwork, took me a bit to draw those up!
I understand the purpose of it, to ensure that a FALSE is 0 and that TRUE is 1, but I like the 'little' bool too! LOL
Thanks for the comment on the artwork, took me a bit to draw those up!
Re: newGame project
From what I remember the BOOL type is just to ensure it will compile on all platforms/computers, however seeing as our games use Dx -> focus on Windows this should never really become a problem.
Pretty cool game. Everything is well build, tho the keyboard ( typing ) might need a new revision...
Yes, I guess GDI is nowadays considered outdated, but if you make oldschool games and want to be sure they work for everyone then GDI is a probably the best way to go.
Pretty cool game. Everything is well build, tho the keyboard ( typing ) might need a new revision...
Yes, I guess GDI is nowadays considered outdated, but if you make oldschool games and want to be sure they work for everyone then GDI is a probably the best way to go.
ʕ •ᴥ•ʔ
Re: newGame project
the BOOL type is actually just a winapi type, which means it will only be for pcs that use the winapi (basically windows pcs ), and it was created just because in C there's no bool type (and well, cuz it's Microsoft, they have their own uppercase form for all the integral data types lol)
always available, always on, about ~10 years c/c++, java[script], win32/directx api, [x]html/css/php/some asp/sql experience. (all self taught)
Knows English, Spanish and Japanese.
[url=irc://irc.freenode.net/#pchili]irc://irc.freenode.net/#pchili[/url] [url=irc://luisr14.no-ip.org/#pchili]alt[/url] -- join up if ever want real-time help or to just chat --
Knows English, Spanish and Japanese.
[url=irc://irc.freenode.net/#pchili]irc://irc.freenode.net/#pchili[/url] [url=irc://luisr14.no-ip.org/#pchili]alt[/url] -- join up if ever want real-time help or to just chat --
Re: newGame project
Wow, I had no idea that there was so many ways to describe BOOL vs bool!
Thanks for the info Lux, I had to do that from scratch because the book didnt want to deal with text input! I can see why. LOL. I will continue looking for a better way.
Thanks for the kutos too, I appreciate it!
Natories
Thanks for the info Lux, I had to do that from scratch because the book didnt want to deal with text input! I can see why. LOL. I will continue looking for a better way.
Thanks for the kutos too, I appreciate it!
Natories
- thetoddfather
- Posts: 338
- Joined: October 1st, 2012, 9:53 pm
- Location: Canada
Re: newGame project
Anyone else getting a linker error trying to compile this?
Code: Select all
1>Bitmap.obj : error LNK2001: unresolved external symbol __imp__TransparentBlt@44
1>C:\Users\Todd\Desktop\newGame\Release\DxProject.exe : fatal error LNK1120: 1 unresolved externals
Re: newGame project
Good catch, theToddfather, I just tried to compile in Release mode too and it gave me the same error. Run this in Debug mode until I can figure out why it is not recognizing the TransparentBlt command in release...
Natories
Natories
Re: newGame project
I figured it out ...
The msimg32.lib needs to be added to the Linker->Input->Additional Dependencies. I somehow missed putting in there. So, I'll update the project with the dependency added in a few minutes.
Natories
The msimg32.lib needs to be added to the Linker->Input->Additional Dependencies. I somehow missed putting in there. So, I'll update the project with the dependency added in a few minutes.
Natories
Re: newGame project
Hello Everyone,
Update to newGame for Release mode issues can be found in the initial post...
Thanks,
Natories
Update to newGame for Release mode issues can be found in the initial post...
Thanks,
Natories