On the previous pages you have read the plan on which we will make our educational game, the fundamentals of its preparation - creating sprites and placement of game objects in the game scene.
But all this would not be if the code does not revive them.
In addition, in the preceding pages I have formulated some questions that promised to answer later.
Now the time has come. Let's start in order.
As I said, for the grid cells in our game the size of 100x100 pixels has been set.
This setting, and as well as a whole series of others can be set in a special file of parameters.
If you open a directory
SceneEditor\Media\params\
you will find there a file
params.txt
in it every parameter is accompanied by a comment, that's an example of the contents of this file.
grid_cell_width=100.0f; //the width of the grid cell in pixels
grid_cell_height=100.0f; //the height of the grid cell in pixels
grid_mode=7.0f; //0.0f - dont show grid, 1.0f - not used, >2.0f && <= 7.0f segment grid, >7.0f - normal grid
grid_color=0xFFA445D5; //the color of the grid lines first pair of numbers FF - from 00 to FF sets the translucency, the other set RGB color
snap_to_grid=1; //0 - not bind the object to the reference grid point by clicking, 1 - bind
info_text_color=0xFFFFFFFF; //color information labels, the first pair of numbers FF - from 00 to FF sets the translucency, the other set RGB color
grid_scroll_speed=50.0f; //speed of scrolling grid and game scene
bg_fill_color=0xFFAEAEAE; //color to fill the background of the empty scene
scene_width_in_cells=20; //width dimension of scene - the number of blocks in width
scene_height_in_cells=16; //height dimension of scene - the number of blocks in height
I think now everything is clear. You can select a file in any of the settings for the size of the cells in your scene, you can also set the color of the grid, view its display - normal or segment, scrolling speed and other.
It should be noted that the settings should be set and save your changes before running Scene Editor fge.
If you want to change them when the editor Scene Editor fge is already running - then you need to save the results of current work and close the program. When to make changes to a file params.txt and run Scene Editor again.
Only after that the new settings take effect.
In our educational game, the ball will have to dodge the holes, the floor should be a move of the mouse movements. Somewhere must be taken into game score and displayed for successful attempts to catch the ball in the hole. Picture the scene, and all game resources must be uploaded to your game app. In the game we will also add 2 sounds - the sound of the ball in the hole successfully catching and unsuccessful, and even the background music mp3.
I will not torment you more waiting, let's start !
The first thing that starts any game programming - is the foundation - starting the initial code that must be taken to leaning on it, to create your new game.
Such a code already present in the distributive of fle game engine and we just take it "AS IS".
Code of my project, I will provisionally call simple game.
You certainly can name your project as you wish.
All we need at an early stage, namely the including of the necessary libraries and header files, configuration files in the project,
writing a start-up code - everything is already there and does not need to add anything.
If desired, in the future you will be able to examine what is and what is done to be able to expand without limit your own project. But now we will have to worry at the basis of the following questions:
1) We need to load a scene into our app and show on screen.
2) Load and display the sprite of the ball - because it is not part of the scene and will work on it separately.
3) Learning to control the movement of the scene - so it moved with mouse movements.
4) Implement the occurrence of game situations: that the ball started to move and dodge the holes, as well as
check and output them from falling into the hole and accounting game score.
5) It will also be necessary to display the dialed player game score for successful hitting the ball in the hole.
6) Add the sound - the sound of a successful hit the ball in the hole and the sound of a miss.
7) Add background music mp3.
8) Did you have any more additional questions that will have to decide.
To create our application we will use a development environment Microsoft Visual Studio 2005.
For normal compilation and assembly of examples you will also need to DirectX SDK Aug 2008.
To have the opportunity to create you own game on the basis of an example simple_game with unlimited possibilities of further expansion! - subscribe to fle game engine -
Price:
13,333333333333
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.
Let's start with a simple questions.
2) Load and display the sprite of the ball - because it is not part of the scene and will work on it separately
and display it on the screen.
Let us assume that our project is located in the folder
simple_game\
Then, inside the folder
simple_game\Media\textures\
Create subfolder simple_game, and inside it - ball -
If you've watched utility Coords2D, and tried to run from it any sprites, familiar with the included readme.txt file - it can easily guess that we just define the parameters to load our sprite ball.
If you still do not know anything about the utility Coords2D, I advise you to immediately fill this gap, as the sprites are the foundation of any game, and you need to understand how to work with them.
with the animation of the ball, mentioned above, and save the changes, and now we write the code that will make load our ball, display it on the screen, and not static and animated.
In unit
simple_game\start\start.cpp
After line
#include "DXUTsettingsdlg.h"
Adding new code
#include "game_sprite.h"
And after line
double g_fLastAnimTime = 0.0;
This code
CGameSprite g_AI_Ball_Sprite; //the variable that will store the object to work with our sprite ball
Next, you need to do a search on the code module start.cpp and find the line containing
g_Splash
After each found line to insert a - a similar line of code -
1)
g_Splash.Restore(); //this is what you find
g_AI_Ball_Sprite.Restore(); //this is what you need to add
2)
g_Splash.Free(); //this is what you find
g_AI_Ball_Sprite.Free(); //this is what you need to add
3)
g_Splash.Invalidate(); //this is what you find
g_AI_Ball_Sprite.Invalidate(); //this is what you need to add
4)
g_Splash.Anim(); //this is what you find
g_AI_Ball_Sprite.Anim(); //this is what you need to add
5)
g_Splash.Draw(); //this is what you find
g_AI_Ball_Sprite.Draw(); //this is what you need to add
6)
g_Splash.Load(); //this is what you find
g_AI_Ball_Sprite.Load(); //this is what you need to add
7)
g_Splash.NextSplash(); //this is what you find
g_AI_Ball_Sprite.NextSprite(); //this is what you need to add
The task is simple, but requires care. Do not miss out and do not add anything extra, otherwise there will be errors.
Next, compile the application.
If no errors, good. If there is - we read it for mistakes, understand and correct.
We launch our application - this is an executable file -
simple_game\simple_game\start.exe
If you did everything correctly, then after a normal run the application to see on a screen image -
The application runs, no errors. But there is no and no ball on the screen.
There is no mistake, but if you were careful and well understood as the withdrawal of sprites using a utility Coords2D, it can easily fix the problem. This is the same question we touched on page 2 - Objects, when we created our gaming scene. It also dealt with the ball disappearance from view.
If you have any ideas on this occasion you have not, then again I urged to read the utility Coords2D and especially to read the file readme.txt attached to it, run utility and find out how it can help the sprites are displayed on the screen, based on the set for them in the file tex_list.txt parameters.
You must learn to overcome difficulties on their own, without help. Without explicit hints. That's when you can find information, understand it, and actually create games. Creating a game requires a lot of work and effort.
Sometimes simple, it would seem, at first glance, the decision turns out to be useless if you do not know the subject matter thoroughly.
And the fact that it may take to clarify the many, many hours of time. Therefore, what you see is only the tip of the iceberg.
But very few of you will find the strength, and most importantly, the desire to reach the end.
Все секреты нейросетей.Оцифровка сознания книга, Ежемесячный журнал комиксов и инди-игр Мегаинформатик #2 (26) февраль 2026, Img Gen Megainformatic Img2Txt модуль распознавания изображений для Stable Diffusion WebUI Forge
читать
читать
скачать
Ежемесячный журнал комиксов и инди-игр Мегаинформатик #9 сентябрь 2025+, #1 (25) январь 2026, Img Gen Megainformatic - локальная Нейросеть для генерации изображений, Img Gen Megainformatic Log модуль для Forge версии 2024-Aug-10 - локальной Нейросети для генерации изображений
читать
читать
скачать
скачать
Ежемесячный журнал комиксов и инди-игр Мегаинформатик #12 декабрь 2025, комиксы: Веб-Мастер и Маргарита #14, Кыся #3 - комикс фэнтези, Твое будущее #1 - комикс
смотреть
читать
скачать
октрыть
Ежемесячный журнал комиксов и инди-игр Мегаинформатик #11 ноябрь 2025, комиксы: Сикс Икс Икс - Двойное дно (6xx) #14 - комикс 18+, Несравненная Рокси #1 - комикс 18+, Эмми город надежд #3 - комикс
смотреть
читать
скачать
скачать
комиксы, Ежемесячный журнал комиксов и инди-игр megainformatic.ru #10 октябрь 2025, #6 июнь 2025+ дополнение к основному номеру за июнь, Полное превращение #1 - комикс, #7 июль 2025+ дополнение к основному номеру за июль
смотреть
скачать/читать
читать
интересное
комиксы, Ежемесячный журнал комиксов и инди-игр megainformatic.ru #9 сентябрь 2025
смотреть
читать
смотреть
starcraft комикс
комиксы
смотреть
читать комикс
читать
читать
комиксы
читать
смотреть
читать
читать комикс
игра Fishka. Ежемесячный журнал комиксов и инди-игр megainformatic.ru #8 август 2025, другие комиксы
играть
читать
читать
комикс
ежемесячный журнал комиксов и инди-игр megainformatic.ru #6 июнь 2025 - специальный выпуск Квантум 28 страниц win/linux/android/html5/pdf полная версия скачать или запустить в браузере, игра lollypop 1994 времен ms-dos, ежемесячный журнал комиксов и инди-игр megainformatic.ru #5 май 2025+ 18+ дополнение к основному номеру. Все выпуски за 1 полугодие 2025 года в одном номере - #1 январь - #6 июнь 2025 108 страниц pdf/win/linux/android/html5
скачать
играть
читать
читать
ежемесячный журнал комиксов и инди-игр megainformatic.ru #5 май 2025 - выпуск 5, #6 июнь 2025 - выпуск 6, #4 апрель 2025 спец. выпуск GAME дополнение к апрельскому номеру - все комиксы по играм!, выпуск #7 июль 2025
скачать
читать
открыть
смотреть
журнал комиксов - приложение к журналу комиксов megainformatic.ru #1 январь 2025 - выпуск 1, журнал комиксов #4 апрель 2025, 18+ дополнение #3 к журналу март 2025, 18+ дополнение #2 к журналу февраль 2025
читать
журнал
18+ дополнение #3
18+ дополнение #2
игра, журналы комиксов - номера за 2025 год - январь 2025 - март 2025
играть
смотреть
читать
журнал
игры, сервисы
играть
играть
случайный сайт
играть
видео-рассказ, уроки godot, виртуальный помощник по поиску информации
играть
читать
купить
скачать
игры Многоликий: dress - hordes эпизоды с 1 по 4
играть
скачать
купить
купить
игры, музыкальные клипы
скачать
скачать
смотреть
скачать/играть
музыкальный клип, игры
смотреть
играть
скачать
скачать
разработка игр, анимационный фильм, новогодняя дискотека 2020 - песни на итальянском, игра про лифт
смотреть
смотреть
смотреть
смотреть
игры, инструменты разработки, анимационный фильм, фильм.
купить
смотреть
смотреть
скачать
игры
скачать
скачать
скачать
купить
игры в браузере
играть
играть
играть
играть
игры в браузере
играть
играть
играть
играть
игры в браузере
играть
играть
играть
играть
игры в браузере
играть
играть
играть
играть
игры в браузере (3), создание музыки в браузере (1)
играть
играть
играть
играть
игры в браузере
играть
играть
играть
играть
игры в браузере
играть
играть
бк 0010.01 - играть!
играть
игры в браузере
играть
играть
играть
играть
игры в браузере (3), скачиваемые (1)
играть
играть
играть
скачать
игры в браузере
играть
играть
играть
играть
игры в браузере, скачиваемые игры
играть
скачать
играть
играть
игры в браузере
играть
играть
играть
играть
игры в браузере
Foxyland 2
quidget 2
играть
играть
полезный софт, игры в браузере
скачать
anova игра
A Knots Story
sabotage
сервисы, игры
24500 руб.
скачать
игра
играть
игры, программы
купить / скачать
купить
5500 руб.
скачать
поздравления, уроки рисования, уроки создания сайтов
читать
читать
читать
150 руб.
комиксы, музыка, рассказы
читать
читать
слушать
читать
игра для разработки, калькулятор услуг, cms, комикс
250 руб.
разработка на заказ
1250 руб.
350 руб.
игры для разработки, комиксы
скачать
читать
читать
скачать
игры шарики и ямки, комиксы про Костю Коробкина, ria xxl игра, fly snow 3d генератор эффектов снега, частиц и др. -
скачать
читать
150 руб.
350 руб.
Создай свою игру на fle game engine -
800 руб.
240 руб./скачать
скачать
скачать
Для создания сайта - модуль отзывов/комментариев для вашего сайта в составе megainformatic cms express files -
700 руб.
1250 руб.
150 руб.
500 руб.
Уроки Flash, бесплатные Flash - игры.
бесплатно
бесплатно
2500 руб.
14000 руб.
Поддержка сайтом нескольких языков (multi lang), создание собственной системы личных кабинетов, соц. сети или фриланс - биржи (megainformatic cms social), создание сервиса коллективных покупок на базе megainformatic cms groupon, онлайн сервис подсчёта статистики ключевых слов в статьях вашего сайта keywords gen + описание кода данного сервиса, с возможностью бесплатно реализовать его аналог на своём собственном сайте.
500 руб.
12000 руб.
14000 руб.
бесплатно
megainformatic.ru/webjob/ - сервис для фриланс проектов
- место встречи заказчиков и исполнителей
megainformatic.ru/webjob/ - сервис для фриланс проектов
- место встречи заказчиков и исполнителей
Системы управления сайтом, уроки
1250 руб.
бесплатно
550 руб.
500 руб.
megainformatic cms admin - простая и компактная система
для работы и управления сайтом
350 руб.
5800 руб.
3000 руб.
500 руб.
megainformatic cms free и серия продуктов - Уроки Photoshop
бесплатно
650 руб.
700 руб.
750 руб.
Данная серия посвящена описанию приемов и методов создания изображений,
с помощью инструментария программы Adobe Photoshop. Кроме того, многие
описанные средства могут вам помочь при освоении и многих других программ
для работы с растровой графикой - GIMP, Corel Photo Paint и других.
бесплатные игры 2d и 3d, а также эмулятор Ну, Погоди!
300 руб.
бесплатно
бесплатно
бесплатно
Это серия распространяемых бесплатно игр. Вы не только можете поиграть,
но и скачать исходники, получив тем самым возможность внести изменения
в игру или создать новую !!! (эмулятор Ну, Погоди! распространяется платно).
серия игр про Веселого Буквоежку, и бесплатно распространяемая игра
Нечто: Необъяснимое - в плену желаний
350 руб.
510 руб.
fle game engine
бесплатно
Здесь представлены новинки жанра - Говорящий Комикс, Настольная игра,
А также продукт, который позволит Вам научиться создавать игры самостоятельно.
Ну и конечно изюминка в своём роде - бесплатная игра - Нечто: Необъяснимое
- в плену желаний
Серия бесплатных онлайн уроков, посвященных 3ds max, photoshop, c++,
directx, delphi и php.
бесплатно
бесплатно
бесплатно
бесплатно
бесплатно
бесплатно
500 руб.
300 руб.
Описаны практические примеры решения различных задач, возникающих при
создании игр и сайтов.
Продукты Набор разработчика и Ваше Визуальное Шоу распространяются платно.
уроки и продукты различной тематики
бесплатно
бесплатно
бесплатно
400 руб.
Бесплатные Уроки Photoshop free, Бесплатные Уроки по программированию
на delphi directx - Как создать игру Ну, Погоди!, Бесплатная Авторская
музыка в формате mp3 - Музыкальные Миры, Платно распространяемый продукт
megainformatic cms express - система для быстрого создания Вашего сайта
на php + my sql.
Проекты игр, уроки
450 руб.
бесплатно
бесплатно
бесплатно
Игра Веселый Буквоежка, уроки delphi directx 8.1 для начинающих (описываются
основы 3d игр), моделируем девушку в 3d studio max, уроки музыки - пишем
музыку в Fruity Loops Studio
megainformatic
cms express files - это простое, быстрое и очень компактное решение
для создания первого вашего сайта. НЕ ИСПОЛЬЗУЕТ базы данных mysql.
Вместо этого используются файловые базы данных. Поэтому Вы
можете использовать систему даже на хостинге с поддержкой php, но
без поддержки баз данных my sql.
Очень
проста в установке - достаточно вам скопировать все файлы на ваш
хостинг и сайт готов к работе !!!
В комплект входят 3 готовых шаблона, модули поиска и карты сайта,
а также статьи по основам создания сайта.
megainformatic Создание игры на fle game engine - Simple game - страница 4 - Код - Настройка параметров Scene Editor fge и написание кода для вывода спрайта шарика в вашем первом игровом приложении / Пример простой игры