2015-03-08 11:49:20

Update : I just released a litle demo about weapons. smile (link: http://forum.audiogames.net/viewtopic.php?id=15537 )

2015-05-01 12:57:23 (edited by Genroa 2015-05-02 01:55:12)

New version : v0.10
- fixed a crash when trying to compile a game using the engine (discovered a BGT compilator bug)
- added a simple Inventory actor with adding, removing and saving/loading functions
- added a weapon system for weapons behaviour (no bullets system included for now)
- actors list update is now automatic : launch generate.bgt to update the engine and rebuild all generated scripts
- fixed some problems with events
- added a game.quit() function to quit the game loop
- reworked the whole actors class tree
- included a simple log system. When the game engine crashes, if no error message appears, take a look at the log file. It may be useful.

Link : https://www.dropbox.com/s/lchbecuc3ah12 … 0.rar?dl=0

2015-05-01 17:55:56 (edited by Orin 2015-05-01 18:19:37)

Has the help been updated recently? What I'd like to know is how to create a game, perhaps a basic sidescroller with two levels, that tells me how to use the class...
So I create a new BGT file and always include the game.BGT right? This means that the functions and other classes that the Heat Engine uses will be utilized.
I'll take a look at the help again, but a bunch of stuff is throne at me without any kind of examples.
Edit: Is that game example ready that the help mentions? Something about Goblin Hunter?

2015-05-01 18:27:39

Instead of the Goblin Hunter which I wanted to do, I made a little example posted here : http://forum.audiogames.net/viewtopic.php?id=15873 , the Robot Factory. This is a very short game with only one level, showing a simple game : three classes in fact. The problem with goblin hunter is that it was involving a lot of knowledge, so giving this kind of example to someone who never used the engine may be tough.

The help hasn't been updated and is lacking of examples, I agree with you. I will update it this evening, with the very last version and more and more examples. smile

Your beginning is right, the only thing to do in order to use the engine is to include Game.bgt, which gives you a global object called game, wich is from the class Game. This also gives you all the other includes of the engine smile

2015-05-02 01:16:25

Hi, I have no programming experience. I've looked at BGT before, but it seems a bit difficult for me. Will this Injun be of any help to me at all? I really want to learn how to make my own audio games.

2015-05-02 01:26:51

Whatever the way, you have to learn basic programic, algorithmic and the basics of your language. Here, it's BGT. This helps a lot to make games, but it doesn't replace the basic programing knowledge. smile You can't program with this without knowing a little about BGT.

2015-05-02 01:35:39

Okay, so here is a test game I started to see if I can get some boiler plate code working, for starters.
I am not even using the Factory Controller object, so why is my game trying to use it?

#include "HeatEngine\\Game.bgt"
#include "dynamic_menu.bgt"
Game game("Test");
sound music;

void main()
    
{
        dynamic_menu menu;
int choice;
menu.add_item_tts("New Game");
menu.add_item_tts("Continue Game");
    menu.add_item_tts("Exit Game");
    
    choice=menu.run("Please choose an option from the following menu.");
    
    if(choice==-1)
{
        alert("Error", "There was a problem with menu loading.");
        exit();
}
    
    if(choice==1)
{
        game.run();
}
if(choice==2)
{
        if(file_exists("saves\\save.hemap"))
        game.config.setMapFile("saves\\save.hemap");
    else
        alert("Woops," "There is not a saved game to load.");
}
    
    
if(choice==3)
exit();
}

}

I get the following compile error when BGT tries to compile:

File: FactoryControler.bgt
On line: 0 (0)
Error: Could not find script file in any of the following locations:
'C:\Heat Engine\HeatEngine PRE-RELEASE v0.10\HE\HeatEngine\Controlers\FactoryControler.bgt'
'C:\Program Files\BGT\include\FactoryControler.bgt'

That would be because I don't want it to be there? What does the generate.bgt file supposed to do?
Thinking that it was trying to use it because I had the Robot Factory demo in the same directory, I moved it, but no go. Do I have to make the maps and all that before I can load a basic menu?
Thanks.

2015-05-02 01:53:04 (edited by Genroa 2015-05-02 02:29:16)

