ria pc game
translate to English   translate to Chinese
fle game engine - движок для создания игр
fle game engine - движок для создания игр

Balls and holes PC game / Balls and Holes PC игра
16 августа 2018
Вход Регистрация Забыли пароль ?

Вакансии megainformatic.ru/webjob


создание сайтов, создание игр, дизайн, игры, информатика, уроки photshop, php, c++, музыка, delphi, cms, робосайт

Статьи сайта

megainformatic - Уроки Photoshop

megainformatic - Купить Уроки Photoshop - Чудеса

megainformatic - Купить Уроки Photoshop - Рисуем и Анимируем

megainformatic - Эмулятор игры Ну, Погоди!

сайт megainformatic - Говорящий Комикс Веселый Буквоежка

megainformatic - Что нужно для создания собственного сайта ?

megainformatic - Моделируем девушку в 3d используя 3ds max

megainformatic - Уроки Fruity Loops Studio - пишем свою музыку

megainformatic - Уроки Fruity Loops Studio - пишем свою музыку - урок 1 - Быстрый старт

megainformatic - Сброник статей по дизайну и компьютерной графике. Обзор.

megainformatic - Уроки 3d на delphi directx - Вывод Заставки

Добро пожаловать в систему управления сайтом megainformatic cms

megainformatic - Создание эскиза и макета страницы сайта

megainformatic - Верстка созданного макета

megainformatic - Добавление модулей обеспечивающих минимально необходимый функционал

megainformatic - Основы добавления контента на сайт, управления и поддержки сайта

megainformatic - Проверка работы сайта, установка на хостинг

megainformatic - Основы продвижения созданного сайта

megainformatic - Создание шаблонов

megainformatic - Создание интернет-магазина

megainformatic - Музыкальные миры - композиция Морозное утро - 10 версий


megainformatic - Нечто Необъяснимое - пре релиз

megainformatic cms admin

megainformatic cms admin

megainformatic - Основы создания 3d игр - проект Тайны Морских Глубин

megainformatic - уроки delphi directx 8.1 3d - Основы Вращений и Управления камерой

megainformatic cms seo

megainformatic cms admin

megainformatic - Моделируем девушку в 3d - Подготовка 2d-эскиза тела человека

megainformatic cms stat kit

megainformatic cms seo

megainformatic - Теория и практика 3d игр - О Кватернионах

megainformatic - Теория и практика 3d игр - Основы теории векторов

megainformatic - Теория и практика 3d игр - Важные замечания

megainformatic - Моделируем девушку в 3d используя 3ds max - Подготовка к моделированию ноги - готовим ширму

megainformatic - Моделируем девушку в 3d используя 3ds max - Выполняем моделирование ноги

megainformatic - Моделируем девушку в 3d используя 3ds max - Улучшаем созданную модель женской ножки

megainformatic cms stat kit

megainformatic - Подводная лодка и подводный мир

megainformatic - megainformatic cms - Форма для смены шаблонов сайта - модуль template selector

megainformatic cms social

megainformatic cms social Руководство пользователя

megainformatic - megainformatic cms - Форма для смены шаблонов сайта - модуль template selector

модуль слайдера

ТЗ на сайт коллективных покупок

модуль slider

megainformatic cms seo

Поддержка сайтом нескольких языков - модуль multi lang

Поддержка сайтом нескольких языков - модуль multi lang

megainformatic - Моделируем девушку в 3d используя 3ds max - другие статьи сборника статей - обзор

установка нового шаблона в joomla 2.5.4

Описание продукта megainformatic cms social

Описание продукта megainformatic cms social

megainformatic - ТЗ на сайт по аналогии rys-stroi.ru

megainformatic cms groupon

Creating game on fle game engine - Simple game

page 10 - Testing collisions

читать данную статью на русском

Defining boundaries for the ball and hole need to check their intersection - it will be called the mechanism of collision checking.


page 1 - Sprites

page 2 - Objects

page 3 - Overlay objects

page 4 - Coding - Setting parameters for the Scene Editor fge and write code to display the sprite ball in your first gaming application

page 5 - Show jumped ball

page 6 - Loading game scene

page 7 - Moving game scene

page 8 - Foreground - Closing of the scene from the cavities by means of a black texture with a slot, restricts the movement of the scene

page 9 - We realize getting into the correct hole and around the holes - holes define the boundaries of sprites and sprite jumped ball

page 10 - Testing collisions

page 11 - Game score, sounds, music

First, for our game objects - hole and jumping ball need to define and mark the boundaries of these properties so that they can be used.

Create a file for the detection limit


And we define border -

ball; 0.0f; -0.07f; 0.08f; -0.16f; 0.5f;
hole; 0.138510f; -0.144f; 0.1f; -0.085f; 1.0f;

