Page 1 of 1

Our multiplayer gaming project

Posted: 15 Jul 2023 22:00
by 2kadmin
This is something I have been thinking about for a while and now the Pi shortages are coming to the end it's time to start building it.

The main idea is to come up with a unit you can put down on any table, pull up 4 chairs and have some 4 player fun. To start with using Pi 4's but the idea is open source and all the parts are off the shelf. So we encourage people to take the concept and tweak it to their needs.

The one we are going to try building is starting to take shape and here is the current build idea:

4x Raspberry Pi 4b
1x Raspberry Pi 400
4x POE hats
1x network switch with at least 4 POE ports
1x hard drive
5x network cables
4x game controllers
4x monitors
4x HDMI cables

(Optional extra) 1x video multiplexer

Target size 20cm cubed

So the rough idea is 4x Pi one for each player. All powered by POE from the network switch that also networks up all the units.

The Pi 400, if pokey enough, will be a central server that can run as a game server and control the other machines. Ideally all the Pi's can boot over the network too from the same hard drive but unique users.

Ideally having the home folders of all the Pi on a central drive too and some sort of routine running that can scrub any game data and keep a log.

The concept being you can sit down and create a player and play for a bit. Then someone else can do the same once your done. At the end you can see the stats of all players from this session and compare it to all sessions.

One of the main design goals is to have something you can set up in minutes easily and only need one or two plug sockets to power the whole thing.

The screen sizes will most likely change the energy budget the most. Probably the smallest will be something like a 7 inch screen but most likely have it connect to a full size HDMI socket so can be changed to something bigger if needed.

The optional video multiplexer will record the 4 players screens and either record it or can be streamed to the internet, or even just displayed on another screen.

The cube would hold the 4 players Pi's, network / POE switch HD and all the cabling. With a single power socket to provide power to it all. Then maybe a single power source for all the screens, come good ones that work with USB power could run of a single USB power supply. Or you could have 4 bigger monitors with their own power systems.

So far have managed to get a few Pi's to play with. Have tested them out with a POE hat and run one of them off a POE switch. Quite happy with this and need to get three more POE hats so can spin up 4 Pis.

Then work out what size network cable will nicely connect up the Pis to the switch. Then I need to get my head round netbooting and see if the Pi 400 is powerful enough to cope with pulling it all together. The 400 idea is that you then have the keyboard that will let you do some things like spin up new players, stream the feed and serve the games.

The target games for testing are Super Tux Cart, Doom 2 and Duke Nukem 3D as they all have local multiplayer and seem to run OK on the Pi.

The overall idea is to make something that encourages people to get round the same table and do some gaming in the same location. Taunts are so much better with eye contact. :p

Re: Our multiplayer gaming project

Posted: 04 Oct 2023 20:14
by 2kadmin
As the saying goes.... Hardware is hard!

Been slowly getting all the bits in place to make this project work then the lovely people at Pi central decided to drop the Raspberry Pi 5 news... YAY.

As I expected the version 5 Pi seems much more capable to cope with the games software I am hoping to run. It sounds like it can cope with SuperTuxCart out of the box which is great.... OpenArena still needs a bit more power or optimization to get enough fps to be fun.

Have learnt a lot about the hardware and to start with I must say I'm not a big fan of the microHDMI format. Seems a very fragile connector. Also have had a massive learning curve on the networking side. I was using old network cables I had laying around that worked fine to deliver the POE power but not the network data. That wasted a lot of time.

Likewise I've been having fun playing around with how to Netboot the Pis, boot from USB drive and learning how to auto launch programs. As I said at the beginning, hardware is hard. It's so much easier to wipe a SD card and start again from scratch than it is to find a hardware problem and fix it. Not to mention the cost of re-buying things because what you thought would work did not in the end.

If there is one takeaway I have learnt is that what I want to build is not that hard.... But it's no walk in the park either. If you have problems debugging them is a pain in the....

Still not sure if there is a product at the end of this experiment or more a how to build it yourself guide or both. Time will tell.

Re: Our multiplayer gaming project

Posted: 25 Dec 2023 02:39
by 2kadmin
Image

So this Christmas eve I got to properly test out a multi player game test.

I had a Pi 400 running as the game server (SuperTuxKart) and playing some background music. All off a standard SD card with the only noticeable problem that the music would stutter occasionally when loading up the next track. Moving over to a faster drive would probably fix that.

Settled on SuperTuxKart mostly because it had the best controller support from the games I tested. Which were mostly the free and open source games. Also the networking seems to work well and and you can run a headless server for the game.

I still have not got my head around getting the LAN working without internet connection but it's not a problem at the moment. The Pi 400 goes to a small router that is connect to the internet and also to the two Pi 5's that are running the games.

The Pi 5's are running off an SSD drive to speed things up a bit. I've found a good compromise setting where you seem to get a nice look without tanking the FPS count. Give it a hint of lighting and around 30+ fps.

When looking for a nice monitor I noticed some of them had a 5V USB socket on the back. So I had to try and YES! You can run the Pi 5 off the USB socket on the back of the monitor.... But I did blow up one of the PSU plugs that shipped with the monitors. So I grabbed an old PC PSU and used the 12V output from that to power both monitors and the Pi's.

So along with the Pi 400 and router it all ran off just 3 plugs. One for the PSU, one for the router and one for the controller.... Except that was actually running off a large power bank for this experiment and after being on for over 6 hours still had over 40% left. Though it was plugged into a telly for nice sound. I reckon eventually it will work like the Pi 4's and run off the 12V PSU via the USB socket.

If I also get a 12V router too then it could all run of one 12V PSU and one plug. Probably even with 4 computers and monitors.

Though for tonight it was just the two computers and the controller.

So the gaming went well. Was as fun as I hoped and learnt a bit about running the SuperTuxKart local server and which modes seemed to work well with 2 players. The end goal is to get 4 players. The nice thing about this is that you are almost on top of each other. It felt very social.

There are a few things still to work out. would be nice to be able to spin up new player names while someone is playing from the game server (which I'm calling the oven). Also to be able to capture the race results and keep a scoreboard. Which looks like the server might do.

The icing on the top I want to get is to screen capture the races, maybe with a font facing camera and dump it to disc as a split screen 4 way screen with each player's screen dump and camera over laid small in the corner. Have played around with using a Pi 4 to do a screen capture of the HDMI out mirrored to the second display out with OKish results but a bit cumbersome.

I think the logical thing for this might be a CCTV system that can pull it all together. Bit also not ruled out having the Pi 5's stream the screen capture and a connected camera to disc.

One of the biggest things is still the software is playing catch up to the hardware. Some things just don't run ATM and seems to look like early next year there will be some stuff starting to work well on the Pi 5's.

Also need to work on the packaging. Want it to be light and moveable but also robust and stable. The 10.1" with built in audio screen seems a good fit but need to work out some adjustable height system so you can nicely position it. Then work out the perfect cable lengths and the initial idea is probably just the one USB socket per player where the controller is plugged in.

Once some of the software has been fixed and optimised for the Pi 5 then I'll try running some of the other OS's and any other fun 4 player games.