My first game

feedback?

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

41 Replies - 3822 Views - Last Post: 19 July 2008 - 12:40 PM Rate Topic: -----

#16 gabehabe   User is offline

  • GabehabeSwamp
  • member icon




Reputation: 1440
  • View blog
  • Posts: 11,025
  • Joined: 06-February 08

Re: My first game

Posted 17 July 2008 - 12:48 PM

OK, noted. I'm gonna work on a version 2 tonight :)

Thanks for the advice!
Was This Post Helpful? 0
  • +
  • -

#17 Recoil   User is offline

  • D.I.C Addict

Reputation: 51
  • View blog
  • Posts: 504
  • Joined: 28-June 08

Re: My first game

Posted 17 July 2008 - 01:32 PM

OK, people are saying that the ball moves too fast? When I loaded it, I had more than ample time to move the paddles because the ball was moving very slowly...perhaps my system is lacking something, or has anyone else had the ball move very slow?
Was This Post Helpful? 0
  • +
  • -

#18 Tom9729   User is offline

  • Segmentation fault
  • member icon

Reputation: 181
  • View blog
  • Posts: 2,642
  • Joined: 30-December 07

Re: My first game

Posted 17 July 2008 - 01:41 PM

View PostRecoil, on 17 Jul, 2008 - 04:32 PM, said:

OK, people are saying that the ball moves too fast? When I loaded it, I had more than ample time to move the paddles because the ball was moving very slowly...perhaps my system is lacking something, or has anyone else had the ball move very slow?

There's no timer so the game is going to run at different speeds on different machines.

gabehabe probably designed it to run normally on his machine. The people that it runs too fast for probably have faster computers than him. You probably have a slower computer. :P
Was This Post Helpful? 0
  • +
  • -

#19 WolfCoder   User is offline

  • Isn't a volcano just an angry hill?
  • member icon


Reputation: 828
  • View blog
  • Posts: 7,696
  • Joined: 05-May 05

Re: My first game

Posted 17 July 2008 - 01:50 PM

View Postgabehabe, on 17 Jul, 2008 - 12:58 PM, said:

"I'm not as good as you think I am."

Fishing for compliments will get you nowhere. :P


Fishing for compliments?
Are you staying up too late or something?
I'm trying to tell you that it looks like you compliment too much or too easily.
Was This Post Helpful? 0
  • +
  • -

#20 gabehabe   User is offline

  • GabehabeSwamp
  • member icon




Reputation: 1440
  • View blog
  • Posts: 11,025
  • Joined: 06-February 08

Re: My first game

Posted 17 July 2008 - 01:58 PM

When you say "I'm not as good as you think I am" it sounds like you're fishing.

And I don't give out compliments too often, you should appreciate it ;)

And yeah, I just used SDL_Delay to do it, but ***n00b moment*** I thought that was classed as a timer :blush:
Was This Post Helpful? 0
  • +
  • -

#21 Tom9729   User is offline

  • Segmentation fault
  • member icon

Reputation: 181
  • View blog
  • Posts: 2,642
  • Joined: 30-December 07

Re: My first game

Posted 17 July 2008 - 07:54 PM

You may already know what you have to do, but in case you don't here you go because I'm too tired to explain it. :)
Was This Post Helpful? 0
  • +
  • -

#22 lanec42   User is offline

  • D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 229
  • Joined: 26-March 08

Re: My first game

Posted 17 July 2008 - 07:58 PM

Very cool, gabehabe. I'm looking forward to a version with a timer. :pirate: :^:
Was This Post Helpful? 0
  • +
  • -

#23 gabehabe   User is offline

  • GabehabeSwamp
  • member icon




Reputation: 1440
  • View blog
  • Posts: 11,025
  • Joined: 06-February 08

Re: My first game

Posted 18 July 2008 - 02:49 AM

Thanks Tom, I have read a little about it, but that clarified it a bit more :^:
Was This Post Helpful? 0
  • +
  • -

