|
|||||||
| Forum Home | Register | Members List | Mark Forums Read |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#41 | |||||||||
|
Member
Location: Tuckahoe, NY |
Quote:
Code:
case WM_PAINT:
{
hdc = BeginPaint(hWnd, &ps)
HDC memDC = CreateCompatibleDC ( hdc );
HBITMAP oldBM = (HBITMAP)SelectObject(hdc, paddle_BMP);
BitBlt(hdc, player1.x, player2.y, paddle_BMP.width, paddle_BMP.height, memDC, 0, 0, NULL);
SelectObject(memDC, oldBM);
DelectObject(memDC);
}
Now the syntax of this is probably not correct, but I hope you get the general idea of what I am trying to do. This is called the first time and the x and y values are set prior to this. Now in my game loop I basically call the WindowProcess for painting every time. If there is user input to the keyboard it will change the values in the paddle struct, which player1 and player2 are. So it is coming back to this point with the correct values but there are no changes on the screen. It just paints the original paddle and that's it. I was working on trying to make the code organized, but in the end I was just trying to get it to work and lost good programming practices . Hopefully, this gives you a better idea of what I was trying to do. |
|||||||||
|
|
|
|
#42 | ||||||||
|
Senior Member
Location: London |
ok it's been a long time since I've done drawing using msgproc events, but if I recall correctly WM_PAINT is only passed when something happens to the window to make windows redraw it eg. Being moved or resized. So you need to tell your program to update it from your game loop. I think the function to do this is called RedrawWindow(). Look it up on MSDN.
|
||||||||
|
|
|
|
#43 | ||||||||
|
Moderator
Location: Netherlands |
Alright, my Pong is pretty much finished. I just need to record the last two sound effects which I forgot, and then it's ready to roll. Hopefully I can get some quiet time later today, and then I'll put it online. It turned out weird. I hope you like it. :P
Edit - OK! It's done! Well, There are bound to be awkward bugs left, but I feel it is presentable. You can play the game here: Pongtrix I would like you to play it yourself to find out what my twist is. If you can't be bothered, highlight the section below. Some notes: you control it using the arrow keys, and you can mute it with the 's' key. The goal is to get either score counter to 10, but make sure the difference between the two scores never exceeds 3! Hard mode is more an experimental mode—I'm not sure if it is even possible to finish it on hard mode (I certainly haven't ). The end screen is the same as in easy mode though, so completionists don't need to worry...Any comments are welcome! ![]() <spoiler> It's a Pong/Tetris/Breakout mashup! You control the Tetris blocks, which disappear when hit in easy mode (the 'Breakout'-part). Making lines with the Tetris blocks doesn't make them disappear, so you have to manage your blocks carefully (especially in hard mode...) </spoiler>
__________________
I'm a web developer by profession, but a game developer by heart. Uh oh! The princess is in another signature! Last edited by Protector one : 11-16-2008 at 06:17 AM. Reason: Added awesomeness. |
||||||||
|
|
|
|
#44 | ||||||||
|
Junior Member
|
the pongtris was fun and a bit strange to play.
Wish I had time to make an entry but got to much other (school related) stuff to do atm. |
||||||||
|
|
|
|
#45 | ||||||||
|
Member
Location: Turin, Italy |
I have seen this challenge only today!!! I hope to be able to partecipate in future challenges... |
||||||||
|
|
|
|
#46 | ||||||||
|
Senior Member
Location: London |
I've been working on a website where people can upload their entries, but it's not ready right now (and I've got a busy day ahead), so if you want to submit your entry either upload it to your own webspace & post the link here (I'll edit the first post with all of the entries), or you can PM me & I'll give you an e-mail address to send the files to, which will then be uploaded onto a web server.
The Judges for this competition will be dmcclure, Gshonk and TG1. Judging wont begin until at least tomorrow, so you have until the end of the day to get your entries in (and maybe a little of tomorrow - we have very flexible deadlines in the games industry ). |
||||||||
|
|
|
|
#47 | ||||||||
|
Member
Location: Atlanta, GA |
Freakin awesome pong man. it was quite strange but fun at the same time. keep it up man!
__________________
The only Verdict is Vengence a Vendetta, held as a Votive not in Vain, for the Value and Veracity of such shall one day Vindicate the Vigilant and the Virtuous. |
||||||||
|
|
|
|
#48 | ||||||||
|
Senior Member
Location: London |
Well it's not got everything I'd hoped to fit in, but it's fairly playable.
http://www.secondconflict.com/GPC/data/PongBlast.zip The game will work with one or two players sharing a keyboard (although if you have a wired xbox 360 controller, that should work too). It was build using the XNA3.0 framework so you may need to download & install that to run it. |
||||||||
|
|
|
|
#49 | ||||||||
|
Senior Member
Location: London |
why is it that whenever you upload and post about a file, you always discover something wrong with it? (or in my case 3 things wrong with it) I've just updated my zip now.
|
||||||||
|
|
|
|
#50 | ||||||||
|
Moderator
Location: Philadelphia, PA |
Are there only 3 entries? Claxon's, martin.bilello's, and Protector one's?
__________________
Grant Shonkwiler() "I would love to fix the world if someone would just give me the source code" Website Industry blog LinkedIn |
||||||||
|
|
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Powered by vBulletin® Version 3.6.9
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
All times are GMT -8. The time now is 05:33 PM.















. Hopefully, this gives you a better idea of what I was trying to do.




). The end screen is the same as in easy mode though, so completionists don't need to worry...



I have seen this challenge only today!!! I hope to be able to partecipate in future challenges...
Linear Mode

