Development of games using Windows GDI (1)

Source: Internet
Author: User

 

First game preliminary plan

 

Before Game Development, you usually need to perform preliminary analysis and planning on your own game. Organize and analyze all foreseeable problems.

 

Although simple game planning can be built in mind. But as a tutorial, let's proceed with the process.

 

First, I decided what kind of game I was doing. I thought it would be a tank war for the red and white machines.

 

Because you can find a full set of tank resource images on the Internet (for independent programmers, the most difficult thing is to obtain the resource images ).

 

In addition, the tank war is also a typical brick texture, which is the method used by most games and can be used to explain the creation of the game.

 

The following is a simple plan. You should be familiar with the previous red and white machines:

 

Game name: Tank wars

English name: Tank war

Version: 1.0

 

Game Summary:

The game is a 2D PC game operated by a single user. The running platform is windows and developed using vc2008. Because the general game framework does not use MFC, we still use Win32 API directly and use GDI programming.

Game process:

The game screen is a full map. At the beginning, the player has a tank and a bastion at the bottom of the map. The bastion host contains an e tag.

From the top of the map, place the tank in three places on the left and right. The condition for victory is to defeat all the enemy tanks.

If the player's tank is cracked or the e tag in the bastion host is hit, it fails.

Players have three chances of resurrection.

 

Game interface:

In the upper-left corner of the screen, the score is displayed. The remaining number of resurrection attempts and remaining enemy tanks are displayed.

 

We need to specify the size of the bricks when using the brick texture. The picture I downloaded is 32 pixel * 32 pixel, so we also use 32*32 bricks.

Now most machines use 1024*768 screens, so we can set the game window size to 800*600, which is 25 cells (25*32 = 800 ), the vertical line is 18 cells (18*32 = 600)

 

To simplify the game, set the map size to 25*18. This makes it easy to implement without a scroll.

 

 

Our map is divided into the following types of terrain

Land: normal

Woods: bullets can pass through, tanks can pass, but it will hide

Critical: bullets can be penetrated and tanks cannot pass

Steel Wall: bullets cannot pass through, tanks cannot pass

Water: bullets can pass through, tanks cannot pass

Snow: bullets can pass through, tanks can pass, but deceleration

 

Then there will be the following items on the map:

Heart: reward a resurrection opportunity

Clock: the enemy stops moving for 10 seconds.

Tool: Enhance firepower and launch dual-gun

Bomb: Blow up enemy tanks on all images

Hormones: Tank Acceleration

Shield: protection base 15 seconds

 

 

 

In the early stage, you can use Photoshop to create images and inspire some inspiration.

Wait for me to finish the picture and paste it again.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.