General Category > Games

Who wants to make a MMOG for CPC?

(1/6) > >>


I have made a proof of concept for the client server communications to allow for online CPC games.

FPS = Frames Per Second at the client side (artificial cap at 60 currently)
IPS = Game Loops Iterations per second (artificial cap at 25 currently)
CPS = Server Calls Per Second (artificial cap at 10 currently) <-- POC (using JavaScript clients)

Here are 4 clients, can be up to 26 (not really a limit, just there are only 26 lowercase letters a-z in english.  This should be achievable on real CPC too being a client but I'd like one of you to create a POC of the client.  i will give you the protocol this weekend sometime.

Basically we have areas, they can be as big or small as we like.  In this POC I have made them 40 x 20 which makes 1 screen of text to show it off. 800 bytes in a payload.

These clients are in javascript, but using a method that I already proved to work on CPC.  The JS I have limited to 10 calls per second to the server - can a CPC achieve that if coded in assembler?

The POC here doesn't stop many people controlling the same player at the same time, that is because I am prompting for the player and there is no checking for now.

Types of games could be:

- a dungeon crawler? 
- a multiplayer druid clone?
- a multiplayer (less frantic) wizards lair clone?
- bomberman clone?
- a laser squad clone?
- A multiplayer lords of midnight type game? 
- Any RPG? 
- multiplayer mutant monty clone?
- multiplayer roland on the ropes clone?

The game could be single screen areas but they could also be large areas with scrollable regions - if coded in a fast language.  BASIC should be fast enough for some games for sure, but I am uncertain about how many calls per second to the server you can make.  The calls per second limits how fast you can move around - if there is too much discrepancy between internet connections, I can put a pulse in there so everyone goes the slowest speed.

The server currently is holding the map so that people can't walk through walls so easily.  The server can also decide on whether someone goes through one area to another and it tracks which players are in which areas.  There should be no real limit to this, just how fast can a CPC render lots of players on the screen at once depending on how you choose to render it.  If anyone likes the idea to make a full-blown POC or a conversion of an existing game to multi player we will likely have some interesting output - and some challenges, but I am sure most can be overcome.

Also, the server code I will make available to anyone who wants to host their own game - or I can host it (but still give the source to the game author).

Some technical info for someone to write a client for this POC to see how many calls per second they can make:


endpoint is:
function: must be getarea
areaid: for now must be 1
player: can be any small letter from a-z


The response is designed to cater for CPC or similar computers.  eg,

Success: 1:<sometimes a message>:+++++++... (1:: plus 800 more bytes)
failure: 0:<sometimes a message>:

Using the M4 you can do a memory transfer, to cater for messages, perhaps allow for 1kb for this POC.
Do it as many times as you can per second, if you get a 1 (success) then render the output.  The output is a continuous stream of characters, in this example, a mode 1 screen you should render 40 characters before going to the next row. 

Note: you do not need to render everything as 1 character in size.  You can choose to render them any size you like and scroll around the area if you prefer.


Where is my character after I render?

The response contains everyone in it other than yourself.  It is intended that your position is known always on the client so no need to have it indicated in the rendering.  Consider the returned information as a 'mask' for a map, not the map itself.  Being a mask, you have your local map data and can render the + however you like - that is purely to prevent a player character from going on that location - which is maintained at the server end.  Your player characters can all be animated and whatever sprites you like on the client end.  Animate everyone, it will look good.

There is another API call that will let you set the position of your character that is.  In a normal gameloop, you will sense a keypress then update your position.  There is a very slight variation of this - we aren't including advanced ideas yet such as movement prediction - but, you get your player position (x & y) and put the updated versions based on keypresses into a temporary variable - you then make a call to setplayerpos which will return a success or failure.  If a success, then your location has moved on the server and you can change your local position to reflect.  If you want shrouding, do it on the client for now, but it could be possible that we implement shrouding as well as windows to huge landscapes at the backend so the payloads can stay small for CPC.


endpoint is:
function: must be getarea
areaid: for now must be 1
player: can be any small letter from a-z
playerx: your intended player x position
playery: your intended player y position


The response is designed to cater for CPC or similar computers.  eg,

Success: 1::
failure: 0::

Note: as these are http/https requests, store your base url ( in a config file so it is not hardcoded in your game. 


If this eventually turns into something that supports a real game we can extend the the API to cater for a bit more security as per the 8bitology API.

What do you think?

Love the idea (although I cannot help coding) ....

Would this be possible through M4 WLan ? Maybe some kind of rougelike multiplayer dungeon crawler ?


--- Quote from: SkulleateR on 01:11, 11 July 20 ---Love the idea (although I cannot help coding) ....

Would this be possible through M4 WLan ? Maybe some kind of rougelike multiplayer dungeon crawler ?

--- End quote ---

Through M4 LAN or Internet would be possible - LAN (without internet) only if the server is hosted internally on a LAMP/MAMP/WAMP/AAMP stack.

Gimme a top down Dark Souls or Dragons Dogma please :P
In terms of graphics and sound effects - what can we expect?

What this allows is coordination of multiple players within the same game 'walking around' for the time being - non-player characters, objects and perhaps projectiles should all be possible.  The graphics are what the CPC does, the M4 and Symbiface both have mass storage so how that is used is up to the game author, and if you go to the games threads there are some really talented graphics and music artists on CPC - and if they have interest to make a game to have a multiplayer/internet mode, I will gladly help them out and work with them to see what we can achieve.  Even on a CPC 464 with M4 card, the possibilities are endless.  As a side note, this simple POC allows 26 players to move around - granted it isn't perfect, but I only spent 5 hours on it so far, and that is 26 players in a single room and hosted on a very slow server - performance-wise, there is no reason we cannot have 200+ players in a single game but spread across rooms - or even perhaps we could prove they work in a single room too, i know it will work acutally - but will it work nicely :D


[0] Message Index

[#] Next page

Go to full version
Powered by SMFPacks Reactions Mod
Powered by SMFPacks Alerts Pro Mod
Powered by SMFPacks Mentions Pro Mod