User avatar
Jim Manley
Posts: 1600
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, and Powell, Wyoming, USA, plus The Universe
Contact: Website

Re: R-Pi Massively Multiplayer Online Role-Playing Games (MMORPG)

Wed Apr 04, 2012 7:12 pm

I have to shake my head at the thought that we can even contemplate rendering even one wall of a structure in 3-D to any level of detail at will, much less any section of London. Even an 8 GB SD card can fit more than a DVD"s worth of model and texture data and access it much faster than a DVD drive, and adding TBs of storage via USB is now a ~$100 proposition.

I"m sure OpenGL ES 2.0 includes automagical rendering of objects in appropriate resolution based on distance from the viewer. Heck, we had that in Original Flavor GL 27 years ago, when we were still amazed at automated hidden line and surface removal. Some wild-eyed researchers with improbable names like Alvy Ray Smith and Ed Catmull were just writing papers on all sorts of crazy 3-D graphics techniques for modeling realistic particulates like fog, smoke, and clouds. Fortunately, my thesis adviser was the roommate at UC San Diego of Bud Tribble (of early Apple and NeXT CTO) and he was friends with Jim Clark, Stanford EE professor and founder of Silicon Graphics, Netscape, and Healtheon. I still marvel at the brain power I was exposed to on a regular basis as such people passed through our labs to see our research and give presentations on their work.

A gigapixel/second? 40,000,000 shaded polygons/second? 26,000,000,000 floating-point operations per second? 1080p at 30 frames per second? $35 for all that, Ethernet, USB, and booting from SD cards ... on a credit card sized board? Does anyone realize just how insane this really is?
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!

PeteX
Posts: 50
Joined: Tue Apr 03, 2012 11:36 am
Contact: Website

Re: R-Pi Massively Multiplayer Online Role-Playing Games (MMORPG)

Wed Apr 04, 2012 10:42 pm

Jim: 'The data consistency issue is a big one, and fortunately, I just happen to have some experience in large, worldwide-distributed databases, although that was on pretty big iron over mostly decent networks.'

Good! What kind of a design would you suggest?  When I was thinking about this, I imagined a world that was split invisibly into a number of zones, and each zone was managed by a different database server.  As you approached the boundary between zones, you would subscribe to updates coming from the server whose zone you were entering.  Once you had left the boundary well behind you, you would unsubscribe from updates originating from the zone you had left.

This works up to a point, but there are ways the consistency can break down.  If you have an interaction which crosses a zone boundary, and one database fails in the middle of things, you could have an item duplicated or lost.  A related point is that it's hard to back the whole system up (without shutting it down) because it's hard to guarantee that the same set of distributed transactions have completed on each server.

One answer, I suppose, is that we don't care.  We try to make the system as resilient as possible, but we feel we can live with an occasional dup.  I was thinking about this, actually, in relation to websites like Facebook.  With a system that big, the ACID stuff all starts to break down.  One of your thousands of RAID packs is bound to fail, and when it does, you will lose some recent updates.  Some of those updates will be transactions that involve other servers, but you can't roll them back.  If you tried, it would start a cascade of rollbacks that would soon affect the whole system.  So presumably you just take the hit.  Facebook ends up with a bit of inconsistent data—perhaps friend relationships that only go one way—but so what?

(With a MMORPG, you just have to ensure that it fails in the direction of duplicating objects rather than losing them.  Otherwise the GMs end up with a stream of whiners claiming that their objects disappeared...)

I've also been thinking about the game engines that would work for a project like this.  I started with a shortlist of Blender Game Engine, Gamekit, Panda and jMonkeyEngine.  As far as I can see, there is no port of BGE to OpenGL ES, so that's probably out.  The others can use ES on Android but not on the desktop.  This situation is obviously better: it will need some refactoring but the support is basically there.

I'd be reluctant to go for Gamekit on the basis that it's not really complete yet.  The downloadable releases are all quite old, so you basically check out the trunk and build it yourself.

Of the others, Panda is more mature than jMonkeyEngine 3, but it's harder importing Blender models (and importing from other software is probably worse).  It would also be nice if the client and server could share code, and for scalability reasons it would be better to write the server in Java than Python.

Do we know what the situation is with Java and the Pi?  Presumably we can run OpenJDK, just not with HotSpot?

User avatar
Jim Manley
Posts: 1600
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, and Powell, Wyoming, USA, plus The Universe
Contact: Website

Re: R-Pi Massively Multiplayer Online Role-Playing Games (MMORPG)

Thu Apr 05, 2012 1:28 am

PeteX,

Looks like you and I are gonna design this suckah in an afternoon or three … or slightly more, in "R-Pi time"

