Multiplayer Cross-Platform Game for SBCs

Moderators: odroid, mdrjr

Multiplayer Cross-Platform Game for SBCs

Unread postby swiftmas » Fri Dec 29, 2017 9:07 am

Started a project making an in depth game on a 64x64 pixel canvas. I realize how overdone pixel art is at this point but the intent was to make a game that required so few resources it could be played on anything(target platform was 1ghz, 512 ram machine.). That said I didn't want to sacrifice mechanics. I currently have an open world game running via server that can support up to eight players. Currently engineering combat to be a lot like diablo where players have three weapon slots with different abilities and have a swath of random and often surprising weapons/spells to be found throughout the game. Working on flushing out the mechanics and level design so I can start on implementing the storyline and other aspects.

code is here:
https://github.com/swiftmas/mp-socketio-node

not very pretty yet, lots of work to do. but if you wanna contribute feel fee to let me know.
Built on vanilla nodejs + socket.io. Been building up a game framework from there. haven't run into a ton of issues yet.

Image
Image
Image
Image

Finally got looting/inventory ui up and running, gif below shows equipping different weapons to the four hotkeys:

Image

Next is skill trees :)

Let me know if anyone is interested. looking for a place to log work on this and possibly get some help testing.

*** Edit *** added some pictures for reference of progress.
Last edited by swiftmas on Tue Apr 17, 2018 1:53 pm, edited 4 times in total.
swiftmas
 
Posts: 42
Joined: Sat Jun 11, 2016 1:12 am
languages_spoken: english
ODROIDs: c2

Re: Multiplayer Arm Based Game

Unread postby crashoverride » Fri Dec 29, 2017 10:07 am

What language (C, C++, Python, etc) is it written in? Why 64x64? Is there a reason 320x240 would not be suitable?
crashoverride
 
Posts: 3468
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Multiplayer Arm Based Game

Unread postby meveric » Sat Dec 30, 2017 12:17 am

I also think 64x64 is extremely low, unless you want to run it on a printer display or something.
1Ghz 512MB RAM? That should be able to handle a ton more resolution.
Considering that you can run emulators in 1920x1080 on lower spec SoCs nowadays even without hardware acceleration.
Still I'm also interested in this project and wouldn't mind packaging it for ODROIDs or other boards.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 8636
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1

Re: Multiplayer Arm Based Game

Unread postby swiftmas » Sat Dec 30, 2017 1:17 am

The original project was to be run on a 64x64 pixel matrix but I gave up on that idea very quickly after starting. I miss-spoke in my post though, I have upped it to 128x128 just recently in order to get legible text but hadn't gone much further out of hesitation to make the game files much larger. The game was inspired by the pico 8 stuff (also 128x128) and I wanted to be able to create something that was similar but allowed for multiplayer. I've been building it using nodejs and Electron, making sure to keep it running smoothly on small arm boards as well as suitable for any other platform. I should have said this was cross platform, not specifically arm based, I will update my title. Most of the multiplayer testing has been done with my odroid laptop, a pocketchip, and a phone. So far seems to work with a steady frame rate even when hosted publicly. Only tested with 4 players total but I assume it could work for more than that. Any more than four and I would imagine you would need a heftier server, the client is very lightweight.

My goal for this week is to finish creating a good base of weapon types and a starting area for testing combat with others. I just finished a looting system and am just adding some more polish to the interactions so I can start ironing out movement, attack speeds, and how fighting as a team would work.
swiftmas
 
Posts: 42
Joined: Sat Jun 11, 2016 1:12 am
languages_spoken: english
ODROIDs: c2

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby swiftmas » Fri Jan 05, 2018 8:47 am

Got combat moving forward at a good clip and now flushing out the inventory system and support systems for regaining health and mana.

Image
Image
swiftmas
 
Posts: 42
Joined: Sat Jun 11, 2016 1:12 am
languages_spoken: english
ODROIDs: c2

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby crashoverride » Fri Jan 05, 2018 8:59 am

Are there any plans to open source this in the future?
crashoverride
 
Posts: 3468
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby swiftmas » Thu Jan 11, 2018 7:48 am

Yep, code is here:
https://github.com/swiftmas/mp-socketio-node

not very pretty yet, lots of work to do. but if you wanna contribute feel fee to let me know.
Built on vanilla nodejs + socket.io. Been building up a game framework from there. haven't run into a ton of issues yet.

Today was actully pretty cool, built an odroid laptop a while back and brought it in to test with some co-workers over lunch. I played and hosted it from the c2 and we had about 8 people playing with no latency issues. first real stress test i've had of this. seems very promising from a load standpoint, especially for not running it on a very fast processor.
swiftmas
 
