The original

In fact, I think a lot of programmers before they get into IT, they want to do software engineering, do game development. But after college and so on, I found myself a Java CurD engineer, front-end API engineer. The original game development has gone further and further.

Looking at big guys a demo is greedy snake, Tetris, envy to no.

Really can’t enter this door, I don’t know the depth.

Here I don’t talk about how to get started, how to write my game code. I’m only going to talk about getting started, because many game engine officials already have complete examples, getting started tutorials. Just doing it yourself is enough to get started.

Mainly I am also a rookie, can only say to share how I enter

Principles of game development

Render:

Games can be viewed as video development, and the core principle is how many frames per second (for example, 60 frames per second), one frame equals one image. The principle of video playback is how many pictures are played per second to form a coherent video.

This means that the more complex your game is, you’re redrawing one of these images every second. Maybe it’s a lot bigger than what you see on a screen.

Small games are usually fine if they don’t have a lot of graphics, but if the page is too complex then the CPU is not enough. So you need a GPU to be responsible for page rendering to reduce the stress

Calculation code:

Once you’ve actually written a game, you’ll know that your code runs on the traditional server side, or on the page side, just on demand. So I’m just using it. I’m calling it.

But in games, it’s how many frames, how many runs. So it’s a sex killer.

Character movement:

Why did the character move? Because it was redrawn 60 times in real time like a video. Your code is constantly changing the coordinates of a person or object over 60 times. If you have something like a real collision, a single function is hundreds of lines of code.

Mathematics and Geometry:

In the realm of real giants, the game development ceiling depends on how good you are at math, because everything you do moves, you need to calculate. 2d game operation x,y axis, 3D is x,y,z.

Take our common jumping action, how to jump not stiff, then you need to learn the mathematics of parabola calculation.

Two, how to get started

Let me give you a few examples of frameworks, not open source libraries, because I really don’t like them. Like Threejs play, but just know the principle, and copy, but still can’t write.

Popular frameworks for games:

Cocos is mainly 2d games, a knife 999 is basically him. The old version is an open source library for c++, now the official document is js

Unity: original god language: c#, the mainstream of domestic games, if cocos 30%, then the remaining 60% is him

Unreal Epic: the most blown engine, language: c++, mainly write PC side works, in the film, animation, game various industries have useful. For example, the character rendering in the Avengers also uses it.

Then, if you want to learn, go directly to their website to find examples, find tutorials. Like going to a training class is a lot better.

And I’m personally the front end, so I started with Cocos, and COcos also has 3D, which I heard was only out in the last two years. Similarly, egret and Layabox use JS language, both of which are more 3D, but there is no official app recommendation, they are 3D games on small programs.

And then I want to say, domestic primer conscience. Why didn’t I just jump into Unreal and Unity? Because getting started is not intuitive and easy.

Personal novice game examples

Operation mode: left and right movement, space jump

Github address: github.com/ht-sauce/ba…

Game Example: HT-sauce.github. IO /barbara_go/