You"re on the right track with your assumptions that dupes are better than accidental drops, not everything needs to be kept updated everywhere at the same time, etc. Networks are a lot faster and more reliable than ever, so, life is getting easier for this sort of thing, although it"s still not easy to do, ideally. A lot can be done using in-situ statistical analysis to predict what needs to be where, and when, which is rarely performed in most systems because the fastest, perfect data replication and routing is assumed necessary, and no precedence is applied to any particular data types to help triage it. Ironically, every TCP/IP packet has carried precedence bits since the protocol was established in the early 1970s, but, no agreement was ever established for the semantics (e.g., is 255 the highest precedence, or 0?). We can encode that sort of thing in the data bits, anyway, so, even if the precedence bits get mangled by routers/switches/etc. (that"s what is supposed to use the precedence bits), it won"t matter. I think they finally did establish semantics for expanded precedence and quality-of-service (QoS) bits in IPV6, since digital video, spam, etc., are swamping the Internet, and something needed to be done.

I haven"t looked yet to see what"s being used as a DBMS in these engines, but, I"ll bet it"s overkill for what we need, and will be too much to have running on every R-Pi, anyway. Too many developers just pull stuff like this off the shelf and move on because they have no idea how to do it themselves, or even bother to look at open source to see what the key pieces they only need are. Same thing with network stuff, and it"s a well-known dirty little secret that network code tends to be even worse, as it"s more mysterious to many than DBMS concepts.

There is also a lot of cruft in some Linux libraries, especially when code is statically linked because someone couldn"t be bothered to tease apart dependencies (look at what the poor guy who"s trying to recompile tens of thousands of Debian files with hardware floating point enabled – even Perl is currently DOA). I don"t want to have to redo _everything_, but, over time, I"m sure we can get pretty lean and mean, especially if we can find some eager-beaver kids who can be turned loose on this sort of thing. While it can get pretty advanced, if some reasonably sharp kids (who haven"t acquired bad coding habits, yet) can get in on the ground floor, this would provide an incredible learning experience for them, and they would really own it. Employers would just eat up such experience.

A good friend is one of Yahoo"s network gurus and, while they just announced another 2,000 layoffs, he"ll be one of the last out the door even if the whole company eventually shrinks to 10 people. He can provide me some pointers on how to do some of what we need to do and, if it gets interesting enough, he and some of his friends who do the same kind of work for all of the big kahunas in SillyCon Valley and around the world. Heck, they"d like to play something like Pi-finity! and would probably help out as much as they could.

It will be insteresting to see if anyone has ever instrumented any MMORPGs, even commercial ones, and whether we can get access to the data, if it exists. If not, we could augment an open-source system to gather it ourselves, perhaps more than one to see if there are variances at the functional level (e.g., character geographic navigation, interaction encounters and outcomes, typical level/reward achievements, etc..).

Java should be fine, as I know there are ARM-compatible JREs and JDKs, although whether they"re fully optimized for the R-Pi CPU/GPU, I don"t know. Oracle/Sun has generally been pretty good about helping with ports when needed, especially when something new and popular comes along. Gee, if only we knew of something like that … and was actually shipping to hundreds of thousands of customers, many of them new to computing beyond the consumer level … uh-oh, I think the admins are onto us … cheese it!

I was awarded a patent about 13 years ago for techniques involving keeping network nodes updated without local intervention (web browsers and modified proxy web servers before data push was common – it was licensed by Microsoft, Google, Yahoo, AOL/Netscape, etc.). It will work for what we"re doing here, too, particularly portions dealing with concepts called "information logistics" (the precedence stuff a a bunch more) and "dissemination distance" (a measure of the typical time delay between nodes which may effectively be closer or further away than they"re physically separated). It"s pretty mind-bending stuff that has a lot to do with the physical wide-area network topology that favors East-West propagation over North-South for historical infrastructure demand reasons, and it changes all the time with time-of-day, day-of-week, day-of-month, time-of-year, real-world events, equipment failures, etc. The Internet really is a living organism that"s a collective extension of everyone who uses it.

I"m pretty impressed with Panda3D, at least in terms of the games that use it. I"ve heard that model conversion is better in some directions between platforms than others, so, we"ll have to see what"s what. I"ve been expecting to have to do a lot of customization, if not outright completing/fixing things. Sometimes open source is orphaned for a good reason, it gets overtaken by better technology/methodology, people move on before it"s really done, they decided to just start over, it"s an earlier version of a fully-cooked commercial product, etc. Probably the most important thing to look at is the data structures that are shared between the clients and server(s), especially the most complex, well-implemented systems, as we won"t need to reinvent that wheel.

Sometimes, the data structures are at least as important as the execution paths – if they"re too rigid or convoluted, no amount of code can make up for transmitting more than is needed, update cycles aren"t granular enough and take too much time per transaction (per the precedence issue already discussed), assumptions about the client and/or resources are off (one of our biggest challenges), etc. Just describing all of the issues that are going to need to be dealt with is going to be a tome, much less the design and implementation. Phew! Note to self: need to stock up on aspirin …
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!

unepic
Posts: 9
Joined: Sat Mar 10, 2012 7:56 am

Re: R-Pi Massively Multiplayer Online Role-Playing Games (MMORPG)

Thu Apr 05, 2012 5:32 am


Great concept! And so many great ideas!

I am particularly thrilled by the challenge to make it hosted in a decentralised, distributed way.

That is exciting.

Two ideas I have not seen discussed yet:

Consider using CC0, the new public domain license, for code contributions.

http://creativecommons.org/choose/zero/

http://wiki.creativecommons.or.....ntation.3F

Open source licenses are good, but CC0 is excellent.  It is so simple.

Also consider a distributed version control such as git(hub); and encourage forking to foster competitive ideas, then reabsorb the most successful ones.

Concerning the game environment, we should not look at cheating as a significant threat. Many games are competitive within the narrow confines of set rules and award structure, where cheating would be a problem, but this project is very different.  We are developing makers.  If we want to nurture creativity, exploration, learning and build a community that is more RPi relevant than other games out there, then we don’t only need to accommodate hacking, we need to embrace it.

For instance, I really like petertracy’s nice description of individual worlds on individual RPi"s, where the RPi owner controls the world.

Under such a system, one planet might be a large cube, and feature interesting challenges for visitors.  There may be a phenomenon that defies physics.  Challenges wouldn’t require a currency exchange, but if they did, perhaps others would manage those and provide a plugin to install for those who use it.

Options such as competing universal currencies via plugins, local currency via plugin or custom scripting, or no currency at all: it is the choice of the local RPi guy.
I wonder if even the laws of physics could be an optional plugin (module)?

Perhaps an entire world could be in 2D or even 4D space?

Another entire planet/world might be a demonstration of AI featuring some simple creatures. Visitors would be welcome to come and interact. In this case, no challenge, just amusement, or study.  Again, no points or currency necessarily required or awarded.  Tourists might even collect a souvenir in the lobby, or not.

