Objective
Timg.jpeg
Once there was a dream, a person to develop a net game, take a little water, and then in the hometown of old-age, sex do things. Now, the author has done the things ahead-a person to complete an online game.
This road is a hardship. In this, I still suggest that young people do not easily embark on this path. If you are forced to embark on this path, you have to achieve a similar dream. I hope that we can help you clear the road ahead, on the journey, walk up smooth some, away from the other side nearly so little, of course, the realization of the dream can only rely on their own.
First, the pursuit of the goal
Timg (1). jpeg
It was a difficult and protracted battle. We need to plan, to harness our brains, after all, many times, the brain does not listen to the boss. But the brain has a hobby, given goals, strive to achieve goals, reward themselves. At this time, the brain will be tempted to move, joy and enrichment. With this continuous cycle, we can walk through this long road.
Here, our goal is to develop a mobile online game for a person. In order to make the goal simple point, we choose the more fiery chess game-the landlord bar. Then add a deadline for this target: two months. Due to the 0 basis, so the explanation will be more verbose.
Second, the target dismantling
Timg (2). jpeg
1. The dilemma faced
Timg (4). jpeg
A mobile phone online development, mainly related to the client and the service side. Client-side mainstream devices are primarily iOS and Android, and because mobile devices are difficult to write code, they need to be developed on a PC or Mac. That is, the entire project involves many platforms: iOS, Android, Linux, Mac (or Windows systems). and the various operating systems, the difference is very large, different programming languages, different frameworks.
2. Choice of development platform
Timg (3). jpeg
Selection criteria: The less equipment involved, the better.
Because there is no ready-made development tool on the mobile device, this project can only be developed on the computer.
Choose Mac System to do the development platform:
- Only Mac devices can publish apps for iOS;
- Game server mainstream selection of Linux systems, MAC systems and Linux systems have some common features. For example, support shell terminal, file system and so on.
- On Mac, there are Xcode development tools developed by Apple Inc. To mobile development brings a lot of convenience.
So, client development and server development are all done on Mac. If you don't have a Mac device, you can install a black Apple system on your PC (search online), and of course your PC device needs Intel's CPU.
3. Selection of the Client engine (framework)
Helloworld.png
Selection criteria: Cross-platform, easy to use, there are developers of the crowd, there are development community maintenance and so on.
It takes a lot of money, energy and time to develop a game engine, and we can only choose a ready-made game engine.
At home, the client side is mainly popular unity3d and COCOS2DX. Unity3d is a commercial software, plugins and editors are numerous, but not open source, relatively cumbersome, cocos2dx free open source, lightweight and rapid development, but the 3D features simple, development tools are not many.
For our chess project, choose the lightweight cocos2dx.
4. Service-side engine (framework) selection
123.jpg
Selection criteria: Stable operation, multi-core use, developer crowd, easy to use and so on.
The service side of the game engine is relatively small, many game companies use their own framework.
For our chess project, choose the lightweight Skynet. Like COCOS2DX, it is a homegrown open source framework.
5. Selection of the main programming language
Timg (5). jpeg
Selection criteria: Simple and easy to get started, cross-platform, preferably a development language to do all things.
Before you choose your development language, take stock of the resources we have on hand.
People: Alone
Duration: Two-month period
Fodder: Four cases of bubble noodles
So, we're going to develop a client and a server in a programming language. Preferably a code, both client and server are common.
There are too many languages to develop, and it's bad to choose a difficult disease. No way, had to choose the elimination method.
- Java language: I'm sorry, you're being despised by Steve Jobs, you can't run iOS.
- C # language: a lucky, was Unity3d red. But not very popular with the open source world. and buy Unity3d money enough to buy a few boxes of bubble noodles.
- C + + language: real Gold and silver Bachelor, supporting the entire software empire. Can be developed across the platform, relying on its credit. However, the development logic business is too cumbersome. As the author of the 10-year battle on the front line of C + + development, it inevitably goes wrong. As a server, even a bug, it is very deadly. So, just let it do the bottom, the logic business chooses the other, especially the service side.
- Python language: ancient scripting language, incredibly in the field of artificial intelligence development fire up. The efficiency is rather bad. Not very suitable for mobile development.
- Golang/erlang Language:The Erlang language is also an ancient scripting language designed for telecom services, and the code appears to affect vision and is less popular. Golang is specifically designed for distributed servers, with a group of followers. Most importantly, both of them do not support clients.
- JS Language: in the Google Browser JS V8 engine vacated, the birth of node. Since then, JS re-glow of spring, began all-around front and back, over the wine has a life of meat. However, node-to-multicore, concurrent processing business is not too strong, like a rib to work.
To exclude all later, in this project, select the Lua language:
- Lua is an embedded language that is compact, easy to use and easy to bind to the underlying interface. Can be in love with C + + to kill, together for life.
- Both COCOS2DX and Skynet support Lua. Lua is very popular in game development.
- Because LUA's virtual machine VMs are small, a single process can run hundreds of VMs. It's a great benefit in multithreaded development, providing a thread-safe, standalone VM environment. Lua also supports the process, which provides great benefits for server-side development.
- LUA supports hot updates and quickly deploys updates.
Third, a firm path
Timg (6). jpeg
Through the above analysis, we are forced to embark on this path:
a person on a Mac, using Cocos2dx-lua and Skynet to develop a bucket landlord.
Himself about the cannon, tearful also want to finish him!
On the chip source network search, if there is infringement, please inform, immediately uninstall
Personal developer, if you have software outsourcing, please contact me, qq:743712205
Technical Discussion Group: 277615647