#24 gabehabe   User is offline

  • GabehabeSwamp
  • member icon




Reputation: 1440
  • View blog
  • Posts: 11,025
  • Joined: 06-February 08

Re: My first game

Posted 18 July 2008 - 05:44 AM

Most likely the last version I'll do for a while now, I'm gonna leave a 2 player version for another time.

Updates:
  • Added a timer
  • Added a menu
  • Added "help"
  • Added "about"
  • Added 1P v CPU option

:)

Here it is: Attached File  pong.zip (1.63MB)
Number of downloads: 154

Final thoughts?
Was This Post Helpful? 0
  • +
  • -

#25 Rickster0   User is offline

  • D.I.C Head
  • member icon

Reputation: 16
  • View blog
  • Posts: 236
  • Joined: 08-July 08

Re: My first game

Posted 18 July 2008 - 05:46 AM

:w00t: well done

i wish i could learn to do something like this :cry2:
Was This Post Helpful? 0
  • +
  • -

#26 gabehabe   User is offline

  • GabehabeSwamp
  • member icon




Reputation: 1440
  • View blog
  • Posts: 11,025
  • Joined: 06-February 08

Re: My first game

Posted 18 July 2008 - 07:57 AM

You'll learn someday :)

Take a look at the source code, it's included under ./src of the zip ^_^
Was This Post Helpful? 0
  • +
  • -

#27 Trogdor   User is offline

  • D.I.C Addict
  • member icon

Reputation: 15
  • View blog
  • Posts: 627
  • Joined: 06-October 06

Re: My first game

Posted 18 July 2008 - 09:37 AM

gebehabe, are you using the sdl mainloop to arrange the timings for you?
it jumps all over when i run it in parallels on my mac.

atlantis does its delaying like this:
		if (thenTicks > 0) {
			nowTicks = SDL_GetTicks ();
			delay += (1000/fps - (nowTicks-thenTicks));
			thenTicks = nowTicks;
			if (delay < 0)
				delay = 1000/fps;
		}
		else {
			thenTicks = SDL_GetTicks ();
		}

		SDL_Delay (delay);



another way is described in the manual at intro.en/usingtimers.html

from the manual:
Tip:
In general, when implementing a game, it is better to move objects in the game based on time rather than on framerate. This produces consistent gameplay on both fast and slow systems.

hope this helps.
Was This Post Helpful? 0
  • +
  • -

#28 Tom9729   User is offline

  • Segmentation fault
  • member icon

Reputation: 181
  • View blog
  • Posts: 2,642
  • Joined: 30-December 07

Re: My first game

Posted 18 July 2008 - 09:50 AM

View PostTrogdor, on 18 Jul, 2008 - 12:37 PM, said:

Tip:
In general, when implementing a game, it is better to move objects in the game based on time rather than on framerate. This produces consistent gameplay on both fast and slow systems.

hope this helps.

I think we could argue over that.

Might just be a personal preference, but I would prefer my games to sync to the framerate, and then have a modifiable 'game speed' parameter. If you're playing on an old computer that can't stick with whatever the framerate is set at, lower the framerate and increase the gamespeed (this could be done automatically).

May cause problems with multiplayer games though. :P
Was This Post Helpful? 0
  • +
  • -

#29 PsychoCoder   User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1663
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: My first game

Posted 18 July 2008 - 10:15 AM

Why are the controls backwards? When I press the Up arrow the paddle goes down, and visa verca
Was This Post Helpful? 0
  • +
  • -

#30 gabehabe   User is offline

  • GabehabeSwamp
  • member icon




Reputation: 1440
  • View blog
  • Posts: 11,025
  • Joined: 06-February 08

Re: My first game

Posted 18 July 2008 - 10:46 AM

It's supposed to be like that.

The left paddle will move up, and the right paddle will move down.

Kind of a pong spin-off sorta thing :)
Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3