Re: Web development?

Everything you've mentioned except full multiplayer is actually not so hard and, for a certain type of game, multiplayre isn't either.  In this case, since it's a client talking to a server, all you need is Django and perhaps the Django Rest Framework.  You can do without that last one, however.  Django will give you scoreboard serving in a day or two of work, though I make no statement as to the difficulty of the client (this varies widely depending on programming language).  I'd suggest looking at requests as well, a python library for calling HTTP-based APIs.  I started learning these technologies, but am much more versed on how you make your own protocols and use the socket APIs, as this is what both of my MMO prototypes do.
keep in mind that knowing exactly how HTTP works, i.e. low-level socket programming, isn't necessary.  You need the basics of the internet, but after that point you can just pretend that it's opaque and magical.  This is what Django lets you do.
The store is also the same sort of thing, only this time you need a request for the purchase and an error response.  The error is required when two players might buy the same item: the request that gets there first wins, and the other player needs to know that that item no longer exists in the store.  If done incorrectly, an online store can lead to item duplication bugs.  The severity of this problem depends on the game.
You can do board and card games through HTTp-based APIs, but you're now getting into places where Django will start to fall over.  Django is all about responding to requests and stopping and not so much on-running processes.  You can model a card game with django, but doing things like placing time limits is possibly a bit harder.  Not impossible, but I'd start looking to something else.  For something like a card game, a custom JSON-based protocol is what I'd consider.  Alternatively, there's HTTp streaming, but neither fits well into Django as far as I'm aware.  This is the point when you want to maybe look at Twisted or Gevent.  It's worth noting that Gevent looks great at first but falls down hard unless you really think hard, as it has a lot of "magic" going on.  The difference between this and the previous two things is that you probably want to keep the connection open, and Django is not at all aimed at that (the end of an HTTp request, unless it's HTTp streams, is the socket being closed by the server).  it is worth mentioning Python 3's asyncio, which appears to combine the best of Twisted and Gevent and has people involved from both of them.  I have not used this framework, but it does look really nice.  If you look at Twisted and go "[[wow]], that's complex", you are so far from alone that I can't even describe how far from a lone you are.
A chat server is the same problem as a card or board game, but easier because you needn't worry about game logic.  In both of these cases, security is a concern-especially if the intent is commercial.
Full realtime multiplayer games are really, really hard algorithmically.  The reason for this is that the network is not instant.  If I do something, it takes anywhere from 20 ms (UDP, which adds a whole new set of complexities, and I'm on a really good high-end internet package) to half a second or more for the server to know about it.  The server then communicates this out to other players, all of which take anywhere from 20 MS to half a second or more.  Syncing the data is easy.  Making the game feel like it's not molasses is really hard.  If you design it poorly, both in coding and gameplay terms, I don't find out about things soon enough.  If you shoot me and that update takes a whole second to get to my client, I have a whole second where the server thinks I'm dead and I don't know I actually am.  If the client has to wait on the server to say okay before letting me take every step, my movement speed depends on network round-trip time; everyone ends up moving at different speeds.  These are surmountable problems and I'd suggest looking up the quake and half-life protocols to understand it better.  Once updates need to be noticed in less than 5 seconds or so, you need to start being creative.
Alternatively, you can cheat and make the server very light-weight, sharing only a bit between them.  In this case, you make everyone basically play their own game, except for some shared elements.  Games in the sighted world that do this include Demons Souls (you can leave messages for others and invade for PK, but it's never more than two players playing together).  I've heard that Swamp does a lot of this kind of thing from a lot of people, but never played it far enough to make it glaringly obvious to me what it does and doesn't share.

_______________________________________________
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Development room : stewie via Audiogames-reflector
  • ... AudioGames . net Forum — Development room : camlorn via Audiogames-reflector
  • ... AudioGames . net Forum — Development room : frastlin via Audiogames-reflector
  • ... AudioGames . net Forum — Development room : camlorn via Audiogames-reflector
  • ... AudioGames . net Forum — Development room : frastlin via Audiogames-reflector
  • ... AudioGames . net Forum — Development room : stewie via Audiogames-reflector
  • ... AudioGames . net Forum — Development room : frastlin via Audiogames-reflector
  • ... AudioGames . net Forum — Development room : stewie via Audiogames-reflector
  • ... AudioGames . net Forum — Development room : camlorn via Audiogames-reflector
  • ... AudioGames . net Forum — Development room : frastlin via Audiogames-reflector
  • ... AudioGames . net Forum — Development room : camlorn via Audiogames-reflector
  • ... AudioGames . net Forum — Development room : Sebby via Audiogames-reflector
  • ... AudioGames . net Forum — Development room : Sebby via Audiogames-reflector
  • ... AudioGames . net Forum — Development room : frastlin via Audiogames-reflector
  • ... AudioGames . net Forum — Development room : camlorn via Audiogames-reflector
  • ... AudioGames . net Forum — Development room : frastlin via Audiogames-reflector
  • ... AudioGames . net Forum — Development room : arqmeister via Audiogames-reflector
  • ... AudioGames . net Forum — Development room : frastlin via Audiogames-reflector
  • ... AudioGames . net Forum — Development room : frastlin via Audiogames-reflector
  • ... AudioGames . net Forum — Development room : camlorn via Audiogames-reflector
  • ... AudioGames . net Forum — Development room : frastlin via Audiogames-reflector

Reply via email to