Page 1 of 2

A very basic Pong game I made on Twitch.

PostPosted: Mon May 28, 2018 3:44 am
by NightOfHorror
GED files included and everything.

Very basic, and not really worth looking at or playing unless you want to look at some basic coding (which can be improved).

Still needs 3 things to be an overall better game:
1. Fair computer A.I, as right now I think it is impossible for the player to win.
2. Some shading on the sprites to make them more stylish.
3. Some basic sounds like when the ball hits a paddle and when a point is scored to add some character to the game.

Just a warm-up, and my way of saying I am back. I will be making more games on Twitch, and later on creating some focused tutorials on these games for youtube.

Re: A very basic Pong game I made on Twitch.

PostPosted: Mon May 28, 2018 5:47 am
by Kcee
Welcome back NOH, I'll be glad to help with the sprite shading.

Re: A very basic Pong game I made on Twitch.

PostPosted: Mon May 28, 2018 10:41 am
by lcl
Hi NoH! Great to hear you're back! :)

And congratz for creating the game! It could be improved, for sure, but it still is an accomplishment! Oh, and by the way, what do you mean when you say that you "made the game on Twitch". You mean you've been streaming your game making? If so, that's cool!

I found a bug though. If you click the paddle again after choosing the player, it will create a new ball. By abusing this it is actually possible to win the AI. :D The AI will only follow one of the balls, so it can actually miss all the other ones.

screenshot_I_win.png
I am the blue player, and as you can see, I'm just about to win


You can fix this by adding Event Disable events for the Mouse Button Down event on the paddle that is clicked as well. Currently you only disable the mouse event for the other paddle.

So: Blue_Paddle -> Mouse Button Down -> Event Disable -> Actor: Blue_Paddle, Event: Mouse Button Down
And same for the Red_Paddle, of course replacing Blue_Paddle with the red one in the Event Disable dialog.

But yeah, it's nice to have you back here, and even better to get to play a game you've made! :)

Re: A very basic Pong game I made on Twitch.

PostPosted: Mon May 28, 2018 4:55 pm
by NightOfHorror
Kcee wrote:Welcome back NOH, I'll be glad to help with the sprite shading.

That would be awesome! Perhaps I won't need help for the game I made above, it was really just a warm-up game for me to get me thinking about coding again. I am not going to lie, I love making games, but I am confused quite often, even at the most basic things. Going to really try to understand the logic behind why I do what I do, so I can try to wrap my brain around all of this.

lcl wrote:Hi NoH! Great to hear you're back! :)

And congratz for creating the game! It could be improved, for sure, but it still is an accomplishment! Oh, and by the way, what do you mean when you say that you "made the game on Twitch". You mean you've been streaming your game making? If so, that's cool!

I found a bug though. If you click the paddle again after choosing the player, it will create a new ball. By abusing this it is actually possible to win the AI. :D The AI will only follow one of the balls, so it can actually miss all the other ones.

screenshot_I_win.png


You can fix this by adding Event Disable events for the Mouse Button Down event on the paddle that is clicked as well. Currently you only disable the mouse event for the other paddle.
I did indeed stream me making this game. Thought it would be an interesting thing to do, and also a way to show off GE (of course I just started, so no one really watches me, but I don't really care).

Also, I should have seen that bug coming, but that was the last thing I did. Originally, the ball was already created at the start of the game, and just kept bouncing off the two paddles in a straight line, but I decided I didn't want that, so I set the ball to not be created until you select a paddle. Since I did it like that, you are absolutely right that I am going to need to disable being able to mouse select down on the "player" paddle as well since each time you select your own paddle, it creates the actor "Ball" as well.

Thanks for the catch! :D I will probably fix that next time I stream me making a game (tonight actually). Now I just have to decide what I should do next. I might go back to my old TTM days and make a space shooter like that, or maybe I will go for a platformer.
So: Blue_Paddle -> Mouse Button Down -> Event Disable -> Actor: Blue_Paddle, Event: Mouse Button Down
And same for the Red_Paddle, of course replacing Blue_Paddle with the red one in the Event Disable dialog.

But yeah, it's nice to have you back here, and even better to get to play a game you've made! :)

Re: A very basic Pong game I made on Twitch.

PostPosted: Mon May 28, 2018 4:57 pm
by NightOfHorror
Lastly, as I am sure you saw lcl, I separated all of the events into separate things to make it easier for myself even though I could have done everything in script editor. Going to work on cleaning up my coding to make it easier to find everything in one script rather than have a hundred different things (such as the physical response for the ball).

Re: A very basic Pong game I made on Twitch.

PostPosted: Mon May 28, 2018 5:19 pm
by lcl
NightOfHorror wrote:I am not going to lie, I love making games, but I am confused quite often, even at the most basic things. Going to really try to understand the logic behind why I do what I do, so I can try to wrap my brain around all of this.

Don't worry man, we're here to help you get going! :) Also, I think you could benefit from checking out the Game Editordocumentation. Especially the Getting Started section and its subpages, of which the most useful are:
And yeah, I'll add these to my GE tips post as well. Those pages are filled with useful information but are a little tricky to find if you don't know what you're looking for. I only found these pages recently.. after I'd already learned pretty much everything about using Game Editor. :roll:
NightOfHorror wrote:I did indeed stream me making this game. Thought it would be an interesting thing to do, and also a way to show off GE (of course I just started, so no one really watches me, but I don't really care).

Cool! That's a neat idea, I'd maybe like to try that at some point as well!

Re: A very basic Pong game I made on Twitch.

PostPosted: Mon May 28, 2018 5:30 pm
by NightOfHorror
Well, thank you very much lcl! :D

Definitely going to look at these to gain a better understanding of what I am working with.

Re: A very basic Pong game I made on Twitch.

PostPosted: Mon May 28, 2018 6:17 pm
by NightOfHorror
Also, lcl, I think it would be great if you streamed! You could definitely show off a lot more of GE than I can, so it would probably be more interesting to watch.

All I have is OBS, no webcam, just my not so beautiful voice. I think you should do it.

Re: A very basic Pong game I made on Twitch.

PostPosted: Mon May 28, 2018 8:41 pm
by Kcee
data.zip
Here is your new graphics, I did my best.
(763.03 KiB) Downloaded 181 times

Re: A very basic Pong game I made on Twitch.

PostPosted: Tue May 29, 2018 12:45 am
by NightOfHorror
Honestly, that looks much better than what my Pong game deserves. Thank you! That background looks great! :D

Re: A very basic Pong game I made on Twitch.

PostPosted: Tue May 29, 2018 4:14 am
by NightOfHorror
Okay, I updated the game to get rid of the bug lcl found, and I also used the improved graphics kcee did. I still haven't added the ball hit animations, but I will eventually. Still need to add sounds to give the game some feeling to it, and then create a more fair A.I, but for now I think I am done with this basic Pong game, unless another bug is found.

Thanks!

Re: A very basic Pong game I made on Twitch.

PostPosted: Tue May 29, 2018 6:20 am
by Kcee
NightOfHorror wrote:Honestly, that looks much better than what my Pong game deserves. Thank you! That background looks great! :D

Take it as a welcome back gift from me.

Re: A very basic Pong game I made on Twitch.

PostPosted: Wed May 30, 2018 9:31 pm
by Kcee
I think using my graphics kinda ruined your game, and I felt so guilty, so I fixed it for you and added some random ball movement but I couldn't fix the AI though.

Re: A very basic Pong game I made on Twitch.

PostPosted: Wed May 30, 2018 9:51 pm
by Kcee
I know a way to fix the A.I which might work: Create a variable, ''follow'',
then in the draw actor event of both paddles, put: follow=rand(5) //or any number, depending on how smart you want the A.I to be (reduce the number if you want it to be easy).
Then in the same event, put:
if (follow==0)
{
EventDisable (The event where the paddle follows the ball is);
}
else
{
EventEnable (the same event, not sure if this is necessary though);
}

Re: A very basic Pong game I made on Twitch.

PostPosted: Thu May 31, 2018 2:17 pm
by NightOfHorror
I don't think your graphics ruined my game. I had to readjust only one thing, which slightly affected the velocity of the ball I believe (could be wrong), but to be honest, I just think my coding is the problem, not your graphics. :P

As for the updated version, I put y=ball.y in the Draw Actor Event, so I am little confused if that would make the A.I become stupid if follow==0 since it could no longer check.