Posts: 42
Joined: Sat Jun 11, 2016 1:12 am
languages_spoken: english
ODROIDs: c2

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby swiftmas » Tue Jan 23, 2018 3:27 am

Finally got some really good work done on this. Finished up the rest of the combat system and got a short video together just showcasing some of the mechanics. I had some friends get online with me to test the server this week, had about 4 of us online playing (non-local). This was the first online test i've done and it handled really well. Seemed to handle 50 connections with no lag. Next is polishing up the interaction system, making a better inventory system and then the event system.

We tested the combat thouroughly in pvp and agains the mini-dungeon i've laid out and it proved to be going the right direction. Excited for the next steps.
https://youtu.be/U9M2taWh4BQ
swiftmas
 
Posts: 42
Joined: Sat Jun 11, 2016 1:12 am
languages_spoken: english
ODROIDs: c2

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby rooted » Tue Jan 23, 2018 6:00 am

Not bad at all :)
User avatar
rooted
 
Posts: 4720
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby odroid » Tue Jan 23, 2018 9:53 am

Looks very fun. 50 people in a dungeon will be exciting. :D
User avatar
odroid
Site Admin
 
Posts: 27741
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby swiftmas » Tue Jan 23, 2018 3:18 pm

Thanks! haha definitely not built for 50 people but we were able to open 50 connections before encountering lag. This is meant to be a 4 man party kinda thing, possibly more than one 4 man party. Damage scaling hasn't really come into scope yet but the branch i shared has a mini dungeon that is certainly suitable for 4 people.
swiftmas
 
Posts: 42
Joined: Sat Jun 11, 2016 1:12 am
languages_spoken: english
ODROIDs: c2

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby swiftmas » Tue Jan 30, 2018 12:30 pm

Started on ui stuff including skill trees. Will keep posting with updates.
Last edited by swiftmas on Tue Feb 06, 2018 4:48 pm, edited 1 time in total.
swiftmas
 
Posts: 42
Joined: Sat Jun 11, 2016 1:12 am
languages_spoken: english
ODROIDs: c2

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby odroid » Tue Jan 30, 2018 2:02 pm

Oh.. it is getting better and better. :)
User avatar
odroid
Site Admin
 
Posts: 27741
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby swiftmas » Tue Feb 06, 2018 4:49 pm

Finally got looting/inventory ui up and running, gif below shows equipping different weapons to the four hotkeys:

Image

Next is skill trees :)
swiftmas
 
Posts: 42
Joined: Sat Jun 11, 2016 1:12 am
languages_spoken: english
ODROIDs: c2

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby rooted » Tue Feb 06, 2018 5:03 pm

Nice work :)

Is there any particular reason you aren't sharing the full development codebase? Don't get me wrong, what you shared is great.

*edit*
I see it now: https://github.com/swiftmas/super-mp-sandbox

I followed your link above and missed it.
User avatar
rooted
 
Posts: 4720
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby swiftmas » Wed Feb 07, 2018 1:22 am

No worries, let me make sure its in the start of the topic. Just been looking for a place to share this as I get further into it. its starting to take real shape now. This has been my first real delve into game design. Wanted to get a better understanding of how game engines work and deal with AI and physics. Let me know if you try to get it running. So far as I have encountered, it runs on the standard node package for arm without issues. Then you just need to hit it in your browser. Working on an electron shell for it as well.
swiftmas
 
Posts: 42
Joined: Sat Jun 11, 2016 1:12 am
languages_spoken: english
ODROIDs: c2

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby swiftmas » Thu Feb 08, 2018 2:01 pm

Increased the distance you attract npcs while aggro'd and pulled the entire dungeon.
Attachments
aggroDistanceIsTooDamnHigh.gif
aggroDistanceIsTooDamnHigh.gif (4.28 MiB) Viewed 1535 times
swiftmas
 
Posts: 42
Joined: Sat Jun 11, 2016 1:12 am
languages_spoken: english
ODROIDs: c2

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby odroid » Thu Feb 08, 2018 2:22 pm

Very impressive development progress!
Compare the first demo screen and the latest one. :o
User avatar
odroid
Site Admin
 
Posts: 27741
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby swiftmas » Fri Feb 09, 2018 3:04 am

Thanks. Been about a year in the making. Finally moving on to more exciting mechanics so the evolution of the game is looking more rapid. For the most part it's been very asset heavy lately, getting all of the ui screens and content figured out.