Not all creative ideas will be able to be implemented, but we should expect that curious people will honestly inquire how come.  And that is good.  Limitations should be based on reality and not arbitrary barriers, as much as possible.  I think the goal is to accommodate and encourage learning, creativity, and innovation; and I really like where this is heading.

Thanks Jim!


kreggz
Posts: 4
Joined: Mon Mar 19, 2012 8:48 am

Re: R-Pi Massively Multiplayer Online Role-Playing Games (MMORPG)

Thu Apr 05, 2012 6:47 am

I would have to agree hacking is fine as long as there is no threat to taking down the entire game or accessing someones system using the game.

User avatar
Jim Manley
Posts: 1600
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, and Powell, Wyoming, USA, plus The Universe
Contact: Website

Re: R-Pi Massively Multiplayer Online Role-Playing Games (MMORPG)

Sat Apr 07, 2012 11:25 pm

So, I"ve been toiling away on the requirements specifications, combining my ideas with those of contributors here and the vision is really starting to jell. I"ve also rounded up over 40 game engines to evaluate and I was right, I _am_ going to need a bigger boat!

The system will be a federation of loosely-coupled meshes, with each mesh a collection of more tightly-coupled individual R-Pi nodes.  The identity of each node will be shared among all nodes across all meshes in terms of world name, world description, IP address, etc., so that accessing any node provides the ability to access any other node.  This data will also be available on web sites, similar to how P2P trackers work, and whenever data changes anywhere, it"s propagated across all meshes.  Such updates should be small in size and infrequent relative to active game playing data volumes, so, it shouldn"t impact the network at all.  Data describing each world will be hosted by the respective owner"s R-Pi and when a player decides to enter a world they haven"t visited (or no longer have the data from a previous visit) the data will be replicated to their R-Pi via the P2P mechanism from others that have visited, not just the R-Pi of the owner.

The owner of a world will have the option of controlling whether prospective visitors can enter to manage the number present at one time (which can be set to maintain a maximum automatically as visitors come and go) or exclude known rogue players explicitly (e.g., by player name, IP address, etc.).

World definitions will be stored in files named in a canonical manner related to the world name, to include:

- attribute values (e.g., world name, owner name/nickname and optional other ID info such as e-mail address, world coordinate location in 3-D space mapped onto the actual universe, physical characteristics such as size, mass, and materials, etc.)

- 3-D model (e.g., Blender, 3Dmax, AutoDesk, Maya, etc.), textures, image map surface overlay "skins"

- infrastructure (e.g., buildings, highways, railroad tracks and facilities, bridges, tunnels, airports, seaports, distribution centers, mines, fuel wells, refineries, material processors, power plants, factories, residences, etc.)

Once a player has entered a given world, they will update their status internally via attribute data structures and to other players" nodes by broadcasting the update event and then the P2P mechanism will propagate the actual data.  If a player leaves or their node fails, only the event is broadcast and their node will no longer seek the updated data via the P2P mechanism, eliminating the load associated with it.  If a player leaves a world on purpose, their node will transmit a status update to that effect to all other nodes in the mesh via P2P so that they will no longer transmit their status change events to the departed player"s node.

I"ve come up with some more ideas to ensure that the game will only run on R-Pi systems or will run at full performance only on R-Pi systems.  I also have a scathingly brilliant idea for how I could charge non-R-Pi players to play, while keeping it free for R-Pi.  However, they"re going to remain under wraps until I can test them.  No sense giving the bat rastard hackers a head start

The good news about the boards passing testing, that they should start shipping within a couple of weeks, and potentially be in our hands before the end of April (not sure which year, now ) means that I"m going to target having a very rough alpha of the game available to the folks here about that same time.

More to Come, So, Stay Tuned!
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!

User avatar
SN
Posts: 1014
Joined: Mon Feb 13, 2012 8:06 pm
Location: Romiley, UK
Contact: Website

Re: R-Pi Massively Multiplayer Online Role-Playing Games (MMORPG)

Sat Apr 07, 2012 11:35 pm

Here's another requirement I thought of – you got one where the world owner should be able to limit/control how many end-users can visit his world at any one time – either because the complexity of their world will not support too many end users or because they want to create some exclusivity – but how about the use of 'keys' which permit access to the world (I'm thinking Golden Tickets and Willy Wonka's Chocolate Factory here )

The other thing that has struck me is that any contributing raspi actually has to support three completely separate functions:-

1. Host the world and influence/track visitor interactions

2. Host the logic for the raspi owner as a visitor (either on his own world or another)

3. Drive the display graphics

How big was your boat again…?
Steve N – binatone mk4->intellivision->zx81->spectrum->cbm64->cpc6128->520stfm->pc->raspi ?

User avatar
Jim Manley
Posts: 1600
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, and Powell, Wyoming, USA, plus The Universe
Contact: Website

Re: R-Pi Massively Multiplayer Online Role-Playing Games (MMORPG)

Sun Apr 08, 2012 5:38 am

SN,

Even while I was writing the player limit item, my mind was still playing around with it, and I realized that the R-Pi could easily track self-loading and do the number-limiting automagically. The first thing I plan to do when I get my board is run a framework simulating an increasing load of player demands along with the own-player graphics until things start collapsing under their own weight. I"ve run stuff like that on an old ~300 MHz Pentium III and we should be able to support hundreds of players easily, maybe even thousands, it depends on how many interactions are occurring simultaneously. However, physical interaction (e.g., combat) is all done in the GPU, which we will have 26,000,000,000 flops to take care of those kinds of interactions (well, along with the graphics ). An interesting possibility is doing almost _everything_ except I/O inside the GPU, which will be owning half the RAM, although I"m not sure it uses all of that for any 1080p video, or whether that"s just worst-case under certain levels of scene detail (e.g., real-world video with high-delta pixels, such as fast sports camera panning, vs. synthesized scenes with static backgrounds/objects). This just keeps getting interestinger and interestinger!

