[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


Messages In This Thread
1v1 Pong Minigame - by NaS - 12.03.2018, 21:38
Re: 1v1 Pong Minigame - by NaS - 13.03.2018, 13:40
Re: 1v1 Pong Minigame - by RedFusion - 24.03.2019, 15:03

Forum Jump:


Users browsing this thread: 1 Guest(s)