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


Balls and holes PC game / Balls and Holes PC игра
Вакансии
Игродельня
Today
18 октября 2017
12:20
Вход Регистрация Забыли пароль ?

cj megainformatic - музыкальный альбом БЕСКОНЕЧНОЕ ДВИЖЕНИЕ ОЖИДАНИЕ И ДЕЙСТВИЕ
БЕСКОНЕЧНОЕ ДВИЖЕНИЕ ОЖИДАНИЕ И ДЕЙСТВИЕ музыкальный альбом (с) cj megainformatic 2012 - 2014 автор музыки и слов - Синицин Андрей
подробнее...

Теги

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

Статьи сайта

megainformatic - Как анимировать паука ?

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

Creating game on fle game engine - Simple game

6 - Loading game scene



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

It's time to go to the most important and interesting question - load and display that you created in Scene Editor fge game scene.





Content

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 - 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







With jumping ball until everything is clear. Leave it for a while. Now it's time to load our gaming scene.

1) We need to create a scene to load in our app and show on screen.

Game scene or room, level - is the foundation of any game, even if the screen is blank - game scene is somehow present.

First of all necessary to prepare the resource files game scene, as described on page 2 - Objects

Remove all unused types, objects and images - leave only





simple_game\SceneEditor\Media\textures\environment\desc\scene_editor_types.txt



none; 0;
ai_player; 1;
floor; 2;
test; 3;


simple_game\SceneEditor\Media\textures\environment\desc\scene_editor_texlist.txt



ball; ai_player; ai_player\jump.tga; 64; 128; 0; 0; 4; 8.0f; 14.0f;
floor; floor; floor\floor.jpg; 101; 101; 0; 0; 1; 0.0f; 0.0f;
floor_front; floor; floor\floor_front2.tga; 101; 101; 0; 0; 1; 0.0f; 0.0f;
floor2; floor; floor\floor2.jpg; 101; 101; 0; 0; 1; 0.0f; 0.0f;


It should be borne in mind that if you change the types of files and resources, by using their scene files already will not work !

Therefore it is necessary to implement a new stage with a new assembly prescribed resources - simply repeat previously done at page 3 - Overlay objects

Creating scene in fle game engine - in Scene Editor 1.0.2 - scene ready

Now we take the whole folder

simple_game\SceneEditor\Media\textures\environment\





and copy it to a folder of resources of our game simple_game

simple_game\simple_game\Media\textures\





Folder

simple_game\SceneEditor\scenes\simple_game\



and the file you have created a game scene, I was called scene_3.SCN,

copy in folder

simple_game\SceneEditor\Media\textures\environment\scenes\



Ie. like this

simple_game\SceneEditor\Media\textures\environment\scenes\simple_game\scene_1.SCN



Scene I again called scene_1.SCN, to indicate that it will be the first (and so far only) single game scene in our game simple_game.



Scene resource files are prepared, and now we shall understand how to load the scene in the game and display.

The first thing you need - a module GameSceneFile ie. 2 files - GameSceneFile.h andGameSceneFile.cpp which will need to add to the project.

including GameSceneFile module to you project

Further, to the file start.h after line

#include "d_input.h"

you need to add a line of including of the module header file -

#include "GameSceneFile.h"



Further, in our application class CD3DGameApp After line

bool m_bShowScreenOptionsBtn;

add a new field - CGameSceneDataFile* m_pGameSceneDataFile;



It is an object to control our scene. Its methods are described in the module GameSceneFile presented, as you have already seen 2 files - GameSceneFile.h and GameSceneFile.cpp.

File GameSceneFile.h - header - describes the function header fields and methods, and file GameSceneFile.cpp describes their implementation in a programming language c++.



Now you need to add to our application module start.cpp the following lines of code



1)

#include "game_sprite.h" //this line after which you need to add

#define SimpleGameLocation L"\\Media\\textures\\environment\\scenes\\simple_game\\scenes_list.txt" //a string to be added
#define SimpleGameScenesPath L"\\Media\\textures\\environment\\scenes\\simple_game\\" //a string to be added




You will need to create another file scenes_list.txt in a folder

simple_game\simple_game\Media\textures\environment\scenes\simple_game\





And put in it the next record -

scene_1.scn



Nothing else, no line breaks and blank lines !!



Further, there is, in our application module start.cpp

2)

In method -

CD3DGameApp::CD3DGameApp