I peeked in my Easter basket and nope, no Super Secret Squirrel Easter eggs with a delicious Raspberry Pi creamy nougat filling, much less a PCB filling. Damned lazy bunny, must be a union flack.

"Problems worthy of attack prove their worth by fighting back." — Danish philosopher Piet Heins
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!

E
Posts: 143
Joined: Thu Sep 29, 2011 7:30 pm

Re: R-Pi Massively Multiplayer Online Role-Playing Games (MMORPG)

Sun Apr 08, 2012 1:59 pm

The networking and technical aspects you've been discussing are way over my head, but I'd had some thoughts to do with the visuals, so I thought I'd share

First is, I don't think it's a good idea to do anything too retro looking, as the young end of the target audience won't have our misty-eyed nostalgia for Bubble bobble et al

I don't think it's a good idea to aim for realism either, as nothing dates fast than 'realistic' 3d graphics, and the Pi isn't really capable of what is considered realistic by current console standards. I think something like Mario Galaxy is perhaps a better bet, having it's own stylised and distinct look.

Following on from that, I love the idea of everyone having their own planet playground to do with as they wish, but my concern is without an general overall style, it will be a bit inconsistent and hard to 'brand'. Minecraft has it's own distinct look, which means that pick axe is on all manner of merchandise and has nearly become a meme. This has almost surely has helped it become such a cult hit. I'm not sure how you could maintain a consistent look in Pi-finity without stifling creativity, but I wondered perhaps a shader or post processing filter, like the way Mario galaxy makes heavy use of a Fresnel effect?

Nr90
Posts: 216
Joined: Sat Nov 26, 2011 12:39 pm

Re: R-Pi Massively Multiplayer Online Role-Playing Games (MMORPG)

Sun Apr 08, 2012 7:52 pm

I think something like the mana world (available on linux as well) would be cool.
Top down mmorpg.
It has a very simple command line as well (where you enter spells etc.)

Something with graphics like that but with some programming etc. integrated would be cool!

PeteX
Posts: 50
Joined: Tue Apr 03, 2012 11:36 am
Contact: Website

Re: R-Pi Massively Multiplayer Online Role-Playing Games (MMORPG)

Sun Apr 08, 2012 11:27 pm

Just got back from my Easter break, and thought I'd toss in a quick reply before going to bed.

I've been reading the design ideas with interest, but to avoid the project becoming bogged down, I think we need to get something simple working.  Simple might mean, for example, a world with one single-threaded server (so no distributed transactions) and no links to other worlds.  Perhaps visitors can log on, walk around, talk to people, and admire the tree that I made with the Blender tree script.

I don't know if you know this already, but people (other than game studios) writing MMORPGs is a bit of a joke in the game industry.  As I said before, it's the kind of project that looks easier than it really is, so people convince themselves that they are going to write World of Warcraft in a few weeks.  In reality there are serious issues to overcome, even without multiple servers and links between worlds.


Jim: It will be insteresting to see if anyone has ever instrumented any MMORPGs, even commercial ones, and whether we can get access to the data, if it exists. If not, we could augment an open-source system to gather it ourselves, perhaps more than one to see if there are variances at the functional level (e.g., character geographic navigation, interaction encounters and outcomes, typical level/reward achievements, etc..).


This isn't exactly what you're asking, but I'd recommend reading Richard Bartle's Designing Virtual Worlds.  You probably know that he's one of the guys behind MUD and MUD2, in the old days.  A good way of getting balanced encounters and rewards is to look at pencil and paper role playing games: the numbers are all right there in convenient tables!

Unepic: Concerning the game environment, we should not look at cheating as a significant threat. ... For instance, I really like petertracy’s nice description of individual worlds on individual RPi"s, where the RPi owner controls the world.
I think it's important to be clear what we're talking about.  I agree we don't want the intrusive cheat detection systems like Punkbuster.  At the same time, we don't have to make cheating easier by sending information to clients that they don't need (the location of objects they can't see, for example).  This also reduces bandwidth use, which is a worthwhile goal in itself.


Jim: I"ve also rounded up over 40 game engines to evaluate and I was right, I _am_ going to need a bigger boat!


Well done!  It sounds as though you may have found some that I didn't, but I pretty much narrowed my own preferences down to Panda or jMonkeyEngine.  I've been thinking about it while I've been away, and I didn't manage to come up with a clear preference between them.  Panda is more mature and easier to use.  Monkey is in Java which makes it easier to share code with the server, and it comes with more development tools.  Monkey seems to import from Blender fairly easily, but I need to check that with the latest version of Panda.


The system will be a federation of loosely-coupled meshes, with each mesh a collection of more tightly-coupled individual R-Pi nodes.


Why not just register each node with a centralised server?  That way we don't have to propagate status updates to lots of places.

Incidentally, we have to decide whether different worlds will have different client software.  It would make it easier if the answer was yes, but we need to be aware that someone could build a trojan world.  Visiting the world would cause malware to be downloaded onto the visitor's Pi.

User avatar
Jim Manley
Posts: 1600
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, and Powell, Wyoming, USA, plus The Universe
Contact: Website

Re: R-Pi Massively Multiplayer Online Role-Playing Games (MMORPG)

Mon Apr 09, 2012 12:45 am

SiR,
We"re a long way from having to decide on things like visual consistency, and there are a number of ways to establish a brand besides a common effect or filter. Think about the things that are the same and different at top theme parks like Disney"s, and the universe is like that. Despite the extreme variety in Hubble Space Telescope images, there is no doubt that they"re from the same universe. There"s a consistency in the glow of gas clouds illuminated by stars, but, it varies with star distances, spatial density, color spectra, gravitational effects, etc. Look at the diversity among the planets, moons, asteroids, comets, etc., just in our own solar system, along with the hints we"ve perceived about several thousand planets no more than ~3,000 light years away from Earth (only about one percent of the Milky Way galaxy, among 100 billion other galaxies).