1 value - is the name of the game object, the following 4 parameters - its boundaries - the left upper point - x and y, and the lower right - also.
The last value - this is the scale factor - it is taken when calculating the boundaries.

Now create a file for a description of the properties - to establish a link between the objects and the boundaries of game objects


We write to -

// description Ball properties
begin =;
Name = ball;
Collided = true;
end =;
// description Hole properties
begin =;
Name = hole;
Collided = true;
end =;

As you can see the description of a particular notation, ie. a meta-language.
Property Name - represents the ID of the game object to which will be attached property boundaries defined by the borders of the file.

Property Collided = true - means that will be used collision checking or otherwise collisions for a given game object. The value can be set in false. But in the context of this lesson to us for both objects need collision checking.

Real collisions not allow a single game object to pass through the other. For example, if a game player object encounters an enemy or a wall - it does not pass through it.

In our case it will set a slightly different behavior: the ball can pass through the hole. It will be only recorded the fact of falling into the hole and nothing else.

In other words, collision detection will work the usual way, and the results will be used a little differently - a natural phenomenon of repulsion of objects from each other will not be used.

To implement the collision check jumping balls with holes need to do the following:

In module


Include header files collision.h and game_object_properties.h -

after line

#include "textures.h"

add -

#include "game_object_properties.h"
#include "collision.h"

after line

#define SimpleGameScenesPath L"\\Media\\textures\\environment\\scenes\\simple_game\\"

add -

// names descriptions game objects properties files
// and collision boundaries

#define GameObjectPropertyValue L"\\Media\\prop_desc\\game_object_class_properies.txt"

//indexes game objects having properties in the properties file
#define ball_prop 0
#define hole_prop 1

For movements of jumping ball, and check for collisions and processing add


After line -

D3DXVECTOR2 m_scrCursorPos;

this code -

//move jumping ball
void MoveJumpedBall();
float m_fCurrentTimer;
float m_fTimeDelay;
float m_fMoveSpeed;

D3DXVECTOR2 m_v2MoveDirs;
void ChangeMoveDirs(int Dir);

void JumpedBallContactHole();

bool m_bContactWithHoleDetected;
float m_fHoleX;
float m_fHoleY;

bool change_moved_ball_TimePause(float PauseInterval = 0.0f);
void change_moved_ball_ResetPauseTimer();
DWORD change_moved_ball_m_dwOldTime;
DWORD change_moved_ball_m_dwTime;
float change_moved_ball_m_fTimePeriod;

//overrided scene and its methods

//hide plates of all holes (its front part)
void CreateOverridedGameScene();

CPtrArray* m_pOverridedGameScene; //an array of elements of overrided game scene
void FreeOverridedGameScene();

//hide/show mouse pointer
void HideSystemMouseCursorView(bool Hide);

//score hits in the hole
int m_iHoleHits;
bool m_bInHole;

//reset falling into hole
bool hole_hit_TimePause(float PauseInterval = 0.0f);
void hole_hit_ResetPauseTimer();
DWORD hole_hit_m_dwOldTime;
DWORD hole_hit_m_dwTime;
float hole_hit_m_fTimePeriod;

In module




In method

after line


code -


At the end of the module


add code -

//move jumping ball
void CD3DGameApp::MoveJumpedBall()

//check the ball contact with the hole

The implementation of other methods and their use you can look yourself in the code of module

Let me just note that in order to check the ball collision with the boundaries of the hole using a function call CollisionDetected, which checks whether the object boundaries intersect ball with hole object boundaries and if so - it is returned true.

If a collision is fixed - the plate for this hole (the front part of it is displayed), to simulate getting the ball in the hole. As soon as the ball moves away from the hole in the side - a collision will have to return false and plate for this hole is no longer displayed. Visually, the ball will just jump on the surface of the landscape.

Download the game finished simple game version 1.0.0 4.01.2017 (without sourse code).

Source code and other useful materials and tools you get with a paid subscription order !

Size: 51,8 Mb

To have the opportunity to create their own game on the basis of an example simple_game with unlimited possibilities of further expansion! - Subscribe to fle game engine -

Price: 10 usd.

Subscribing to fle game engine You get an example of the game simple game with source code, and you can not just read everything that will be described below, but do yourself in your own application with the possibility of unlimited expansion. Also, you get

for the latest version Scene Editor fge 1.0.2 (on current moment) with support for more features: grid settings, scrolling, and more. In the free version, these features are not supported. more details about the distibutive of a paid subscription.

[previous] [next]

megainformatic live chat
Начать беседу

Registered comments

fle game engine - движок для создания игр
fle game engine - движок для создания игр

Something: Unexplained 2 captive of desires / Нечто: Необъяснимое 2 в плену желаний
Костя Коробкин Комикс Коллекционное издание - 6 комиксов, 81 страница, 220 mp3 треков
megainformatic Размещение баннерной рекламы у нас

Время загрузки: 0,9598