Shop Forum More Submit  Join Login
About Deviant haiküUnited Kingdom Recent Activity
Deviant for 6 Years
Needs Core Membership
Statistics 102 Deviations 61,397 Comments 159,178 Pageviews
×

Newest Deviations

Frontal Bone Study by haikuo Frontal Bone Study :iconhaikuo:haikuo 57 3 Red by haikuo Red :iconhaikuo:haikuo 484 98 St Ecclesia's Basilica by haikuo St Ecclesia's Basilica :iconhaikuo:haikuo 327 37 Reactive Drop - Overrun by haikuo Reactive Drop - Overrun :iconhaikuo:haikuo 108 17 Digital Sketchbook - handheld laptop build by haikuo Digital Sketchbook - handheld laptop build :iconhaikuo:haikuo 213 48 Roof Tops by haikuo Roof Tops :iconhaikuo:haikuo 319 23 Concept Sketchbook by haikuo Concept Sketchbook :iconhaikuo:haikuo 179 32 Rise [Homefront the Revolution] by haikuo Rise [Homefront the Revolution] :iconhaikuo:haikuo 474 64 Samurai by haikuo Samurai :iconhaikuo:haikuo 398 34 Sacrifice by haikuo Sacrifice :iconhaikuo:haikuo 199 16 Voxelnauts: Dragon Temple by haikuo Voxelnauts: Dragon Temple :iconhaikuo:haikuo 122 17 Voxelnauts: Airship by haikuo Voxelnauts: Airship :iconhaikuo:haikuo 63 3 Voxelnauts: Water Shrine by haikuo Voxelnauts: Water Shrine :iconhaikuo:haikuo 107 4 Voxelnauts:  Sunset Town by haikuo Voxelnauts: Sunset Town :iconhaikuo:haikuo 114 4 BG practice by haikuo BG practice :iconhaikuo:haikuo 283 24 Celestial by haikuo Celestial :iconhaikuo:haikuo 322 29

Activity


I set-up a basic WebSocket server yesterday which will keep track of the players position in the world. I'm using WebSockets instead of a UDP connection since I'd like the game to work in the browser as well as on desktop and browsers don't have any way to make an unreliable connection to a server due to security concerns.

WebSockets aren't always great for multiplayer games since they're based on TCP which is a reliable protocol. That means all the data packets act as if they arrive in the order they were sent but when all you care about is the player's latest position you don't want to wait around for a late packet if you've already got the one after it.

Right now the plan is to have clients connect to the server using WebSockets and tell the server their location in the game world, the server can respond by sending what I'm calling "markers" back to the client. A marker is basically an object which contains a pointer to a file or the file itself as well as the location of said file in 3D space. In a Territory Definition Server these markers might be 3D models or images that the game can then display, but for this server the aim is to have each marker point to some character file which which the client will then load and and display. The server will send the client all markers near by and since WebSockets are a two way (full-duplex) protocol the connection can stay open and if a player moves close enough to a client the server can pro-actively push that player to the client. When a player is loaded it can listen to the server for position updates using the same WebSocket connection or establish a shared UDP connection on desktop.

The server uses the POCO C++ library which has a brilliant WebSocket class I've used in the past. In theory secure WebSockets should also work although I haven't tested them out yet. I'm also trying out the Conan package manager which I haven't used before but so far has made installing and managing dependencies a lot easier. On the Unity side I'm just using the Simple WebSockets asset by Unity which works for WebGL as well by using the browsers native WebSocket functions. Next I want to work out how to generate documentation from a Unity project and make it so multiple players can load in.
Exams are done and Christmas is over, which means I have a sliver of time from now to new year to make a start on this. I'm going to try and explain the big picture of how this project is going to be structured in this update as well document some workflow stuff I've been working on today. It's worth mentioning that these journals are ultimately so I have some documentation of my process which I can submit for the final competition. Since the competition is focused on programming some of these updates might get a bit technical for Deviant Art, but then again I've been surprised by the kind of people who use this site before and I know some people just enjoy reading along.

The Big Picture:
I never end up doing something simple when it can be massively over complicated and this project will be no different. Ultimately what I'm interested in making is a 3D world which is setup in such a way that players can, share artwork / music (files) in a 3D space, create new content together, talk and socialise in real time and own territory in the 3D world. While a client/server model would work this would make the game completely centralised in an unhealthy way. It would mean players would have to trust me to manage and store their data securely, keep track of who owns what territory and trust me not to sell their data, de-platform them, or ever get hacked. While recent history has shown users are by and large more than willing to trust companies and individuals with their data, it doesn't mean they should. There are also a huge number of different types of files which users could conceivably want to share and view in 3D and there is no way I could create a suite of applications that could edit all of them. The only way the platform would ever scale is if it allows other developers to create parsers and tools for files as well.