I"m envisioning providing an expanding selection of primitive models, image maps, textures, tools, etc., that most people will use to build their worlds (consistent and easy to use) while the more experimental, creative people will craft new and imaginative tools as well as primitives to allow significantly different worlds to be created at the fringe. New ideas that prove popular will expand in use, while others will remain unique, only used by small, but dedicated, enthusiasts. I foresee "Twilight" themed vampire and werewolf fantasy worlds as well as Trantors from Isaac Asimov"s classical science fiction, among many, many others, including a current Earth, and perhaps historical and predictive versions.

The future"s so bright, I gotta wear shades!
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!

User avatar
Jim Manley
Posts: 1600
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, and Powell, Wyoming, USA, plus The Universe
Contact: Website

Re: R-Pi Massively Multiplayer Online Role-Playing Games (MMORPG)

Mon Apr 09, 2012 7:31 am

PeteX,

I"ve been reading the design ideas with interest, but to avoid the project becoming bogged down, I think we need to get something simple working.

I"ve been doing rapid prototyping and spiral/agile development for decades, long before these were even buzzwords, and I"m waaaaay ahead of ya.  I even do quick stub prototypes to validate requirements just to be sure what I want to do is even vaguely feasible.  I"m toying around with some pieces that will form a framework from which the complete code base can eventually be expanded.  I hope to have a very rough version of what you"re talking about by the time the first 10,000 boards should start to be received, which I"m guessing will be early May.  Then, we will be able to start scoping what the Pi can actually handle with its memory and CPU limitations before swapping starts.  We will also be able to figure out whether there are things we can do with GPU RAM and processor cycles if not needed full-time for synthesized scenes (vs. real-world video with more random details).

I don"t know if you know this already, but people (other than game studios) writing MMORPGs is a bit of a joke in the game industry ...

I"ve been doing simulation and C4I for over two times as long as some people developing games have been alive, so, I"m not under any illusions about what this will take to do right.  I"m hoping to be able to describe and demonstrate my vision in just enough detail that experienced developers will get it, and that they"ll be able to help less experienced people get things done, so we can have a successful truly large crowd-sourced project.  Eventually, I hope even students will be able to do the routine grunt work where the details are filled in, especially code, object model, texture, image map, etc., primitives for world creation, enabling more variety.  Obviously, things will go faster the more we can reuse/transition, if it"s been designed as such.  Even if we can only build on existing data structures, protocols, and associated accessor code, that will be a help.

I"d recommend reading Richard Bartle"s Designing Virtual Worlds.  ... look at pencil and paper role playing games

Yes, I am very familiar with Richard"s work going back to the early MUDs - my MSCS thesis predates them by a couple of years when standards for describing 3-D objects didn"t even exist, yet (I wound up hacking together some simple network-distributed data structures and protocols based on Original Flavor GL that were later obviated by PHIGS and then OpenGL).  My college roommate pulled all-nighters playing dungeons and dragons and Avalon Hill RPG board games, like Stalingrad at the squad level, where every rifle shot, grenade toss, etc., was determined by a roll of the die!  So, yeah, I have contact-high experience with those (when I would enter a D&D scenario with my Level 1 dwarf or troll, it would always become toast as soon as the Level 10 wizard started mumbling, that the much more experienced group I was with encountered right off the bat ).

I agree we don"t want the intrusive cheat detection systems like Punkbuster.  At the same time, we don"t have to make cheating easier by sending information to clients that they don"t need

I"m thinking that we might allow each world owner to determine whether cheating is allowed, and with how much effort, to allow for "pirate" worlds (eyepatch kinds, not content theft) where everyone will know the story and be wary.

Monkey seems to import from Blender fairly easily, but I need to check that with the latest version of Panda.

There are a lot of factors to evaluate, but, I must admit it"s the most fun I"ve had "working" for years.

Why not just register each node with a centralised server?  That way we don"t have to propagate status updates to lots of places.

If the distributed stuff is just unworkable, that"s OK, it would just be nice to avoid single-points-of-failure in centralized servers and be the first to make P2P work.  These will be really lightweight protocols where minimal info will be transferred directly between IP addresses for event annoncements, and the rest would be P2P.  I"ve been contacted by someone who was working on P2P for a game that didn"t see the light of day due to funding limitations, so, at least we should be able to avoid the dumbest of the beginner mistakes.

Incidentally, we have to decide whether different worlds will have different client software.

At least we"ll be building on a reasonable Linux security model that is immune to Windoze crap and can just lock down everything coming in over the network to read-only.  Then, once we have satisfactory mechanisms in place, we can loosen things up a bit.
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!

PeteX
Posts: 50
Joined: Tue Apr 03, 2012 11:36 am
Contact: Website

Re: R-Pi Massively Multiplayer Online Role-Playing Games (MMORPG)

Mon Apr 09, 2012 11:36 am


Jim: I"m envisioning providing an expanding selection of primitive models, image maps, textures, tools, etc., that most people will use to build their worlds (consistent and easy to use) while the more experimental, creative people will craft new and imaginative tools as well as primitives to allow significantly different worlds to be created at the fringe.


That sounds perfect.  Incidentally, if you look around the Internet, there are quite a lot of reusable textures available already.  They're quite easy to make so people have already done so.  The same is true for image maps but of course they are tied to models of a particular object (I can build all sorts of things with a brick wall texture, but a photograph of a building can only be used to make a model of that specific building).

