Jump to content



Photo

Pong!


  • Please log in to reply
11 replies to this topic

#1 zcoacoaz

zcoacoaz

    Forever writing useless yet interesting scripts

  • Active Members
  • PipPipPipPipPipPip
  • 805 posts

Posted 03 September 2006 - 08:01 PM

I had left these forums completely but recently I got bored and made a pong game with autoit. I decided you guys would enjoy it and I should share. I probably won't continue to come here after this post (at least not often)

The pong game features automatic pausing and a few options, it is by no means perfect.
To change the various options just open the script in your favorite editor.
To pause, select another window. If you are playing with no window besides the game itself just move the mouse and click on the taskbar really quickly.

I tried to comment upon lots of the script but there are some parts where I was too busy making it work to write a comment.

EDIT: By the way, you don't use the arrow keys to control the paddle. You use the mouse.

EDIT2: The script now no longer says "You won!" when you lose.

EDIT3: Now you can choose to make it pause in between serves. Click to continue. (Also, you can restart your game)

EDIT4: More comments added, and now the ball can start going a random direction (If you want)

EDIT5: The whole script has been commented on now (i know there a few I don't need, but I like to be thurough). The physics have been tweaked a bit also. (If you hit the ball with the middle of your paddle it slows down a little bit)

EDIT6: Now there is an option to show the FPS and an option to make the CPU paddle move a little choppier (to boost fps) I will probably stop developing this game now and move on to something else (Breakout!)

Attached Files

  • Attached File  Pong.au3   15.08K   721 downloads

Edited by Xenogis, 04 September 2006 - 01:15 AM.

If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine) ----------------------------------------------------------------------------------------------------------The newbies need to stop stealing avatars!!! It is confusing!!





#2 Paulie

Paulie

    Waiting for Misaki Nakahara

  • Active Members
  • PipPipPipPipPipPip
  • 5,103 posts

Posted 03 September 2006 - 08:17 PM

I had left these forums completely but recently I got bored and made a pong game with autoit. I decided you guys would enjoy it and I should share. I probably won't continue to come here after this post (at least not often)

The pong game features automatic pausing and a few options, it is by no means perfect.
To change the various options just open the script in your favorite editor.
To pause, select another window. If you are playing with no window besides the game itself just move the mouse and click on the taskbar really quickly.

I tried to comment upon lots of the script but there are some parts where I was too busy making it work to write a comment.

I like it, but it has a glitch that sorta messes it up

the ball sometimes randomly gets stuck on you side, and will bounce very quickly back and forth scoring points for the computer, but other than that, nice job, physics must've taken FOREVER
I'm still looking for my heart song.

Posted Image


#3 SmOke_N

SmOke_N

    It's not what you know ... It's what you can prove!

  • Moderators
  • 15,729 posts

Posted 03 September 2006 - 08:34 PM

Welcome back Xegnogis!

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.


#4 zcoacoaz

zcoacoaz

    Forever writing useless yet interesting scripts

  • Active Members
  • PipPipPipPipPipPip
  • 805 posts

Posted 03 September 2006 - 08:35 PM

That's one glitch that hasn't happened to me, if I can I'll try and fix it. Another glitch was it says "You won!" even when you lose. I am updating the script to not do that right now though.

EDIT: The physics were actually really easy compared to what I thought they'd be like. The hardest part of the whole script was actually getting the mouse to disappear and reappear correctly.

Edited by Xenogis, 03 September 2006 - 08:42 PM.

If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine) ----------------------------------------------------------------------------------------------------------The newbies need to stop stealing avatars!!! It is confusing!!

#5 Paulie

Paulie

    Waiting for Misaki Nakahara

  • Active Members
  • PipPipPipPipPipPip
  • 5,103 posts

Posted 03 September 2006 - 08:47 PM

That's one glitch that hasn't happened to me, if I can I'll try and fix it. Another glitch was it says "You won!" even when you lose. I am updating the script to not do that right now though.

EDIT: The physics were actually really easy compared to what I thought they'd be like. The hardest part of the whole script was actually getting the mouse to disappear and reappear correctly.

By increasing the size varible, i found the cause of the glitch

after you get scored on, the ball is instantly moved to the center and then instantly shot off toward the upper-left corner, if you could put a pause in the score, so that after the score, something must happen before the ball starts to move again, it should fix the problem
I'm still looking for my heart song.

Posted Image


#6 zcoacoaz

zcoacoaz

    Forever writing useless yet interesting scripts

  • Active Members
  • PipPipPipPipPipPip
  • 805 posts

Posted 03 September 2006 - 09:00 PM

Okay, I have made it so if the player wants they can make it so you have to click in between each serve. I have also made it so you can click after the game ends to restart. Uploading right now.
If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine) ----------------------------------------------------------------------------------------------------------The newbies need to stop stealing avatars!!! It is confusing!!

#7 Simucal

Simucal

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 777 posts

Posted 03 September 2006 - 09:17 PM

Very nice work. Rather than have the ball shoot to the same place each time you start, make it random. Keep it up, i'm impressed!
AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)

#8 zcoacoaz

zcoacoaz

    Forever writing useless yet interesting scripts

  • Active Members
  • PipPipPipPipPipPip
  • 805 posts

Posted 03 September 2006 - 09:41 PM

Very nice work. Rather than have the ball shoot to the same place each time you start, make it random. Keep it up, i'm impressed!

Good idea, now I have done that and I have also added more comments to the code.
If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine) ----------------------------------------------------------------------------------------------------------The newbies need to stop stealing avatars!!! It is confusing!!

#9 Lakes

Lakes

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 760 posts

Posted 04 September 2006 - 01:10 AM

Good idea, now I have done that and I have also added more comments to the code.


Next project, make a BrickOut Game! :P

#10 zcoacoaz

zcoacoaz

    Forever writing useless yet interesting scripts

  • Active Members
  • PipPipPipPipPipPip
  • 805 posts

Posted 04 September 2006 - 01:12 AM

Next project, make a BrickOut Game! :P

I've been planning on that, hopefully I'll do it soon. It will be easy because I can just copy & paste the physics system I use in this game to that one.
If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine) ----------------------------------------------------------------------------------------------------------The newbies need to stop stealing avatars!!! It is confusing!!

#11 Lakes

Lakes

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 760 posts

Posted 04 September 2006 - 01:18 AM

I've been planning on that, hopefully I'll do it soon. It will be easy because I can just copy & paste the physics system I use in this game to that one.


Cool!, that was my thinking also. :P

#12 Rad

Rad

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 412 posts

Posted 18 October 2006 - 05:21 AM

all this needs is a few uses of Beep()
LOL!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users