python游戏开发框架_firefly: Firefly是免费、开源、稳定、快速扩展、能 “热更新”的分布式游戏服务器端框架,采用Python编写,基于Twisted框架开发。Firefly的设计理...

What's Firefly Game Server Framework?

        Firefly is a free, open source, stable and rapid expansion, to "hot update" distributed game server side framework。Written in Python, based on the Twisted framework development。Firefly's design philosophy is to "let developers focus on front-end",It includes a development framework and database caching services, and other basic services game servers,Save a lot of game developers working hours,Truly allows the user to focus on gameplay logic。It can be used to build a custom distributed architecture, only need to modify the configuration file to the appropriate。

Benefits Features

Single-threaded multi-process architecture, distributed architecture supports custom;

Convenient server extension mechanism that can rapidly expand the server type and quantity;

Long with the client using TCP connection, without considering issues such as stick package;

Packaging Data Cache Service;

Can achieve real-time thermal profile data as well as game logic, the client player without feeling;

There are dozens of basic gameplay system modules assembled using (v1.3.0 available);

Frameworks introduced

123.jpg

management, firefly is a multi-process, distributed game server。So each game server (process) management and extensions are firefly very important part of the framework by abstracting the server extensions very easy。

Network,Client connects communications, server inter-process communication, etc. constitute the entire game framework in the context,All games in this context processes are built on。Communication with the client uses a request / response style, so by the client's request, the server will give the appropriate response,The server can also take the initiative to push the message broadcast to the client。These requests are based on a request instruction number。(Such as defining 101 for the landing instructions)communication between the server process using the asynchronous callback method, thus reducing the inter-process communication in the network time-consuming。

Data, Data processing is an important part of online games。In online games have a lot of data needs to be stored, needs to be updated, which makes the database server to read and write efficiency become the biggest performance bottlenecks。firefly's db processing can be a database table data cache to memcache in the form of objects and are able to carry out the corresponding object method calls to manipulate data。In a different process by instantiating instances of the same name cache, the data are synchronized。Cache object and can write data back to the database。

Framework for thinking

A basic server that is running a non-stop applications。In a distributed game server, we need to have a server function, listen for client connections, monitor other services processes messages to connect to other service process,Some require a database connection and caching services。As shown

234.jpg

net connect Handle client connections,Other news monitoring service process root,node to connect to other service process,db database,“cache” database,cache 。Do they need to listen for client connections, whether listening other service processes messages, etc. This is all can be configured in config.json,Including the name of the server as well as the various connections between each server。So you can customize their own distributed architecture。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值