The situation isn't so good with 3D models, especially models of living creatures.  There are a lot of models available for download, but most aren't usable.  A lot just don't look right, but even once you get over that hurdle, they need to be rigged so they can walk around and so on.  It's easy to end up with a model that looks nice but is difficult to rig because the mesh doesn't follow the anatomy of the creature being modelled.

BTW, although I've done a bit of modelling I'm not really a competent 3D artist.  If anyone is reading this and wants to create models, you would be very welcome.


I"m thinking that we might allow each world owner to determine whether cheating is allowed, and with how much effort, to allow for "pirate" worlds (eyepatch kinds, not content theft) where everyone will know the story and be wary.


Fair enough...  Restricting the information and control that is available to clients is hard, but turning those controls off is easy.  If people want to be able to do that, there is no reason why we shouldn't provide the functionality.


At least we"ll be building on a reasonable Linux security model that is immune to Windoze crap and can just lock down everything coming in over the network to read-only. Then, once we have satisfactory mechanisms in place, we can loosen things up a bit.


One option, certainly, is to use operating system facilities to confine the client.  I imagine we would need a split design like Google Chrome, where a privileged client drives the display, and unprivileged code tells it what to do.  The X server isn't very good at keeping clients separate, so if the unprivileged code had direct access to the display, it could probably break out of its sandbox.

The other option is to develop a client which downloads a scene graph from the server.  It then receives updates saying things like, 'Fred is now walking in X direction at Y speed.'  It shows this to the user.  More complicated interactions (attacking a monster for example) cause a request to be sent to the server.  The server then describes the results: 'Show this particle system at X location for Y seconds [to create the effect of a gunshot or spell].  Then show the monster falling down dead.'

TheManWhoWas
Posts: 50
Joined: Thu Feb 09, 2012 9:11 pm

Re: R-Pi Massively Multiplayer Online Role-Playing Games (MMORPG)

Mon Apr 09, 2012 11:52 am

I think creating a "programming game" for RPi is a great idea. The best example I've encountered so far is the RobotC Virtual World: http://www.robotc.net/download/rvw/

However, apart from the fact it now costs money and doesn't run on anything other than Windows, its main issue is that it just simulates a Lego Mindstorms robot and so is very limited in what your robot can actually do in the world.

So what I'd suggest would be a game modeled on Animal Crossing, but with little robots instead of animals. The robots are controlled by player scripts to do stuff like harvesting minerals and collecting items and taking them places, and there could be hazards to be avoided and dealt with etc.

As far as networking is concerned, I think a peer to peer model would be perfect, but I'd keep it simple. Again, the DS version of Animal Crossing is a good model. Allow RPis to talk to each other to exchange worlds, or allow player robots to cross into other player's worlds (taking their scripts with them).

Real time networking could be avoided altogether (where players interact with each other) as the robots are script controlled, but if desired I would keep to a few players linking up peer to peer as I suspect that is all the RPi will be able to handle.

(And as PeteX sort of said, I'd just forget the whole MMORPG bit - it is way too ambitious and a peer to peer one is a research project rather than a realistic goal)

E
Posts: 143
Joined: Thu Sep 29, 2011 7:30 pm

Re: R-Pi Massively Multiplayer Online Role-Playing Games (MMORPG)

Mon Apr 09, 2012 12:06 pm



We"re a long way from having to decide on things like visual consistency,



Fair enough...


I"m envisioning providing an expanding selection of primitive models, image maps, textures, tools, etc., that most people will use to build their worlds (consistent and easy to use)


... and that really answers my consistency question.

User avatar
Jim Manley
Posts: 1600
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, and Powell, Wyoming, USA, plus The Universe
Contact: Website

Re: R-Pi Massively Multiplayer Online Role-Playing Games (MMORPG)

Tue Apr 10, 2012 5:17 am

I"m now rediscovering a lesson learned too long ago and now being relearned - keeping up with more than just my own posts while attempting to do actual work on the project (along with my real life) is exhausting, especially when so many intelligent and imaginative people come up with such great, thought-provoking comments! Can you all smell the warm butter you"re being basted in, yet? I"ve already got two senior people who have signed up to help get this show on the road, or at least the stuck wheel of the Bozo Bus out of a muddy rut.

Model quality is one of the tallest poles in the tent, if not the tallest. People with artistic talent need to eat just as software developers do, especially since they apparently have to go through the "starving artist" phase (sometimes their whole lives). So, the better models generally aren"t free, especially anything of major game, movie, or TV quality. However, there are lots of examples on various academic, software tool, and freeware sites that might at least provide a decent starting point. The rigging of models for realistic movement is a major challenge, as was proven when old-school stop-action animator Stan Winston realized that the 3-D computer modelers doing the early work on Jurassic Park didn"t know $#!T from Shinola about realistic body mechanics and movement (he said he was ecstatic to find out his career wasn"t about to end, and would continue to have lifetime employment). If we can achieve just velociraptors chasing down herbivores in a clearing, I can die a happy project mismanager I"m hoping that someone can find tools that produce nice rigging as well as models compatible with whatever our engine components wind up being, but, I realize how hard that will be.

The first thing I"m going to do with my board when it arrives (I"m working Liz to see if she will promise mine in my stocking for Christmas in lieu of the anthracite she probably has in mind for me, by now ) is to do some quick and dirty load modeling to see how many network updates, local world state computations, etc., can be sustained along with a 1080p display generated by a bunch of OpenGL ES calls. I"m sure the display will do just fine with the GPU doing all of the hard work, but if we have to dedicate 128 MBs of RAM to the GPU, we will only have ~80 MBs for everything beyond the OS before swapping starts. It is possible to boot with only 64 MBs of RAM for the GPU, but, I don"t know if we will be able to maintain 1080p at 30 fps without some limitations on the total number of polygons rendered, shading/image-map/texture complexity, light sources, palette size, etc.

