ria pc game
translate to English   translate to Chinese
fle game engine -
fle game engine -


Balls and holes PC game / Balls and Holes PC
Dragonella   17.09.2020  /
: dress - hordes win/linux/android/html5   /
Today
4 2024 8:54
   ?

megainformatic - /
/
...

, , , , , photshop, php, c++, , delphi, cms,
Creating game on fle game engine - Simple game /    fle game engine - Simple game

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





This is the most exciting moment - because your future game is born !





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







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.

Creating new scene in fle game engine - in editor of scenes Scene Editor 1.0.2 - scene ready - ball in hole

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 -

simple_game\Media\textures\simple_game\ball\

And place inside it the file

simple_game\Media\textures\simple_game\ball\jump.tga

I.e our jumped ball

jumped ball



To the application simple game could load the sprite, and his animated show - jumping, you need to create a file inside folder

simple_game\Media\textures\simple_game\ball\



the file

simple_game\Media\textures\simple_game\ball\tex_list.txt



And enter the following line in it -

ball\jump.tga; -0.7f; 0.1f; 0.909f; 0.5f; 0.5f; 64; 128; 0; 0; 4; 8.0f; 14.0f;



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.

On this occasion I have written lessons - How animate spider, Animate the wolf from the cartoon.

After reading, you will learn how to create sprites and itself as animated, that is beginning to display their animation in the game.





After the file is created

simple_game\Media\textures\simple_game\ball\tex_list.txt

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 first start your future game created on fle game engine - we try to bring game sprite for jumping ball

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.

[previous] [next]

:
0
!
0
 !


     
  -, godot,
#442  / stranger girl - -
  godot 3.4
: dress
   
     
     
  : dress - hordes 1 4
: dress - hordes  1 - win/linux/android/html5  free ,   ,
: dress - hordes  2 - win/linux/android/html5  free ,   ,
: dress - hordes  3 - win/linux/android/html5  free ,   ,
: dress - hordes  4 - win/linux/android/html5  free ,   ,
   
     
  ,
enterra   java libgdx -
enterra 3d   godot 3.5.1 -
   2023
: dress - hordes win/linux/android/html5 version -
/
   
     
     
     
     
  ,
Kate Ryan - Ella Elle L'a
sexonix
: dress - hordes pc  free  -
: dress -   - parallel reality -  -   Win, Linux,   android
   
     
     
     
  , , 2020 - ,
  gdess 2 -
ciao 2020 -  2020 -
One Way The Elevator     Dr. Perec !!!
   
     
     
  , , , .
          -   ,   ( delphi, c++, html5), ,    ,        -   1  -    14
    2006
  -      -
   
     
     
 
Witches Trainer 1.6 and Innocent Witches 0.1 -      -
Futa in the Police Academy -
gdess c
gdess2
   
     
 
Prince of Persia , , , adventure
Dreams Reality
Little Office Trouble
Tetris
   
     
     
 
Neon Battle Tank 2
Robocop
Robocop (Ocean )
Karateka ,
   
     
     
 
Prehistorik 2 -
    15 -   The Dreik, megainformatic, ,
  Mega game
Black planet   -   ,
   
     
     
 
Teenage Mutant Ninja Turtles II
2 nights
Wolfenstein 3D -
Golden Axe -
   
     
     
  (3), (1)
Aladdin
Surprise! Adlib Tracker 2 (sadt 2)
Lamborghini ,
Risky Woods
   
     
     
 
Black Box horror
  logic
Fire power
Red Ball Forever
   
     
     
 
Teresa - dos
Shadow Knights
-0010.01
0010.01 - !
The Cycles - International Grand Prix Racing
   
     
     
 
Fantastic Dizzy adventure
Ugh!
Budokan: The Martial Spirit - fighting
Vida -
   
     
     
  (3), (1)
 Starcraft
Inspace
Key shield
Team Ninja Unkende 4 - Ninja Gaiden 4   pc
   
     
     
 
Laser Adventures - fast hardcore shooter
      !!!
Ninjuzi -  neo shooter
Plants vs Zombies 3 tower defence
   
     
  ,
Shmupnage - cosmos shooter
Undercat pc
Cold station - shooter, survival
Cut the rope - ,
   
     
     
 
Crown Dungeon 2
dragonella
crush shooter
grievous medical shooter
   
     
     
 
Foxyland 2
Foxyland 2
quidget 2
quidget 2
  ,  !