CD3DGameApp::CD3DGameApp()
{
//...

m_pSprite = NULL;

} //this line after which you need to add



//this lines should be added

void CD3DGameApp::LoadGameScene()
{
//creating a game scene
m_pGameSceneDataFile = new CGameSceneDataFile();
m_pGameSceneDataFile->PreLoadGameTextures();

m_pGameSceneDataFile->LoadLocation(SimpleGameLocation, SimpleGameScenesPath);

//obtaining location boundaries
ScrollGameSceneLeftLimit = -m_pGameSceneDataFile->m_fLocationHScrollLimit;
ScrollGameSceneRightLimit = m_pGameSceneDataFile->m_fLocationHScrollLimit;
//exhibiting locations borders available from other modules
g_fScrollGameSceneLeftLimit = ScrollGameSceneLeftLimit;
g_fScrollGameSceneRightLimit = ScrollGameSceneRightLimit;

//loading properties of objects, boundaries
//LoadGameObjProperties(GameObjectPropertyValue); //as commented out, there is not used

}





The same method must be added to start.h

in the class definition

class CD3DGameApp

after line

bool m_bShowScreenOptionsBtn;

add -





//game scene

CGameSceneDataFile* m_pGameSceneDataFile;
void LoadGameScene();
//void AfterLoadRestoreLocTextures(); //It commented out, as is not required
void MovePlayer(int NewMoveState);
void ScrollGameScene();

int m_iOldCurrSceneNum;
int m_iOldCurrSceneInx;

D3DXVECTOR3 m_vFleHeroPos;
void SetHeroLocationPos(DWORD CurrMoveState, LPD3DXVECTOR2 p_v2Pos,
float LocationXOffset);
void AnimGameProcess();
void DrawGameProcess();
bool CanEnterScene();
void LoadGameDataBlock();

}; //the above lines should be added, and this has to be - to close the class definition CD3DGameApp




Now we come back to the code of module start.cpp and added to

in method

CD3DGameApp::CreateDeviceObjects

After line -



g_Snow.Load();



lines -



LoadGameScene();

LoadGameSceneTextures(m_pGameSceneDataFile->m_pTexArray, EnvironmentTexturesPath, TextureFilesList, m_pGameSceneDataFile->m_pSprite);





in method

CD3DGameApp::RestoreDisplayObjects

add

if ( m_pGameSceneDataFile )
m_pGameSceneDataFile->RestoreGameSceneObjects();

in method

CD3DGameApp::InvalidateDisplayObjects

add

if ( m_pGameSceneDataFile )
m_pGameSceneDataFile->InvalidateGameSceneObjects();


in method

CD3DGameApp::DestroyDisplayObjects

add

m_pGameSceneDataFile->FreeGameTextures();
SAFE_DELETE(m_pGameSceneDataFile);



anywhere, but it is more convenient to the end of the file, add -

void CD3DGameApp::MovePlayer(int NewMoveState)
{
/*
If the scene is closed - the movement disabled
*/

m_pGameSceneDataFile->m_fHeroXPosInLocation = g_fHorizontalScrollOffset;
m_pGameSceneDataFile->CalcCurrentSceneNumber();
//if ( !CanEnterScene() )
//{
//x_step = 0.0f;
//}
}

//=============================================
//
// Game scene scroll
//
//=============================================

void CD3DGameApp::ScrollGameScene()
{

//before performing remember scroll location number of the current scene,
if ( m_iOldCurrSceneInx != m_pGameSceneDataFile->m_iCurrentSceneIndex )
{
m_iOldCurrSceneInx = m_pGameSceneDataFile->m_iCurrentSceneIndex;
m_iOldCurrSceneNum = m_pGameSceneDataFile->m_iCurrentSceneNumber;

g_iCurrentSceneNumber = m_pGameSceneDataFile->m_iCurrentSceneNumber;
}

m_pGameSceneDataFile->ScrollLocation( &D3DXVECTOR2(
g_fHorizontalScrollOffset + m_vFleHeroPos.x,
g_fVerticalScrollOffset ), g_fHorizontalScrollOffset);

}
//an arbitrary position of the character in the location
void CD3DGameApp::SetHeroLocationPos(DWORD CurrMoveState, LPD3DXVECTOR2 p_v2Pos,
float LocationXOffset)
{
m_vFleHeroPos = D3DXVECTOR3(p_v2Pos->x, p_v2Pos->y, 0.8f);

g_fHorizontalScrollOffset = LocationXOffset;
m_pGameSceneDataFile->m_SceneScrollPoint.x = g_fHorizontalScrollOffset;

ScrollGameScene();
}