Really only have four systems left to develop before it's just content and polish:
Skill trees
Faction mechanics (this is for speaking events with factions and having quests as well) this might be the biggest piece as its meant to be the backbone of the game.
Event system
Saved sessions and server controls
swiftmas
 
Posts: 42
Joined: Sat Jun 11, 2016 1:12 am
languages_spoken: english
ODROIDs: c2

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby swiftmas » Thu Feb 15, 2018 4:59 am

https://youtu.be/eChDTS4Bav0


More gameplay footage showing the usage of the inventory system and another run through of the mini dungeon.
swiftmas
 
Posts: 42
Joined: Sat Jun 11, 2016 1:12 am
languages_spoken: english
ODROIDs: c2

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby odroid » Thu Feb 15, 2018 8:35 am

Nice update again. I've embedded the demo video in your post.

I have a few questions!
Can you estimate the memory(RAM) usage?
Do you think we can run your game(client) on a very small portable device which has only 4MB RAM and ~200Mhz CPU?
Do you need only the JavaScript interpreter on the client side?
User avatar
odroid
Site Admin
 
Posts: 27741
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby swiftmas » Fri Feb 16, 2018 1:11 pm

Thanks! From what i can tell on this device (1ghz 512mb ram) the game server runs at about 30mb while the electron app runs at about 86mb. only uses about 33% cpu total tho. With the ambitions of making it cross platform I settled on making it web based. using vanilla nodejs with socket.io and my own game engine on the backend. The front end is just the web page served by the backend. in this case im running electron as a super light weight way of running the game sans browser.

id have to look up if socketio can communicate with non js. i could try making a more native app.
swiftmas
 
Posts: 42
Joined: Sat Jun 11, 2016 1:12 am
languages_spoken: english
ODROIDs: c2

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby rooted » Fri Feb 16, 2018 1:47 pm

I think he may be talking about a esp32 or esp8266, how cool would that be to have a portable game server in your pocket.
User avatar
rooted
 
Posts: 4720
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby odroid » Fri Feb 16, 2018 1:54 pm

Thank you for the explanation.
So the portable device should have a very minimal web client with nodejs/socket.io at this moment.
User avatar
odroid
Site Admin
 
Posts: 27741
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby swiftmas » Tue Feb 20, 2018 2:33 pm

@rooted, I've actually been using my phone with nodejs installed to run the server and do minimal dev changes when i'm out and about. Its been fun cause I can just start a hotspot and have people join via the IP. Able to run the server and play the game on android with pretty good results.


@odroid, You are correct. Doesn't seem to need to much power but definately more than you listed unfortunately. I wanted to make it playable on the same target devices as the pico-8. I got bummed when none of them were multiplayer though. I wish i could have made it with lesser chipsets in mind but unfortunately i'm not that level of dev.

Been a slow week but got a lot more done on the UI. Starting to look like an actual game lol. Loot and inventory now give queues as to what weapons do and their damage. relying alot on poorly made abbreviations tho :P. Going to need to make a wiki.

WeaponDif.gif
WeaponDif.gif (52.69 KiB) Viewed 1234 times

inventoryDif.gif
inventoryDif.gif (68.71 KiB) Viewed 1234 times
swiftmas
 
Posts: 42
Joined: Sat Jun 11, 2016 1:12 am
languages_spoken: english
ODROIDs: c2

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby crashoverride » Fri Feb 23, 2018 2:41 pm

swiftmas wrote:I wish i could have made it with lesser chipsets in mind but unfortunately i'm not that level of dev.

I am. Let me know if you want to team up on it. The main issue is that a conversion to C/C++ is mandatory to support that class of device.
crashoverride
 
Posts: 3468
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby swiftmas » Tue Feb 27, 2018 1:43 am

