Fybertech Forums
February 25, 2021, 02:58:13 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: 06/21/08 - Fybertech: Forgotten History
06/13/08 - Fybertech: The De Novo Project, part 14
06/04/08 - Fybertech: The De Novo Project, part 13
 
   Home   Help Search Calendar Members Login Register  
Pages: [1]
  Print  
Author Topic: Fypong  (Read 10323 times)
FyberOptic
King of Earth
Administrator
*****
Posts: 2521


Oh god what is that?


WWW
« on: August 31, 2008, 08:14:22 PM »

I've been messing with this Clanlib game development library for C++, which makes it easier to actually make a game, instead of fooling around with underlying code for sounds and images and sprites all day.  So far I like it pretty well, and recommend it to anyone else with knowledge of C++ to give it a shot.

So while experimenting with its features, I kind of worked them into a little test app.  It cycles colors, draws a semi-transparent background, renders the play objects onto a secondary canvas and rotates it in the corner, etc.  Then I thought it was almost demo material enough to upload for folks to check out, so I added in a ball, collision detection, generated some sounds and such, and it ended up being a fun little diddy to mess with. 

Download Fypong v0.1

GAMEPLAY: ARROW KEYS MOVE PADDLE.  BOUNCE BALL.  IT'S PONG.


p.s.  I was getting an fps of around 600, so I'm curious to know what other folks get with it, to use as a reference of the performance of the code and the Clanlib library and all that.  I'd also be curious of any serious stuttering or gameplay problems, which could be attributed to things on different PCs.

« Last Edit: September 01, 2008, 10:55:09 PM by FyberOptic » Logged
Boris
The Money Man
Collguy
*
Posts: 674


Implying I need a job


WWW
« Reply #1 on: August 31, 2008, 08:56:13 PM »

For memories sake:

I get about 445 frames with vsync off, though the limiting factor seems to be Vista or my video card.

Also, my vid card properties were set to 'allow program to decide vsync' and vsync still kicked in so either it happens by default or something.
Logged

<Armature> i just really want centaur Azula
FyberOptic
King of Earth
Administrator
*****
Posts: 2521


Oh god what is that?


WWW
« Reply #2 on: September 01, 2008, 12:20:00 AM »

I'll post my screenshot I took earlier here so that folks can make sure theirs looks right:

Logged
MDude
Meticulous Maniac
Hero Member
*****
Posts: 638


Enjoy machine world.


WWW
« Reply #3 on: September 01, 2008, 09:14:24 PM »

And for comparison, here's what I'm getting:

Logged
FyberOptic
King of Earth
Administrator
*****
Posts: 2521


Oh god what is that?


WWW
« Reply #4 on: September 01, 2008, 10:59:33 PM »

I think you're getting that because something about your computer, video card, or the clanlib code, is causing the canvas object (which creates a second opengl context) to actually use the first one for rendering for some reason.  Either way I want to get to the bottom of it.

But I've disabled the canvas for this newest version anyway..!

Download Fypong v0.2

I'll probably change the name eventually since I have a game idea, but it's fine for now.  Basically I came to the conclusion that I wanted to do a combination of Pong and Space Invaders.  So I created a couple frames of an alien animation, figured out the collision detection of clanlib, and wrote in the confusing code to make it properly bounce off of them (for now). 

This version also has improved controls.  The arrow keys accelerate the paddle so that you can tap the buttons for finer control.  You can also use the mouse now!  Let me know of any issues and such iffin you try it out.  Mind you that nothing ever really happens in this; you just bounce it off of aliens, they turn red with each hit, and eventually they float off the bottom of the screen.



Logged
FyberOptic
King of Earth
Administrator
*****
Posts: 2521


Oh god what is that?


WWW
« Reply #5 on: September 02, 2008, 10:37:54 PM »

A bigger update, sort of.  Now when the ball bumps into the aliens from the side, they get knocked crooked.  From there, they continue downwards on this crooked path.  The code for this was tricky, since it involves detecting where exactly the collision happened, combined with rotation of the enemies on top of that.  So if you see anything crazy happen, it might be worth mentioning here.

The aliums shoot now too, and will shoot crookedly when applicable.  The shots are just absorbed into the paddle for now, so it doesn't hurt anything to get hit by them. 

There's other misc fixes and updates, some of which improved the framerate a bit, but by the time I added in all the extra collision detection, it probably brought it back down..!  Also, the ball actually starts at a random speed now, since I had forgotten to initialize the random seed before.  ^^;;


Download Fypong v0.3



Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.092 seconds with 18 queries.