You are using the engine just right. The problem may comes from me, one moment please.

In the HeatEngine\Controlers\ directory, the Controlers.bgt file lists all controlers (I didn't automated it for now). Inside there's still the FactoryControler included but the v0.10 doesn't have the files from the demo. I'm correcting it right now.

EDIT : the file has been corrected, you can remove the line by yourself or you can download the engine again. smile


There's only one error in what you did : if the player choose the "new game" option, the game loop is launched without loading anything in the game world, on the scene. There should be a game.config.setMapFile before loading, check the main file of the demo again smile

Everything else is fine! Please also note that the online documentation has been updated ; you can  now find a Basics and tutorials>Step by Step tutorials> Robot Factory section, explaining a lot of things about the engine through the study of the game smile


I'll also answer to your questions : the generate.bgt file generates .bgt files like the HeatEngine\Actors\ObjectsClassTree.bgt file. Theses files are vital, because they lists the actors, controlers and events known by the engine. Each time a new actor is created, the file listing them must be updated. But because it's a little bit tricky, the generate.bgt script generates it for you. Calling it each time you create a new actor, just launch the generate.bgt script to keep the engine up to date. smile (before the v0.10 you had to modify them manually) I will soon (tomorrow maybe) update the generate.bgt file to rebuild the events list and the controlers list. Right now it only rebuild the actors list.

There's no need to load maps and all before the menu, you can do it whenever you want...but you have to do it before calling the game.run() function. In fact, it's often just line just right before loading.

2015-05-02 02:55:53

I can't wait until you include 3D audio in this. Sounds awesome. And building vehicles will be interesting. Hopefully you can make a racing game with this thing.

Sincerely:
John Follis
Check out my YouTube Channel.

2015-05-02 03:15:48

Yeah I thought to add a standart Vehicle class when I saw someone was programing a racing game here, and I think this will be added one day (but I'm all alone to build this, if you want to share the actor classes you made, feel free to do it here or in a new thread! big_smile )

For the 3D audio you will have to wait a little bit, because the FMODEx wrapper is kind of buggy sometimes. And it doesn't give some things like streaming, knowing the sound length sometimes, etc.

2015-05-02 07:21:18

It'd also be nice if we could make a class for this engine to add screen reader support. Speech Manager does this, but I've had issues with it in the past.
Also, can you add the documentation to the engine files itself? I mean, it is, afterall, the engine documentation.
I can't find it again so I need a link.
Thanks.

2015-05-02 13:00:18 (edited by Genroa 2015-05-02 14:55:46)

The link to the web site is : http://heatengine.craym.eu . The online documentation is http://heatengine.craym.eu/Doc/Heat%20E … 0Help.html and you can download the documentation file here : http://heatengine.craym.eu/Heat%20Engine%20Help.chm smile

That's a good idea, I will add the documentation in the engine files this afternoon when I will have finished the generate.bgt file. smile

For the screen reader support, I don't know what BGT can do about this and how it works (I never used them) bu if you give me a little more explanations I could add this to the engine smile what would you see added to help you using screen readers?

2015-05-02 16:28:03 (edited by Genroa 2015-05-02 17:26:30)

The v0.10 revision 1 is out. The generate.bgt file has been replaced by the rebuild.bgt file, rebuilding actors, events and controlers list. If any strange error like a missing actor file occurs, rebuild the engine and all should be fine. Obviously, rebuild the engine each time you add a new actor, event or controler. smile

Link : https://www.dropbox.com/s/7yptdb6169va6 … 9.rar?dl=0

As usual, the download link on the website has also been updated, and the documentation is now provided with the engine in a .chm file, as you asked smile

2015-05-02 21:16:47

I'm not sure where the link to the Robot Factory example is in the documentation, but I figured that maybe the link was changed. It still says "Real Case: Goblin Hunter" in the online documentation.

2015-05-02 21:33:36

Go in the Basics and tutorials section, and then in the Step by step tutorials smile

2015-05-03 00:39:48 (edited by Orin 2015-05-03 04:00:38)

Here's another thing: You say in the documentation when you start describing game controls that the maps will handle this in a future version. When might that be? How will that work?
Thanks. About to download the latest version.
Edit: Given the fact that actors make up the majority of the game, these are the hardest to create. I suppose with a sidescroller, I can just create a map using fpControler and just have X/Y coords not worrying about Z.
So, map creation is one thing the engine is great for now, I'm pretty sure I could do that. However, with the same code I posted above, under the new version it still won't run. I changed Game.run to game.load, because there's no map yet, just wanted to get the menu out of the way.
If I use the fpControler for my game and atatch a character object to it, will the WASF keys work, as described in the object source file? Or do I have to put that in my character class for the character I want to create? The documentation implies that if you atatch a character to an actor such as player, that'll work.
What was the line I was supposed to remove again? Now the BGT parcer is having problems with "equipable.bgt".
File: Equipable.bgt
On line: 0 (0)
Error: Could not find script file in any of the following locations:
'C:\Heat Engine\HeatEngine PRE-RELEASE v0.10 (current state)\HE\HeatEngine\Events\Equipable.bgt'
'C:\Program Files\BGT\include\Equipable.bgt'

2015-05-03 11:41:53 (edited by Genroa 2015-05-03 11:50:54)

My bad, I made some mistakes with the rebuild script... sad the file path hasn't been correctly wirtten by the script and some other mistakes were done. I corrected that, here's the new file : https://www.dropbox.com/s/tsk1myaf3vs49 … d.bgt?dl=0
Replace the rebuild.bgt script by this one and run it.
The website download link has also been updated.

For controlers, the idea is quite simple : they are created, maybe they keep some informations, and they are called for each tick. They are very similar to actors. So, in a not so far future, they may be added in map files just like actors. Right now the problem is that you have to manually add controlers and configure the game before loading a map. I will try to insert all that in the map files.

Yes, actors are the most important thing of the game, they make everything. For your sidescroller you may use a modified version of the FPConroler, for two reasons : the first reason is that the controler is setting the listener on the player actor, and it's orientation is the same. So moving forward will make the camera moving forward too, but maybe you want you character to move left and right when you control it. The other problem is that the FPControler has been made to provide a WASD movement like in 3D FPS. But I can make you a SideControler which will follow the character from the side and let you moving him left or right (you will have to program the other movements tongue )

Controlers often needs a few parameters when they are created. The FPControler takes a string, which is the name of the actor it will be attached to. So, if you have an actor called player, and if you create a controler attached to the player actor, you have a controler which will control the "targeted actor" which is the player. This way, for a 2 player fighting game for example, you can create two controlers, controling two different actors, and it works very well.
When you have a controler attached to an actor, it will provide all the controls described for the controler when the game is running (game.run() ).

If controlers only move actors on the X/Z coordinates, you will get a 2D world. smile I think in BGT, X is left/right, Y is forward (depth) and Z upward. So when you move forward, you move on the Y axis in an FPS game. And in a sidescroller, forward/backward is on the X axis, and Z is for the height. So, could you please give me a little more explanations? Maybe I'm doing a mistake between graphic sidescrollers and audio sidescrollers but I think their representation is the same smile

2015-05-03 12:13:52

Two consecutive errors from me, I'm very sorry Orin... I'll make you a basic sidescroller controler today if possible. That should help you to forgive me tongue

2015-05-03 16:57:05 (edited by Genroa 2015-05-03 17:45:45)

It isn't as stable as I would it to be, but I managed to create a simple controler adapted for sidescrollers. The controler manages: A and D to move left and right, and escape to quit the game loop. By default, the character doesn't "move backward", it simply changes its direction, and moves forward. Making it "dodging" an attack by moving backward would be quite simple to do.
Thanks to this, the player is by default always facing toward the moving direction (sorry for the bad english). So, when you decide (through the controler) to trigger its weapon, you are able to shoot or punch anything in front of you. Characters all have a Weapon slot on them, making them able to "equip" a Weapon actor. A standard weapon actor has been added in a previous version, and two example weapons were made. A cold steel weapon would also be possible with this standard actor. smile A demo has been made about weapons, showing how a simple controler could trigger, switch and reload them. smile

The weapon system is still beta and characters don't save their weapons when a game is saved, even if weapon mechanism works well. The saving system will be slightly modified before letting them being saved.


I will post the new version of the engine this evening, with the simple sidescroller, an example project and maybe a standard cold steel weapon. wink

2015-05-03 20:09:11

See, this "Unexpected Token" error is what really makes me want to switch from BGT to something else that doesn't have braces, and relies more on indents.
The rebuild.bgt worked, but the problem is with this code now. Everything looks right. The "Unexpected Token" error is the most common error I've gotten with BGT and I really want to learn how to avoid it. I've indented as much as possible here and all the menu if/else seem to be opened and closed correctly...

#include "HeatEngine\\Game.bgt"
#include "dynamic_menu.bgt"
Game game("Test");
sound music;

void main()
    
{
        dynamic_menu menu;
int choice;
menu.add_item_tts("New Game");
menu.add_item_tts("Continue Game");
    menu.add_item_tts("Exit Game");
    
    choice=menu.run("Please choose an option from the following menu.", true);
    
    if(choice==-1)
{
        alert("Error", "There was a problem with menu loading.");
        exit();
}
    
    if(choice==1)
{
        game.load();
}
if(choice==2)
{
        if(file_exists("saves\\save.hemap"))
        game.config.setMapFile("saves\\save.hemap");
    else
        alert("Woops," "There is not a saved game to load.");
}
    
    
if(choice==3)
exit();
}
}

2015-05-03 20:43:03 (edited by Genroa 2015-05-03 20:44:56)

The last if condition has no opening brace, so there is one closing brace in the end which shouldn't be there.. smile
You will encounter this problem with all languages, they all have to specify where a bloc of code starts and where it ends. I've seen some BGT/C++/Java programers using this syntax, maybe it will help you:

if(choice==1)
{//opening choice 1
...
}//closing choice 1

They comment each and every brace. This way, it would be exactly as if you were specifying them in Basic, with a If Then EndIf  or While EndWhile smile

One last thing : again, you can't call game.load() if you didn't specified any file to load, using game.setmapFile(string file); If you want to create an empty game, call game.run() but you couldn't do anything. The best thing to do is to load a different map file for each level. So, starting a new game would need to load the level 1 map file smile

2015-05-04 02:50:47 (edited by Orin 2015-05-04 03:09:46)

Ah, I see, forgot to put the brace before calling exit(). I'm so used to doing that that i just assumed I had opened it.
Okay, so this is strange. I had started another project earlier without the Heat Engine last year or so. It has no wait function or anything to have the window stay opened so that I can actually choose something with my menu.
I changed the new game to an alert for now, until I can get some maps created. However, sapi says "Choose the options from the following menu, but the app opens and closes so fast I'm booted right back to the folder...
Where should I call the wait function? It's working just fine with Show_game_window...
That was with the other project though. I didn't have to call wait functions anywhere.
Curious as to why this might be happening.

2015-05-04 08:53:44 (edited by Genroa 2015-05-04 12:11:02)

A good thing may be to write opening and closing braces, and then write the code block inside it smile

Could you please show me your code? I can't debug it without seeing it smile

I think that your program closes because it has no loop. I may be wrong, but here is how menus are often used, and espcially with BGT:

1. Creating your menu, adding options,...
2. Creating an infinite loop
3. Inside this loop, run the menu and get the result.
4. If the result is the exit choice, break the loop
5. if not, do whatever need to be done

If you don't writer your menu inside a loop, after having done it's part, the program will have nothing to stop it to execute until the last line of code. smile

2015-05-04 11:14:30

Really good idea! still, interesting when audio gaming will jump to the totally high level and will use tools and enviromments like Unreal engine. Probably it will never happen LOL

Twitter
Add me on Steam
Discord: lirintheblindguy
BattleTAG: Lirin#21759

2015-05-04 18:53:06

Does this engine use the 3d sound positioning that BGT uses, or is this free motion 360 degrees.

The universe is a rain storm. We are droplets sent to quench the problems of the world, yet we are blown sideways by the winds of distractions.