Page 1 of 1

Here´s my lame Pacman project

Posted: March 11th, 2012, 1:55 am
by luskas
Yo Chili how are you man? Here´s my project. There´s plenty to do thou... I´m working on the win and lose messages.
I have a few questions if you can help me. Sorry i know that you probably busy.

I will put them in order so when you have the time you can give me a hand:

- First question is how can we put single text in framework? And how to change the fonts?

- Second is a pretty dumb question :)... Is how in the heck can i close the frame, quit the program, when the player push the 'Exit' button on Main Menu.

- Third is a little more complex... My doubt is when the player must choose one option from the Main Menu. The problem is that when Key Down is pressed to choose, for instance, the Options menu in Main Menu (of my game) the frames are refreshed so fast that the choice jumps from Option 1 (New Game) to Option 3 (Exit).
I kinda sort it out doing a for loop to give some time before the change of choice. But that´s no pretty programing :P.
What i need is that, at least when we are in the Main Menu screen, the kbd.DownIsPressed() would only regist one click at a time even if we keep the finger pressing the down button... Is that possible?


Thanks for your time bro! Your help is truly apreciated!!

Cheers!

Re: Here´s my lame Pacman project

Posted: March 11th, 2012, 9:16 am
by chili
Awesome stuff Brometheus, I'm impressed!

I will answer your questions soon, but I have one request: post your code. I know if you zip up the solution folder you get a huge file; that's because you need to clean it first.

How to clean:

Just delete the following files and folders if they exist.

Folders:
Release
Debug
Chili DirectX Framework\Release
Chili DirectX Framework\Debug
ipch

Files:
Chili DirectX Framework.sdf

If you clean it before zipping, it will be tiny. I'm interested in seeing your code!

Re: Here´s my lame Pacman project

Posted: March 11th, 2012, 10:43 am
by luskas
Oh man how disapointed you gonna be :)... Here it is! Thank you my friend

Re: Here´s my lame Pacman project

Posted: March 11th, 2012, 11:11 am
by chili
That's just crazy bro! Did you write that all graphics drawing code by hand??? Must have taken a lot of work :shock:

If you can put that much effort in, you will definately be able to realize an ambitious project once you've learned all the techniques.

Anyways, this Pacman clone is a lot cooler than what I'm going to cook up in the next lesson :D

Re: Here´s my lame Pacman project

Posted: March 11th, 2012, 11:30 am
by luskas
:D Yes it took me a lot of time... There´s any way to load a sprite into frame instead of drawing it everytime the frames refreshes?

Anyway i have another important question... THE SOUNDS :)

How can we put sounds into the game?

Thanks bro!

Ps: Oh i almost forget to say that i´m anxious to see your next tut movie... Cause i like to learn the right way to do stuff. I have some C and VB bases but sometimes i take approaches in the wrong way.
Thanks for everything!

Re: Here´s my lame Pacman project

Posted: March 12th, 2012, 8:07 am
by Raven
dude, thats fantastic! bravo sir.

good job :)

Re: Here´s my lame Pacman project

Posted: March 12th, 2012, 9:30 am
by luskas
Yo thanks Raven! You guys support is very important! Thanks

Re: Here´s my lame Pacman project

Posted: March 12th, 2012, 10:26 am
by Raven
how long have you been programming for luskas?

Re: Here´s my lame Pacman project

Posted: March 12th, 2012, 10:35 am
by luskas
Well i´ve made some projects back in the days of QBasic... That was around 20 years ago. Then i rather play than programming the games. After i went to university i had 2 programming chairs: C and C++. But they only cover the basics. I´ve came interested again in programming games but i started with Visual Basic, wich you can create some pretty decent games. Now i´m learning C++, the best by far, and i started like 1 month ago.
I´ve got some C++ bases so it was not hard for me to understand what´s going on in the code... But i feel that i still lack many knowledges that kept me from reaching ahead. I hope Chili support us becoming good game programmers :P.

Cheer Bro!

Re: Here´s my lame Pacman project

Posted: March 18th, 2012, 4:34 am
by chili
Hey luskas, sorry for the late reply.
luskas wrote:- First question is how can we put single text in framework? And how to change the fonts?
This will require us to be able load bitmap files into memory. I will cover this after arrays, pointers, structures, and file access. Stay tuned!
luskas wrote:- Second is a pretty dumb question ... Is how in the heck can i close the frame, quit the program, when the player push the 'Exit' button on Main Menu.
The Win32 API function PostQuitMessage() will handle this nicely for you. You need to keep track of the hWnd to be able to use it though.
luskas wrote:- Third is a little more complex... My doubt is when the player must choose one option from the Main Menu. The problem is that when Key Down is pressed to choose, for instance, the Options menu in Main Menu (of my game) the frames are refreshed so fast that the choice jumps from Option 1 (New Game) to Option 3 (Exit).
I will address this very issue in Lesson 12.
luskas wrote:Anyway i have another important question... THE SOUNDS How can we put sounds into the game?
This is something that I will not be talking about for some time to come I think. I consider audio to be somewhat of an afterthought. However, although I may not cover it for some time in the tutorials, I might write some audio code that can plug into the framework, and if I do, I'll post it on this forum.