Archived

This topic is now archived and is closed to further replies.

DyDx

Pong w/ SDL completed except for one thing...

Recommended Posts

Hey all, I just finished my first complete 2d game, a simple implementation of pong using SDL. Here is the source code and executable (SDL.dll included) - http://mysite.verizon.net/vze4kqtt/pong.rar My problem: due to the way input is taken by SDL (in main.cpp), sometimes the paddles move at a crawl. Most of the time they''re fine, but sometimes for a-hard-to-pinpoint reason, it slows down a LOT. I don''t know how to fix this but I have an idea: change it so that if both left and right are pressed at the same time, the x velocity is changed to 0? This might fix it, but I can''t check because I''m not sure how to check for multiple keys being pressed at once with SDL - I''ll look into that. Thanks.

Share this post


Link to post
Share on other sites
if you have problems with the link, paste this in another browser window:

http://mysite.verizon.net/vze4kqtt/

and select "Save link as..." or "Save target as..." (or to that extent) on the DOWNLOAD link and save it to your harddrive, changing the extension to say .rar

[edited by - DyDx on March 2, 2003 11:13:16 PM]

Share this post


Link to post
Share on other sites
Downloaded it.
Played it with a friend of mine for half an hour. (I won =D)
Sorry, your error didn''t occur. Maybe it''s because of a sudden framerate drop?? Check your CPU usage when it drops.

Share this post


Link to post
Share on other sites
quote:
Original post by RizMan
I downloaded. But then while extracting, I got a CRC check failed error on every single file.


Bah, I''ll put it in a zip instead of a rar when I get home later. (I''m at school now)

Share this post


Link to post
Share on other sites
It''s ok. I downloaded it again. Now it works. Must have been a problem during the download.
Anyway I noticed your problem but I can''t tell you what to do. I''m quite new to SDL too. Started to work with it only a few days ago.

Anyway, the game looks nice. Reminds me of my first steps on my dad''s computer

Share this post


Link to post
Share on other sites