The way I see this working is as follows:
  1. The user uses a application to view and interact with the 3D world, a bit like a 3D browser.
  2. A distributed ledger keeps track of who owns what territory and keeps track of an IP Address or Domain Name for each territory defining a Territory Definition Server (TDS) which tells the browser where to find the server hosting the files for that particular territory.
  3. Each TDS can define how the user can interact with the world in that Territory.
  4. Optionally there will also be Universal Positioning Servers (UPS) which keep track of entities that don't belong to any one territory, like players.
This is an idea I've been thinking about for a while and I think its important because a framework like this is the only way I see a 3D virtual world working which isn't a total big brother surveillance platform controlled by one company.

Workflow stuff:
Yesterday I setup an automatic build server using Unity 'cloud build' to automatically build the game and run any tests that I write. I originally tried to use Bitbucket's pipeline service to run a docker image which would build the game and run tests that way, but it didn't want to work I think because Unity needs to be activated before it can run and Bitbucket doesn't guarantee to run the docker instance on the same server which messes with the licence. Anyway Unity's dedicated cloud service was very simple to setup and is free for the first month so works well for this competition.

Today I'm going to work on a simple UPS implementation and work out how to get networking working in unity that works in a somewhat consistent way across across different platforms. I know that Web has no way to directly connect to a server using UDP so Websockets are probably the way to go but they're not ideal given they only allow reliable communication which can slow things down.
Got myself a new project peeps, Aardvark Swift is hosting a game programming competition and I'm planning on keeping a little development journal here on DA while I work on it. The competition is to build a finished game from an existing Unity C# project by Jan 27th and it seems pretty flexible as to the direction entrants take their game. Here's a quick GIF of the game they've given us to work, It's a very basic top down shooter.

Sfas-original-project-s by haikuo

I've never used Unity before and only briefly touched C# as well so we'll see how it goes.

The working title for my game is 'Blue Assembly' and the idea behind the game is actually something I've been wanting to try out for a while as part of a larger project I've been thinking about. Blue Assembly will be a multiplayer drawing game where each player controls an avatar and can walk around an infinite 3D world drawing / painting together. The end goal would be to extend the game to allow players to add music and 3D models to the world as well as their drawings but for the competition it will just focus on 2D drawing to make things simpler. To prevent griefing players will have a limited amount of paint which recharges over time. They'll be able to increase their paint capacity by levelling up their avatar probably using some kind of reputation based system. I'm going to try and make it playable on Windows, Mac, Linux and through the browser. This will make the networking a little harder but unity makes it pretty easy to build a game for different platforms so it should be fine. 

The basic idea for the game is actually inspired by a cool collaborative painting app called anondraw which I've been playing around with on and off for a while. Where as I'd like Blue Assembly to be more of a 3D collaborative world editor, Anondraw is totally focused on 2D drawing and is more of a tool than a game. I might do a review of everything I like and dislike about Anondraw later but it basically demonstrates that the basic concept can be fun and engaging, at least for people who like drawing like me.

I'll try to update the journal everyday for the competition but we'll see how it goes, there's still a final uni exam to get through first :dead:

Comments


Add a Comment:
 
:iconjonathanbluestone:
JonathanBluestone Featured By Owner Dec 16, 2018  Professional Artist
Always wanted to make video games but sadly never had the programming experience for it and my experience with video games goes back to the very early days of the old 8-Bit computers. The same old story really, ideas but nobody was willing to listen to them or get excited enough about them to consider programming them.

Best of luck with your project.
Reply
(1 Reply)
:iconbuhamedali:
buhamedali Featured By Owner Nov 18, 2018
Hi, nice pics
Reply
:iconbamsdrawz:
Bamsdrawz Featured By Owner Nov 1, 2018  Student General Artist
Thank you for my very first llama a year ago Hug 
Reply
:icondong0818:
dong0818 Featured By Owner Oct 18, 2018  Hobbyist Digital Artist
hello haikuo ! 
Reply
:icontechtalkpony:
TechTalkPony Featured By Owner Sep 11, 2018
Happy (Late) Birthday! ᵔ.ᵔ

www.youtube.com/watch?v=ISbbjA…

(Sorry, I was away for the week)
Reply
Add a Comment: