[Include] 1v1 Pong Minigame
#1

1v1 Pong Minigame


This is an Include I've worked on since a while, but I don't really have a use for it so I'll release it.

It's the classic Pong Game, drawn with MaterialText and Objects on an LCD Screen.


You can place the TVs anywhere and players can play on them.
If two players are playing, others can see their game on the Screen and also hear the Game's sounds if close enough.

The first one who joins the game will be the host and he can change the settings and start it once someone joins.

There are some defines you can use to change the screen size, base speed, colors or sounds.


Usage

To use it in a gamemode or filterscript you simply have to include the file.
You can now use the function CreatePongGame to create a "Pong TV" somewhere.

To make players able to join it, you can add a command for hosting a game, joining a game and leaving a game.
See the example Filterscript for a simple example on how to add, start and delete them.


Screenshots/Videos


Here are a few screenshot so you can see how it looks:

https://imgur.com/a/rZBiW

As you can see, you can watch others' games from outside.

Here's a short video (playing one game):

https://www.youtube.com/watch?v=mWCAQ_cNtrA


Notes

- Rotating the TV Screen on the Y Axis does not yet work correctly. Rotating it on the X or Z Axis works as expected.
- If you place many Screens it's recommended to higher the Timer Interval (however it only matters how many games are played simultanously).
- When ingame, other players are still visible for the ones playing.

Bugs/Issues

- No bugs known, please report any bugs you find.
- Because everything is processed server-sided, it might be extremely hard for players with high pings to react properly.


Download

GitHUB: https://github.com/Naseband/SAMP-Pong

See the filterscripts folder for an Example FS. It allows to manage Pong TVs when logged into RCON and playing with others and should give you an idea how to implement it.

The Include uses Incognito's Streamer Plugin for all Objects, include it before pong.inc.
Reply
#2

Quote:
Originally Posted by Killa[DGZ]
View Post
Haha good one, this brings back the memories thats for sure,

I do however suggest this is changed to the moveobject method to see how it plays, it's actually quite a powerful method of time keeping and adjusting game speed live in my opinion, plus it will handle far more than 10 games at a time.

Anyway, it's a brilliant release an you should be very proud of yourself
Yea, I'm currently working on that. including better ball reflection


Thanks!
Reply
#3

Something out of the ordinary, looks awesome. 5/5!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)