Pigglet   , english
   
     
  ,
Google Media Grabber -
Anova
anova
A Knots Story
A Knots Story
Sabotage
sabotage
   
     
  ,
24500 .
satellite /  -
ria pc game robocop
star inheritance    zx spectrum
   
     
  ,
ria pc game - pink dreams come true -
/
      24.09.2019
     - megainformatic live chat
5500 .
Game Builder -
   
     
  , ,
     6
      ?
 -
150 .
   
     
  , ,
   -    -   (kk hny) -
  -   -   (kk scp) -
  2013  megainformatic  ru
    -
   
     
  , , cms,
 freeware     / Balls on lif +    / How make a game
250 .
   megainformatic cms admin files  mysql
1250 .
   -     -   (akk hiss)
350 .
   
     
  ,
dream world -  2d    fle game engine - c++  directx 9
  -   (kk kz) -
  -
   fle game engine - Simple game
   
     
  , , ria xxl , fly snow 3d , . -
    -    PC / Balls and Holes - Green Ball Holidays PC game
ria xxl -  4.09.2019
150 .
fle game generator - fle   - fly snow 3d    1.0.3.1  13.12.2016 -
350 .
 
     
  fle game engine -
fle game engine         Windows Directx 9c -
800 .
 PC  / Ria PC game
240 ./
     1   / Balls on Lift Level 1 Run The Lift  0.9.2 05.10.2016 / version 0.9.2 05.10.2016
 
     
  - / megainformatic cms express files -
 /
700 .
1250 .
larry xxl     4.09.2019
150 .
   -04     7.07.2019
500 .
 
     
  Flash, Flash - .
 Flash
 flash
    cms
2500 .
megainformatic cms rs
14000 .
 
     
  (multi lang), , . - (megainformatic cms social), megainformatic cms groupon, keywords gen + , .
500 .
megainformatic cms social
12000 .
megainformatic cms groupon
14000 .
 -

megainformatic.ru/webjob/ - -

 
 

megainformatic.ru/webjob/

megainformatic.ru/webjob/
webjob
template selector
350 .
megainformatic cms express files +  slider
300 .

megainformatic.ru/webjob/ - -

 
     
 

,

megainformatic cms admin
1250 .
 delphi direct x 3d
megainformatic cms seo
550 .
megainformatic cms stat kit
500 .

megainformatic cms admin -

 
     
 
megainformatic cms express
350 .
megainformatic cms e-mailer
5800 .
megainformatic cms e-shop
3000 .
megainformatic cms e-pro
500 .
 
 
 
 
     
     
 

megainformatic cms free - Photoshop

megainformatic cms free
 photoshop
650 .
 photoshop -  !
700 .
 photoshop -
750 .

, Adobe Photoshop. , - GIMP, Corel Photo Paint .

 

 
 
     
 

2d 3d, , !

  ,  !
300 .
Donuts 3D
:

. , , !!! ( , ! ).

 
     
 
 
 
     
 

, : -

  -
350 .
  -
510 .
   ?
fle game engine
:  -

- , , , . - - : -

 
     
 
 
 
     
 

, 3ds max, photoshop, c++, directx, delphi php.

 3ds max
 c++  directx
 php
 3d   delphi directx
500 .
300 .

, .

.

 
     
 
 
 
     
     
 

   , !  delphi directx
  CJ andy -    mp3
 Photoshop free ( )
megainformatic cms express -     php + my sql
400 .

Photoshop free, delphi directx - , !, mp3 - , megainformatic cms express - php + my sql.

 
     
 
 
 
     
 

,

450 .
 Delphi Directx 8.1
   3d studio max
   FL Studio

, delphi directx 8.1 ( 3d ), 3d studio max, - Fruity Loops Studio

 
     
 
 
 
     
     
     
 
megainformatic cms express files

- megainformatic cms express files

megainformatic cms express files - , . mysql. . php, my sql.

- !!!

3 , , .

...

 
 

Registered comments


fle game engine -
fle game engine -


Something: Unexplained 2 captive of desires / Нечто: Необъяснимое 2 в плену желаний
Костя Коробкин Комикс Коллекционное издание - 6 комиксов, 81 страница, 220 mp3 треков
Quidget 2 игра в браузере - русская версия, english версия
megainformatic
megainformatic live chat
X
: 0,3037