Hey, well this is fun, Can c++ make socket.io connections?(apparently so https://github.com/socketio/socket.io-client-cpp).

Are we looking to make a lightweight C/C++ client? or server? I guess the thought would be both to run on a single device. I could see coding up a front end that uses very little resources in c but the backend still has a ways to go and would be a definite pain to be reworked in another language as its very function based at the moment.

I'd be excited to see other clients made for the game that could run on smaller hardware. The game itself is all controlled on the server (physics, events, speach, attacks, collissions, etc) the client only recieves a small array with sprite states frame by frame. It was built with the idea that making a new front end would be the simplest part of the equation.
swiftmas
 
Posts: 42
Joined: Sat Jun 11, 2016 1:12 am
languages_spoken: english
ODROIDs: c2

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby crashoverride » Tue Feb 27, 2018 1:47 pm

I would think the first step would be to get the client working on an embedded device. The server can continue to run on "big" hardware. However, the catch is that the server will need to be altered to support this scenario: a simpler, lower level socket interface will need to be used. Then a socket.io (websocket) adapter will be stacked on top of that for "big" clients.

Code: Select all
embedded client    full client
       |               |
   udp socket       socket.io
       |               |
   (network)        (network)
       |               |
       |         socket.io to udp
       |               |
       -----------------
               |
           udp socket
               |
             server
crashoverride
 
Posts: 3468
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby swiftmas » Wed Mar 07, 2018 1:23 am

@crashoverdrive, Started looking into this and getting the feeling i need to refactor a lot of things. I have been relying very heavily on socket.io and the ease of its triggers. I will keep looking but this might be out of scope for me at the moment.

Apart from that I've been working on getting a lot of the subsystems squared up and refactored to make things a little easier on the combat system. Started to look at howto support more subsystems to give the game more variety. Should have something to show for it soon.
swiftmas
 
Posts: 42
Joined: Sat Jun 11, 2016 1:12 am
languages_spoken: english
ODROIDs: c2

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby swiftmas » Tue Mar 27, 2018 4:17 pm

Been a little while since my last update. Went back to figuring out pixel art. Fixed up some new enemies and reworked some other older sprites.
Attachments
killspiders.gif
killspiders.gif (2.86 MiB) Viewed 827 times
newthing.gif
newthing.gif (1019.82 KiB) Viewed 827 times
swiftmas
 
Posts: 42
Joined: Sat Jun 11, 2016 1:12 am
languages_spoken: english
ODROIDs: c2

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby rooted » Wed Mar 28, 2018 12:21 am

Haha, nice work on the spider.
User avatar
rooted
 
Posts: 4720
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby odroid » Wed Mar 28, 2018 8:46 am

Yeah! I really like the pixel art animation.
User avatar
odroid
Site Admin
 
Posts: 27741
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby swiftmas » Tue Apr 10, 2018 11:54 pm

Been using the odroind in a home made laptop lately to do the game design. this thing is always more capable than i realize.

should have some more updates soon. Alot of changes to sprites and combat.
Attachments
xfceDesktop_Game_screenshot.png
xfceDesktop_Game_screenshot.png (539.33 KiB) Viewed 515 times
swiftmas
 
Posts: 42
Joined: Sat Jun 11, 2016 1:12 am
languages_spoken: english
ODROIDs: c2

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby rooted » Wed Apr 11, 2018 1:28 am

I haven't had time to actually play this yet :( but the continued updates reminds me I need to find the time.
User avatar
rooted
 
Posts: 4720
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby swiftmas » Wed Apr 11, 2018 2:35 am

TBH theres not a whole lot to it yet. Master branch has about 10 minutes of content but is still using the old sprite sets. I started over on the levels this week and I think I finally have the combat feeling good on this current branch. my goal is to have 30 minutes of gameplay setup by the end of the month to test the combat and powerup system. Ended up replacing the leveling/skill-tree stuff with powerups and buffs, just not enough real-estate for that many UI pieces. I'll post it once its up to snuff for some good testing.
swiftmas
 
Posts: 42
Joined: Sat Jun 11, 2016 1:12 am
languages_spoken: english
ODROIDs: c2

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby swiftmas » Tue Apr 17, 2018 1:44 pm

Getting pretty close to having another full dungeon ready. Still doesn't look like much but I reworked almost all the sprites and animations. Got a decent amount of new weapons and combat situations out of it with visual queues before attacks and other little details. Gearing up for introducing meaningful loot that allows for combat bonuses. I've spent alot of time working on combat design to try and make it fun. Don't think i'm quite there yet, but its getting closer. Still looking for howto make it interesting. Heres some more gifs of the progress:
Attachments
HealthPotion.gif
HealthPotion.gif (193.21 KiB) Viewed 400 times
shields.gif
shields.gif (959.58 KiB) Viewed 400 times
attack spiders.gif
attack spiders.gif (2.96 MiB) Viewed 400 times
swiftmas
 
Posts: 42
Joined: Sat Jun 11, 2016 1:12 am
languages_spoken: english
ODROIDs: c2

Re: Multiplayer Cross-Platform Game for SBCs

Unread postby rooted » Tue Apr 17, 2018 2:02 pm

I really like the charged sword, nice work.
User avatar
rooted
 
Posts: 4720
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)


Return to Projects

Who is online

Users browsing this forum: No registered users and 0 guests