Kling Klong - aka Fart-Annoyed

The Partridge Family were neither partridges nor a family. Discuss.
User avatar
Yumtard
Posts: 575
Joined: January 19th, 2017, 10:28 pm
Location: Idiot from northern Europe

Re: Kling Klong - aka Fart-Annoyed

Post by Yumtard » February 16th, 2017, 2:34 pm

Dude this is legit :D
Great job!

User avatar
SlevinKelevra
Posts: 80
Joined: September 9th, 2013, 12:58 am
Location: Germany

Re: Kling Klong - aka Fart-Annoyed

Post by SlevinKelevra » February 16th, 2017, 3:09 pm

Thx Yumtard! :)

Btw, the paddle cooldown bug is fixed. Now each ball has its own paddle cooldown, which is reset when a brick or the wall is hit. Additionally, when doing the wall collision test, also the Rect from the paddle is passed to perform the overlap test. Thus the weird ball/wall/paddle stuff can be avoided.
Carpe noctem

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Kling Klong - aka Fart-Annoyed

Post by chili » February 16th, 2017, 3:14 pm

SlevinKelevra wrote:When will you introduce sprites? Or would you suggst using PutPixel for the animation?!
You can use the image -> putpixel conversion utility to make a sprites for a few frames of animation :D Or you can wait until I make it that far in the tuts (gonna take a bit yet). Or you can check out Yumtards thread, where I hook him up with the Surface class (which we will ultimately create in the tutorials).

If you want a good conversion util, go to http://www.planetchili.net -> discord channel #code-snippets
Chili

User avatar
SlevinKelevra
Posts: 80
Joined: September 9th, 2013, 12:58 am
Location: Germany

Re: Kling Klong - aka Fart-Annoyed

Post by SlevinKelevra » February 17th, 2017, 3:11 pm

Decided to take option 2: surface class from Yumtards thread

Added needed files and modifications to my project from your "add surface class and implement sprite drawing functions " commit in Yumtard's Spaceballs repo. Now I am able to load and display png files. First image is already included to game: a new paddle :)

Next I will try to add rolling animations for the power ups.
Carpe noctem

User avatar
SlevinKelevra
Posts: 80
Joined: September 9th, 2013, 12:58 am
Location: Germany

Re: Kling Klong - aka Fart-Annoyed

Post by SlevinKelevra » February 17th, 2017, 5:31 pm

Hey guys,

I have added a new drawSprite function to graphics, which can draw a "sub-image" from a surface. I want to use it for animations. First I thought it works fine, but the more I try to draw to the right of screen center, the more weird drawing bugs I get... It seems like the image would not be drawn completely. On the left side of the game screen I have no problems...

Could maybe someone have a look on it? I could not figure out what the problem is.

In the last commit there is some test code to show the problem. You can change the position of the falling power up in Game::ResetGame() below "TESTING".
Carpe noctem

User avatar
SlevinKelevra
Posts: 80
Joined: September 9th, 2013, 12:58 am
Location: Germany

Re: Kling Klong - aka Fart-Annoyed

Post by SlevinKelevra » February 17th, 2017, 7:20 pm

OMG! What a bug! Obviously it was my fault :). The problem is that I am "outside" of the screen when trying to draw the last sub-images from my surface sequence. Have just to adjust the out-of-screen-conditions.

Image
Carpe noctem

User avatar
SlevinKelevra
Posts: 80
Joined: September 9th, 2013, 12:58 am
Location: Germany

Re: Kling Klong - aka Fart-Annoyed

Post by SlevinKelevra » February 17th, 2017, 9:32 pm

- added animations for each power up
- added explosion of paddle when game over
- added game over screen
Carpe noctem

User avatar
Yumtard
Posts: 575
Joined: January 19th, 2017, 10:28 pm
Location: Idiot from northern Europe

Re: Kling Klong - aka Fart-Annoyed

Post by Yumtard » February 17th, 2017, 10:05 pm

awesome

User avatar
SlevinKelevra
Posts: 80
Joined: September 9th, 2013, 12:58 am
Location: Germany

Re: Kling Klong - aka Fart-Annoyed

Post by SlevinKelevra » February 17th, 2017, 10:12 pm

Yumtard wrote:awesome
awesome is your spaceballs game Yumtard! This is also what my wife said when she saw it :). Really cool effects, especially the stars! Keep on going!
Carpe noctem

User avatar
Yumtard
Posts: 575
Joined: January 19th, 2017, 10:28 pm
Location: Idiot from northern Europe

Re: Kling Klong - aka Fart-Annoyed

Post by Yumtard » February 18th, 2017, 1:01 am

Thanks :D Glad you and your wife enjoyed it :)
I've had plenty of help from chili and albinopapa though :)

Post Reply