What do you think about my small game made with Window's GDI on WINAPI and C++?
Started by Enthusiastic for Sense, Jun 18 2011 07:18 AM
12 replies to this topic
#1
Posted 18 June 2011 - 07:18 AM
It's RAW, no tools, no algorithms, no engines, nothing. Purely written, and I know it's pretty sucky, but, all in all, it's not so bad.
The source code to the game can be found here: http://13andincredib...me-source-code/
Thanks in advance! XD
The source code to the game can be found here: http://13andincredib...me-source-code/
Thanks in advance! XD
#2
Posted 22 June 2011 - 06:04 PM
Well, I see two trees and after following the instructions, I found a key ..
Is that it?
You should use more sensible controls, not ones that need explaining.
Is that it?
You should use more sensible controls, not ones that need explaining.
#3
Posted 22 June 2011 - 06:36 PM
SetPixel(hdc, 485, 178, RGB(0, 0, 0)); SetPixel(hdc, 486, 177, RGB(0, 0, 0)); SetPixel(hdc, 487, 176, RGB(0, 0, 0)); SetPixel(hdc, 488, 175, RGB(0, 0, 0)); SetPixel(hdc, 489, 175, RGB(0, 0, 0)); SetPixel(hdc, 490, 175, RGB(0, 0, 0)); SetPixel(hdc, 490, 175, RGB(0, 0, 0)); SetPixel(hdc, 490, 174, RGB(0, 0, 0)); SetPixel(hdc, 490, 173, RGB(0, 0, 0)); SetPixel(hdc, 490, 172, RGB(0, 0, 0)); SetPixel(hdc, 490, 171, RGB(0, 0, 0)); SetPixel(hdc, 490, 170, RGB(0, 0, 0)); SetPixel(hdc, 490, 169, RGB(0, 0, 0)); SetPixel(hdc, 490, 168, RGB(0, 0, 0)); SetPixel(hdc, 491, 168, RGB(0, 0, 0)); SetPixel(hdc, 491, 167, RGB(0, 0, 0)); SetPixel(hdc, 491, 166, RGB(0, 0, 0)); SetPixel(hdc, 492, 165, RGB(0, 0, 0)); SetPixel(hdc, 493, 165, RGB(0, 0, 0)); SetPixel(hdc, 494, 165, RGB(0, 0, 0)); SetPixel(hdc, 495, 165, RGB(0, 0, 0)); SetPixel(hdc, 496, 165, RGB(0, 0, 0)); SetPixel(hdc, 495, 166, RGB(0, 0, 0)); SetPixel(hdc, 494, 167, RGB(0, 0, 0)); SetPixel(hdc, 493, 168, RGB(0, 0, 0)); SetPixel(hdc, 494, 168, RGB(0, 0, 0)); SetPixel(hdc, 495, 168, RGB(0, 0, 0)); SetPixel(hdc, 496, 168, RGB(0, 0, 0)); SetPixel(hdc, 497, 169, RGB(0, 0, 0)); SetPixel(hdc, 496, 170, RGB(0, 0, 0)); SetPixel(hdc, 495, 171, RGB(0, 0, 0)); SetPixel(hdc, 494, 171, RGB(0, 0, 0)); SetPixel(hdc, 493, 172, RGB(0, 0, 0)); SetPixel(hdc, 493, 173, RGB(0, 0, 0)); SetPixel(hdc, 493, 174, RGB(0, 0, 0)); SetPixel(hdc, 493, 175, RGB(0, 0, 0)); SetPixel(hdc, 493, 176, RGB(0, 0, 0)); SetPixel(hdc, 493, 177, RGB(0, 0, 0)); SetPixel(hdc, 493, 178, RGB(0, 0, 0)); SetPixel(hdc, 493, 179, RGB(0, 0, 0)); SetPixel(hdc, 493, 180, RGB(0, 0, 0)); SetPixel(hdc, 493, 181, RGB(0, 0, 0)); SetPixel(hdc, 493, 182, RGB(0, 0, 0)); SetPixel(hdc, 493, 183, RGB(0, 0, 0)); SetPixel(hdc, 493, 184, RGB(0, 0, 0)); SetPixel(hdc, 492, 185, RGB(0, 0, 0)); SetPixel(hdc, 491, 186, RGB(0, 0, 0)); SetPixel(hdc, 490, 187, RGB(0, 0, 0)); SetPixel(hdc, 489, 187, RGB(0, 0, 0)); SetPixel(hdc, 488, 187, RGB(0, 0, 0)); SetPixel(hdc, 487, 187, RGB(0, 0, 0)); SetPixel(hdc, 486, 187, RGB(0, 0, 0)); SetPixel(hdc, 485, 187, RGB(0, 0, 0)); SetPixel(hdc, 484, 187, RGB(0, 0, 0)); SetPixel(hdc, 483, 187, RGB(0, 0, 0)); SetPixel(hdc, 482, 186, RGB(0, 0, 0)); SetPixel(hdc, 482, 185, RGB(0, 0, 0)); SetPixel(hdc, 481, 184, RGB(0, 0, 0)); SetPixel(hdc, 481, 183, RGB(0, 0, 0)); SetPixel(hdc, 481, 182, RGB(0, 0, 0)); SetPixel(hdc, 481, 181, RGB(0, 0, 0)); SetPixel(hdc, 481, 180, RGB(0, 0, 0)); SetPixel(hdc, 481, 179, RGB(0, 0, 0)); SetPixel(hdc, 482, 179, RGB(0, 0, 0)); SetPixel(hdc, 483, 178, RGB(0, 0, 0)); SetPixel(hdc, 484, 179, RGB(0, 0, 0)); SetPixel(hdc, 487, 184, RGB(0, 0, 0)); SetPixel(hdc, 488, 184, RGB(0, 0, 0)); SetPixel(hdc, 489, 183, RGB(0, 0, 0)); SetPixel(hdc, 490, 182, RGB(0, 0, 0)); SetPixel(hdc, 490, 181, RGB(0, 0, 0)); SetPixel(hdc, 490, 180, RGB(0, 0, 0)); SetPixel(hdc, 490, 179, RGB(0, 0, 0)); SetPixel(hdc, 489, 179, RGB(0, 0, 0)); SetPixel(hdc, 488, 179, RGB(0, 0, 0)); SetPixel(hdc, 487, 179, RGB(0, 0, 0)); SetPixel(hdc, 486, 179, RGB(0, 0, 0)); SetPixel(hdc, 486, 180, RGB(0, 0, 0)); SetPixel(hdc, 486, 181, RGB(0, 0, 0)); SetPixel(hdc, 486, 182, RGB(0, 0, 0)); SetPixel(hdc, 486, 183, RGB(0, 0, 0)); SetPixel(hdc, 486, 184, RGB(0, 0, 0));
Gods, man, have you never heard of a bitmap? :surprise:
reedbeta.com - developer blog, OpenGL demos, and other projects
#4
Posted 22 June 2011 - 08:12 PM
Or a for-loop at the very least.. :)
#5
Posted 23 June 2011 - 05:43 PM
Not bad for a first game, bu yes, use bitmap, setting pixels like that is slooooooooow
#6
Posted 23 June 2011 - 09:59 PM
Haha, the SetPixel-code is epic :D
#7
Posted 04 January 2012 - 07:44 AM
Epic? Yeah right.
Care to explain how to load a bitmap?
Quote
Not bad for a first game, bu yes, use bitmap, setting pixels like that is slooooooooow
Care to explain how to load a bitmap?
#8
Posted 04 January 2012 - 06:25 PM
Enthusiastic, have a look at this link.
reedbeta.com - developer blog, OpenGL demos, and other projects
#9
Posted 05 January 2012 - 05:04 AM
Reedbeta, I'm sorry if you think I haven't searched for tutorials(which I have), but none helped.
If a tutorial had helped, why would I have asked how to do it?
Plus, the first result that appears from relisoft is so obscure and everything is assigned into classes that I can't even break down what the hell I'm supposed to do after the second paragraph - it's confusing and not straight forward at all, plus I tried it and it just gave errors.
I didn't really understand it well enough. Same with most other tutorials.
Oh, and please click here: http://bit.ly/Ac0YHG
If a tutorial had helped, why would I have asked how to do it?
Plus, the first result that appears from relisoft is so obscure and everything is assigned into classes that I can't even break down what the hell I'm supposed to do after the second paragraph - it's confusing and not straight forward at all, plus I tried it and it just gave errors.
I didn't really understand it well enough. Same with most other tutorials.
Oh, and please click here: http://bit.ly/Ac0YHG
#10
Posted 05 January 2012 - 06:49 AM
Haha, okay, but note that your one-line question didn't show any evidence of having done any of your own research.
There are lots of people on the internet who seemingly want to be spoonfed all the information and without doing research of their own.
Anywhere, here is a specific link to the Windows API function that loads bitmaps. You can load a .bmp file quite easily by doing:
Select that into a device context created with CreateCompatibleDC or similar, and blit away. There is an example of doing this on the second link from that Google search, here (see the WM_PAINT handler under the section "Displaying Bitmaps").
Anywhere, here is a specific link to the Windows API function that loads bitmaps. You can load a .bmp file quite easily by doing:
HBITMAP hbitmap = (HBITMAP)LoadImage(0, "mybitmap.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
Select that into a device context created with CreateCompatibleDC or similar, and blit away. There is an example of doing this on the second link from that Google search, here (see the WM_PAINT handler under the section "Displaying Bitmaps").
reedbeta.com - developer blog, OpenGL demos, and other projects
#11
Posted 06 January 2012 - 02:21 PM
But, Reedbeta, isn't he a multiple award winner for his algorithms and assembly code?
Hyperbole is, like, the absolute best, most wonderful thing ever! However, you'd be an idiot to not think dogmatism is always bad.
#12
Posted 06 January 2012 - 11:01 PM
#13
Posted 09 January 2012 - 09:58 AM
You could have at least used a loop
SIR PLEASE HOLSTER I AM THE LAW
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