void CD3DGameApp::AnimGameProcess()
{

m_pGameSceneDataFile->AnimateGameScene(g_fElapsedTime);
m_pGameSceneDataFile->AnimLocation();

MovePlayer(0);
}

void CD3DGameApp::DrawGameProcess()
{
m_pGameSceneDataFile->DrawGameSceneView();
m_pGameSceneDataFile->DrawLocation();
}

bool CD3DGameApp::CanEnterScene()
{
return true; //test
}

void CD3DGameApp::LoadGameDataBlock()
{
m_pGameSceneDataFile->m_SceneScrollPoint.x = g_fHorizontalScrollOffset;

if ( g_fHorizontalScrollOffset != 0.0f )
ScrollGameScene();
}





Finally, the method calls

AnimGameProcess();

и

DrawGameProcess();

Responders must be added for the animation and display gaming scene

method

CD3DGameApp::FrameMove

g_AI_Ball_Sprite.Anim(); //after a string which must be added

AnimGameProcess();//is a string that must be added



and in method

CD3DGameApp::Render

case APPSTATE_READY: //after a string which must be added

DrawGameProcess();//is a string that must be added



Save the changes made in the project build with MSVS 2005. If everything is ok, then when you run the application you will see on the screen you created in Scene Editor fge game scene and jumped ball in it.

Showing app creates a game scene simple game

An example of the future of the game with full source code you can get a part of a paid subscription to fle game engine.

The example also contains the source code for generating snowflakes or other particles, and switching display backgrounds, and some other
interesting and useful features that will be considered by us in subsequent lessons.

Order subscribe to fle game engine -


Price: 10 usd.

Then you will get a more recent version Scene Editor fge 1.0.2 (for now) with the support of more possibilities in the grid, setting scrolling and others. In the free version, these features are not supported. More details about the distributive of a paid subscription.





For correct building of the project you will need to Microsoft Visual Studio 2005

DirectX SDK August 2008



https://www.microsoft.com/en-us/download/details.aspx?id=23549
Details
Version:
9.27.1734
File Name:
DXSDK_Aug09.exe
Date Published:
9/8/2009
File Size:
553.3 MB




To project could compile correctly, follow these steps::

Open project in MSVS 2005

in Solution Explorer window right click on the node start - designating the project name
and select

Properties

project properties

In the window that opens start Property Pages left open the node

Configuration properties > C/C++ > General

project properties Additional Include Directories

then to the right in the field Additional Include Directories

instead ..\..\..\..\..\..\..\Include

you need to write a valid path to the folder Include, part of the DirectX SDK August 2008.

Ie. we need to replace part of a string ..\..\..\..\..\..\..\Include

to absolute path -

for example it may be that -

C:\DXSDK9_Aug2008\Include

or relative -

for example it may be that -

..\..\..\..\..\..\..\..\..\Include



A similar effect you need to do to Debug build - select in the Top left Configuration variant Debug.

project properties Additional Include Directories for Debug build

Asked: Do you want to save changes you've made in the property pages ?

Answer in the affirmative - Yes.



Next, open the left node

Configuration properties > Linker > General

and in field

Additional Library Directories

change value

..\..\..\..\..\..\..\Lib\x86

project properties Additional Library Directories

on your path to the appropriate set DXSDK9_Aug2008

here also is the analogy, you can specify an absolute

C:\DXSDK9_Aug2008\Lib\x86

or relative - depending on where the disc is the project folder simple_game.

For example it may be that -

..\..\..\..\..\..\..\..\..\Lib\x86

This action needs to be done and for Debug configuration of project.

select in the Top left Configuration option Debug.

Asked: Do you want to save changes you've made in the property pages ?

Answer in the affirmative - Yes.



If everything is configured correctly. Press ОК.

Then in the field under the main menu, select the project build option Debug or Release in the tool bar

just to the right of the button with a green triangle - meaning the start of the project environment MSVS 2005 in debug mode.

Next to the main menu, select the item Build > Clean Solution - to clear all obsolete object files.

Then Build > Rebuild Solution.

If everything was set up correctly, and in the course of the compilation, you do not receive any error messages in the folder

simple_game\simple_game\

you can find the created file start.exe, which can be run to perform.



[previous] [next]



 

Registered comments



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


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