If we don"t get any of the first-batch boards, I"m thinking of asking if some board owners will be willing to establish remote user accounts so that we can log in and run tests late at night their time to calculate actual performance of our ideas across nodes. If some are in Europe, East/West U.S., etc., that will give us some very real-world propagation delay effects to mess with things under non-ideal conditions.

Since we"ll be doing 3-D, one factor I"m wrestling with is whether we"ll need to take over the display and save/restore the X desktop as we enter/leave the game system. It would certainly ease the RAM issue somewhat. Running in a window inside X seems pretty dumb, except maybe earlier in development, when resource usage can be controlled and we will be starting/stopping things often, so, we don"t want to have to wait for desktop save/restore every time, even if it"s only a few seconds each time.

If it"s not already apparent to those other than the folks I know are experienced in this stuff, there are going to eventually be a _lot_ of moving parts (in terms of software development and game models ). I plan to build this thing from the inside out, the outside in, and the middle inward and outward by defining the cleanest possible interfaces between modules built so carefully that we"ll be able to swap things in and out and connect pieces as they"re ready, at will. I don"t plan on building a large, complex monolith of code that takes hours to rebuild after a few minor changes, even on a high-falutin" desktop/rack machine. As Einstein said, "Things should be as simple as possible, but no simpler."
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!

gimliflea
Posts: 76
Joined: Fri Nov 18, 2011 4:14 pm

Re: R-Pi Massively Multiplayer Online Role-Playing Games (MMORPG)

Tue Apr 10, 2012 8:30 am

I was seeing this as running on a dedicated SD card and booting straight into the game - so is there any need for X and desktops and such.

User avatar
Robert_M
Posts: 211
Joined: Fri Nov 25, 2011 12:50 am

Re: R-Pi Massively Multiplayer Online Role-Playing Games (MMORPG)

Tue Apr 10, 2012 8:35 am

gimliflea said:


I was seeing this as running on a dedicated SD card and booting straight into the game - so is there any need for X and desktops and such.



Rebirth of the game cartridge!

I like that idea
I sometimes ride my Pi to the Forum.

wob86
Posts: 8
Joined: Wed Mar 07, 2012 10:41 am
Contact: Website

Re: R-Pi Massively Multiplayer Online Role-Playing Games (MMORPG)

Tue Apr 10, 2012 9:16 am

has anyone looked at http://www.multiversemmo.com/ ? it is an open source MMORPG.  I used it for my disertation while at uni and it was quite flexible and all the addons are written in python (IIRC).  it has gone open source since I last used it so may be an easier way of getting the server side running as all it needs is porting to ARM processor as it already works on Linux.

User avatar
Jim Manley
Posts: 1600
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, and Powell, Wyoming, USA, plus The Universe
Contact: Website

Re: R-Pi Massively Multiplayer Online Role-Playing Games (MMORPG)

Tue Apr 10, 2012 5:42 pm

gimliflea said:

I was seeing this as running on a dedicated SD card and booting straight into the game - so is there any need for X and desktops and such.


I hadn"t published that yet, but, it actually _is_ in my use case description. This is great, you guys really are getting it. In the scenario, part of which I alluded to in my earlier post discussing saving/restoring the existing screen state, I don"t require a reboot. For those who aren"t aware, you can copy everything from the OS SD card to USB storage except the /boot directory, which isn"t needed once boot is complete. That way, you can pull out the SD card after bootup and insert another card to read/write other files, such as Pi-finity!
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!

Space
Posts: 2
Joined: Tue Apr 10, 2012 7:44 pm

Re: R-Pi Massively Multiplayer Online Role-Playing Games (MMORPG)

Tue Apr 10, 2012 9:36 pm

Ok so I'm still at the stage of working my way through Liam's Tutorials but I do like the sound of this. The chance to Learn and play at the same time, As a person with a science background working in Computers and with an interest in Astronomy, Brilliant! I like the idea it is something my kids can play with that's educational for all the above topics.

You have mentioned gravity and other constants that could be world creator defined are you also considering Atmospheric conditions? I like the thought that you could build a world to close to a Star that would be to hot to go outside. Interactions with planets would be varied and may require reasoning to understand why a new planet behaves like it does, Understanding why the Low gravity high NO planet is like going to a Fun Fair.

and as I put on my 1st post,

Someone else mentioned running Planets on the R-Pi and Solar Systems/ Galaxies on other Computers which makes sense to me.

