PHP web game learning-explanation of Xnova (ogame) source code (1)

Source: Internet
Author: User
This article mainly introduces the source code explanation of PHP web game Xnova (ogame). For more information, see the following introduction.

Xnova (ogame) is one of the world's most popular war strategy web games, and is also the object of most similar web games. You only need Web browsers to download online games that can be played by clients.

What kind of game is Xnova?

You are a cross-Galaxy ruler and use different strategies to expand your strength. You will start your business on a planet of your own, where you use existing resources to build your economic and military foundations. Through scientific research, you can obtain the entrance to New and advantageous technologies and new weapon systems. As the game goes on, you will migrate to multiple planets, unite with other players, and engage in business or war with other players. No matter what you want to do, Xnova can help you do it!

Xnova is a game of the same type and subject matter as the popular Web game OGame (Galaxy Empire. OGame is the object of webgame plagiarism among many Chinese Three Kingdoms (BTW, I hate the Three Kingdoms ).


Disclaimer: the source code I learned to use is an open-source project. it cannot be used for commercial purposes. Otherwise, the consequences will be borne by me!

The original copyright belongs to the Xnova development team!

The iron long version is modified based on Xnova v0.8e!

This version has been stopped and we do not provide any technical support!

This site provides the ultimate version of this system!

Source code: http://www.bitsCN.com/codes/180759.html

The learning process is based on the program execution order. before reading the source code, we first learned the basic PHP Tutorial.

If you do not understand PHP, please first learn the basic PHP Tutorial, or have a better C Foundation!

It is best to install the PHP debugging tool. I am using Zend studio 5 and Zend Debugger 5. it is not difficult to use it, and these can be found by Google. Finally, prepare a cup of hot tea to start work.

2. entry (index. php)

This file is the entry to the game, with only a few lines of code. the function is clear at a glance: First Judge config. php file size is zero; if yes, it will be redirected to the install/directory for installation; otherwise, it will be redirected to login. php shows the login page. The source code is as follows:

if (filesize('config.php') == 0) { header('location: install/'); exit();}header('location: login.php');

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.