What if as a soon (fingers crossed) to be R-Pi owner who was active in Pi-finity! I had a usercode/credit/password system which would for instance allow me to run a live CD/VBox version on any hardware I have available (I personally have collected several PC's and Laptops which my better half would like to see the back of and now I could have a use for them).

I look forward to following this project and helping in any way I can.

User avatar
Jim Manley
Posts: 1600
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, and Powell, Wyoming, USA, plus The Universe
Contact: Website

Re: R-Pi Massively Multiplayer Online Role-Playing Games (MMORPG)

Wed Apr 11, 2012 12:20 am

Space,

Glad to hear you like the concept. This is going to require a lot of work by way more than just me, and I"m currently looking at what"s already been done with other game engines to see what can be reused for this game system. I haven"t found anything yet that allows quite the level of customization of worlds I"m envisioning, but, I"ve collected about 40 potential engines/systems to be evaluated, so far, and may wind up picking and choosing code that provides the various functions we will need.

Yes, atmosphere is definitely a possible world attribute, which suggests weather, but, we"ll need to vastly simplify such phenomena into models that are easy to represent and compute quickly. For example, a cyclonic entity (e.g., a hurricane/typhoon/cyclone/tornado/etc.) could be represented by a current location center point, a current maximum wind velocity strength, and a current movement vector. The wind at any point around it could be computed using the distance from the center, a logarithmic fall-off in velocity with distance, the location of the point relative to the movement where wind speed is added on the advancing side in the direction of rotation (aka the "deadliest quadrant"), and subtracted from movement on the retreating side. That way, we wouldn"t need to compute the movement of every air molecule and a graphical representation could be built up from a limited number of overlaid wind-blown cloud image elements.

We know that there will be trade-offs needed as to how much we"ll be able to actually do on a single R-Pi with respect to keeping a smooth video display updated, maintaining the state of surrounding environmental/background and other-player objects, transceiving state updates between R-Pi nodes rapidly enough and with sufficient detail to keep each node"s display looking reasonable with respect to ground truth (things look like they"re where they should be), and that objects are non-linearly dead-reckoned in 3-D space (taking into account last-known velocity _and_ acceleration, including gravity) when, not if, object data arrives late or out-of-order (i.e., graceful degradation). It may very well turn out that some, or all, shared data will have to come from centralized or distributed state servers in order to maintain reasonable consistency of the picture.

However, we don"t even see our own solar system as it really is, since the light from the outer planets arrives hours later than when it was reflected. The stars on the opposite side of the Milky Way galaxy from our position are about 70,000 light years off from their actual positions, which is almost three-quarters of the diameter of the galaxy. The most distant galaxies we can detect are off in position by about 10 billion light years, and look nothing like what we see now, if any of their stars even still exist, as many, if not all, have already winked out of existence! There are all sorts of wonderful concepts that will be feasible to demonstrate through the games, and it will be just a Small Matter Of Programming (a SMOP, as the hardware guys like to say ) to "Make them so, Numbah One."

A lot of people have been nattering on about whether the game system should be limited to running on the R-Pi, but, that issue won"t even be considered further until/unless supply catches up with demand, which could be years, if schools and/or parents decide to cast their lot with the Foundation. I won"t have an R-Pi board for weeks, at the very least, so, I"m as anxious as everyone else to be able to develop and play Pi-finity! on any suitable hardware for the foreseeable future, and very likely well beyond that.
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!

super-6-1
Posts: 28
Joined: Mon Jan 30, 2012 1:54 pm

Re: R-Pi Massively Multiplayer Online Role-Playing Games (MMORPG)

Wed Apr 11, 2012 1:57 pm

Iv been reading this and i am very much into this idea, I have some basic java gaming coding Knowledge but i know i will have to learn another language.

As far as this project go i can see some limitations as to what will be the issue...

1. The CPU on the R-pi is only 700mhz, will the program be able to run at a op frame rate and still not over heat?

2. I know the GPU can handle that kind of usage? i know it can handle 1080p at 30fps but so can my phone.

3. The issue i see as a Beta/Alpha tester is hackers... if each ran there own world on there R-pi i can see so many issues coming up with that to the point you can hack the crap out of it...

A lot of people don't really have the background or language to program this and it would be a good way for people to learn! even tho the "average joe" can't do the complex parts im sure it will allow people like me who wanna get into it a good idea and a good Project to work on! Like as for the planets allow the people

If this project is going to get into the works, i would subjection someone hosting a live online class? and for the people who don't have there R-pi's i can set up a pre-configured R-pi environmental for them.

But i have come across another idea to get peopel started... there is a open source social network out there where each profile can be on there compuiter and not on some server. Just another idea

User avatar
Jim Manley
Posts: 1600
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, and Powell, Wyoming, USA, plus The Universe
Contact: Website

Re: R-Pi Massively Multiplayer Online Role-Playing Games (MMORPG)

Wed Apr 11, 2012 7:00 pm

super-6-1,

Yes, we will definitely be able to run the graphics at 1080p 30 fps, as Eben has run Quake 3 flat out for a day at a stretch at demos and the microprocessor has barely gotten perceptibly warm. It consumes about two watts with the CPU and GPU fully busy, and closer to one watt under typical use for most tasks – an incandescent night light consumes about five watts and is much warmer. Whether there will be any horsepower left over, especially on the CPU to do the networking stuff with multiple other players, is the big unknown, and we will need the actual hardware to run some test stub code simulating various software loads to determine what will likely be feasible. The good news is that we know a Quake 3 client works, which is what originally suggested the idea of Pi-finity! to me, and the P2P game data distribution seems like a logical approach to minimize the impact on any one Pi node, especially when a new player is retrieving world model data for the first time. Waiting for a board to start testing so that we will know what design will work best is driving me even crazier than others who just want to run a home media server, or don"t know what they want to do with a Pi.

We will be slicing and dicing the work to be done into bite-sized pieces of varying complexity, and there will be plenty of easy (if mundane, in some cases) tasks to convert/load models and other data-oriented work that beginners can learn to automate. We will be documenting everything on the wiki, starting with the requirements, then the various levels of design, the implementation (source code), test cases and automation scripts, bug status tracking, documentation, and the future feature wish list. We can certainly come up with some tutorials that show how the software is being developed, what coding style we want to follow, organization of files, etc. People won"t just be learning coding/programming/implementation, as only about 15% of the effort on a project is actually spent doing that. We"re going to involve people in as many aspects of the software development process as they can stand, and then some. Once we know what the hardware can actually support and we"re able to make the high-level design decisions that will drive everything else, we can start doing more real-time collaboration. I"m kind of a stickler for writing down _everything_, so, I"m not big on losing important info in video chat – it can"t be searched (yet – Google"s working on it) and the comments (if any) never capture most of the details.

There will be measures taken to prevent hacking of one Pi node by another. Only certain kinds of data will be shared, it will be set read-only when received, and it will be verified to prevent executables from being received from rogues. Submitted source code will be reviewed before it"s published to make sure that nothing nefarious is injected that would jeopardize everyone"s local code base.

More to Come, So Stay Tuned …
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!

Return to “Gaming”