IrrRPG Builder

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
andres
Competition winner
Posts: 78
Joined: Tue Jul 08, 2008 5:18 pm
Location: Guarapuava/Brazil
Contact:

Lua

Post by andres »

Lua scripting is working!

Let me explain how it woks:

Each "Dynamic Object" can have an lua script that runs a lua "step" function at each frame, this "step" can see a lot of C++ pre-maded methods (like walk, turn, faceToPlayer, showDialog, etc) and of course you can define functions in lua to create the dynamic object behavior.

A dynamic object can also have a "onClick" and a "onAttacked" function, this will be called when the player clicks or attack the object, this way you can define a routine to decrease enemy life when he is attacked by player for example (and counter-attack the player, hehe).

Each object has his own lua_state, that means his functions and variables are LOCAL, and one object cannot interfere in another object. To share data between objects you need to set an global variable (by calling a function like setGlobalVar("playerMoney", 20) ) , this is made by my LuaGlobalCaller class, this class stores and manipulates all global vars. Global vars also will be used to save the game during gameplay.

The use of globals are interesting to manage the in-game quests, for example:
Imagine the following quest: Player needs to kill 10 wolves to get access to a misterious house.
-> you can create an global named "Key" and another "WolvesCounter";
-> you increase WolvesCount global each time on wolve die;
-> when WolvesCount >= 10 the global Key becames true and the Player has access to the house.

I've posted two images of the IRB Lua Editor. check it at the screenshots section: http://irrrpgbuilder.sourceforge.net/
Prof. Andres Jessé Porfirio
Federal Technological University of Parana (UTFPR)
www.andresjesse.com
http://irrrpgbuilder.sourceforge.net

Image
andres
Competition winner
Posts: 78
Joined: Tue Jul 08, 2008 5:18 pm
Location: Guarapuava/Brazil
Contact:

Testing Gameplay

Post by andres »

Hey, i've updates!

As i've told i've finished the Lua Scripting system, and now the gameplay routines are working. New Screenshots are available at http://irrrpgbuilder.sourceforge.net/

Now i'm working on Dialog System and Item Management. I'll release an test version soon.
Prof. Andres Jessé Porfirio
Federal Technological University of Parana (UTFPR)
www.andresjesse.com
http://irrrpgbuilder.sourceforge.net

Image
vhson13
Posts: 10
Joined: Wed Mar 17, 2010 3:39 pm

Post by vhson13 »

Hi Andre,

Full source of your alpha version is broken when I extract it. Could you upload other package?

Thank you.
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Hi, Andres!

This is really impressive! :shock: You`ve done in that project most of the stuff I would wish that I would be able to do myself...

I'm reading the code right now to learn from it. This seem simple enough for me (I cannot qualify as a programmer, still fighting to comprehend some basic OOP concepts from C++). :oops: Reading and understanding your code will help me a lot. This won't restart my big project now, but is a step forward anyway.

I just saw that you've not only added the dialog for AI but a basic fighting there (frogs follow you and you can kill them). I'm also really impressed that you added the LUA code editor directly in!

Congratulation! :P
EDIT: Wow! Just just showed me how to create a class and retrieve the instance. (Really basic for a real programmer, but a real puzzle for me) I was looking to put everything under the STATIC keyword, but the way you do it is so much simpler and easy! Your GetInstance() function is awesome! That was one of my biggest problem in writing code before.

EDIT2: Wow. I will have to learn a lot more... I tried to make a MSVC version, and now got pointers crashing. Was able to fix most of the stuff, compile, and link. But after, the scene manager pointer crash. (commenting the refresh of the scene manager, (smgr->drawAll()) allow the GUI to display.)... I'm suprised that code compiled on CodeBlock and MSVC are so different. Still very happy that you were able to compile a Windows version with CodeBlock, and is part of the distribution.

Edit 3: Cool. I downloaded Codeblock and it compile and run perfectly (even with my fixes to make to it compile on MSVC). So the code is ok. Just need to investigate why the pointers are lost now only on MSVC. Perhaps specific compiler/linker setting.
Last edited by christianclavet on Sun Oct 31, 2010 7:48 pm, edited 3 times in total.
fmx

Post by fmx »

Looks very promising :)
Kalango
Posts: 157
Joined: Thu Apr 26, 2007 12:46 am

Post by Kalango »

Good stuff man! Looking forward to see it completly done with some cool sample apps running..
You could also use the Proton SDK to make mobile game builds hehe, would be nice to see a WYSIWYG multiplataform editor using irrlicht ;)
Keep up the good work.
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Wow! After some time and efforts. I finally found were the problem was. The IRRlicht dll is a modified 1.7.1 and I used the one from the official distribution. (Thankfully you put your modified version in the distribution). It look like you modified some GUI elements, and change the system to support 8 layers and opened external opengl extension... Icons were not ghosted before I used the proper dll and lib. Also the shaders were not working properly with vanilla Irrlicht 1.7.1

I recompiled your version of IRRlicht and made the MSVC .lib and required .dll. Now the project compile, link and run. The pointer crash was because the materials in the original was set to a limit of 8 and I had a library with a limit of 4, that crashed the scene manager with the shaders.

I had also some problem with the TinyXML for loading the DynamicObject, so I used irrXML to figure it out. (For some reason, it was crashing loading a mesh from the XML). At least now. It load and run. So I could say that I converted project to MSVC 2008. I will try to bring back tomorow the TinyXML for loading the DynamicObject, because now the loading of animation definition is disabled.

If I figure it out and it work well then I will try to add more properties (like your health and money properties) Could be theses one: Mana, Armor, Dot(Damage over time) duration, Dot type (poison, ice, fire, lack of air), level, strenght, energy, agility. etc. These could serve then for a combat system based on rules.

I don't know how many time I will have to do that and If I will be able to do it. But now, It's a first step.
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Hi, Been doing a lot of little improvements now.

You can download the updated source code, the project files (msvc, codeblock) http://www.clavet.org/files/irb_alpha1_update.zip (20Mb) VS 70+Mb for the full archive.

This update contain only:
- SRC folder (updated source with some fixes)
- Irrlicht-engine (modified 1.7.1) - containing the .LIB / .a and the includes only
- bin(msvc) folder (Containing a build from MSVC running on windows), with the new DLL needed
- irrKlang-1.3.0 folder (containing the .LIB /. a and the include only
- Media folder (04/11/2010), because I changed the player, and modified the "sample" project. (only a 5mb more)
- main folder (contain the project files MSVC / Codeblock)

You will only need the full release from the SourceForge site if you need to change the IRRlicht source/irrKLang source (04/11/2010)

Changes:
- Build and run on MSVC (2008+), added new libs, dll, debug and release executables of the project. It can still be compiled and run from Codeblock (tested only on Windows)
- Numerous little fixes so the code work on Codeblock and MSVC (For the script editor, timer is now taken from the Irrlicht device that I find it is less a hack than include the whole Irrclicht source code (os.h))
- Fixed a crash when closing the application (Now closing the audio device)
- Fixed a crash when clicking outside the terrain zone (Caused by a null node result)

Todo:
- Need to fix a crash when the player is dead and the user switch back to editor mode. Seem to be related in LUA refresh loop.
EDIT: Found the problem. A LUA timer is activated when the mode change is requested (Game->Editor), the activated timer seem to break the game from there). I will have to find a way to stop all LUA activity before switching back to editor mode.
To look the problem: load the "sample" map provided with the application and hit the plan until your life get to 0 and switch back to editor mode.

Edit:04/11/2010 Fixed more bugs,added the french translation, changed the "sample" project a little on the "die" script, to that it don't loop, so the game can be stopped without crashing.

Hints:
- Set the game full screen and your choosen resolution:
Edit the file named: config.txt in your bin folder
first line: horizontal resolution
second line: vertical resolution
third line: 0 = windowed, 1 = full screen

- changing the default language:
Open the Media folder and edit the XML file named: lang.xml
On the first line there this field named

Code: Select all

<IrrRPG_Builder_LanguageFile version="1.0" default_language="en-us">
default_language can be changed to
- en-us -> english
- pt-br -> Portugese (I think)
- fr -> french (added by me 04/11/2010)

Can someone can compile this on Linux from the codeblock project and tell me if it also work?
Last edited by christianclavet on Thu Nov 04, 2010 6:23 pm, edited 5 times in total.
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Hi, decided to see how the player mesh could be imported and worked from my 3DS MAX 2009.

I was able to import the B3D mesh but not the animation. So I created a biped, scaled it to fit the mesh, skinned it lightly, then redone the animations. (idle, walk, attack and die).
Image
Image
Image
If Andres will add more support for other types of animations (idle animations, run animation, attack animations, hurt animations, spawn & despawn animation, kockback & great knockback), I will be able to kickly take 3DS Max now and do the needed animations for the player.

If you want to check the "new" player, load this and extract it in the media/player folder. I also included my 3DS MAX 2009 animation file.
Archive is there: http://www.clavet.org/files/player.zip 327Kb

I exported the mesh with the animation as an .X file with the panda exporter. (seem to work fine from max, B3D Pipeline is no longer supported for the recent versions of 3DS Max)

For adding equipment and weapons, I have an idea. I could use the same rig, and reuse the animation so the item will follow. The only thing I'm not 100% sure is how to sync the animations. (main mesh and weapons anim need to play exacltly from the same frame). having external files that contain only the animations would be also more efficient. (Same animation used for the main mesh, the equipment, and the weapon). If that work, then we could change on the fly the weapon and the equipment (buckle, or 2 swords).

The mesh is the same, but now the animation look smoother.
Andres, is the scale of the characters should be that small? The player high is about 1 unit. (If I take for example a HL character, it's around 72 unit tall, so the scale in "real-world" is really small)

Edit: (Little update 06/11/2010. Created 2 new scripts templates, for a generic player script and a generic enemy script, when the player get attacked now the health display is refreshed. Added the game project files, forgot to add them this week. The "sample" project will give you a good example of what the current release of the game can do).
andres
Competition winner
Posts: 78
Joined: Tue Jul 08, 2008 5:18 pm
Location: Guarapuava/Brazil
Contact:

Post by andres »

Wow, i'm surprised that you're working so much in IRB, i'm on linux now but soon i'll try your improvements. I'm busy until tuesday, but after that we can create a svn and work together what you think? we can create a forum too at the irb website.
Prof. Andres Jessé Porfirio
Federal Technological University of Parana (UTFPR)
www.andresjesse.com
http://irrrpgbuilder.sourceforge.net

Image
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

hehe pretty good animation :D
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Wow! Thanks guys!

I'll for sure be very happy to work together on this while I have time! Reading at your source code seem to have unblocked some C++ things I was stuck with and now it seem easy!!!

Virion: Thanks! Theses anims will serve for testing the engine, happy that you like them!

Right now, I've upgraded theses (still need to recompile this on codeblock) so that could work also on linux:

- The animation system is completely revamped. Now the AI support theses states (only player ATM): IDLE, WALK, RUN, ATTACK, INJURED, DIE. My current build show theses actually (IDLE, WALK, ATTACK, INJURED, DIE).

- Each animation can use another file. (My preferred way) instead of assigning frames inside the same file. But can work/compatible both way. So we could have a file containing all the attack animations for example. It can be defined in the XML file, the application still is compatible with the old format. (original release)

This new system will permit the use of added equipement re-using the animation of the player so it will move the same as the player. The equipment/weapon need to be skinned on the bone setup of the object. (I will try to make a tutorial in 3DS Max to show how it's working)

- Reworked a little the LUA scripts of the SAMPLE, but will improve them again when the combat system will be working. The frogs are attacking the player, the player can kill them (displaying their stats) and the player can die with a panel asking to restart... :)

- Added LIFE and MONEY to the dynamic object, I want to give the same states (and much more) so when their health is modified it will trigger the proper animation automaticaly. (As it's done with the player now)

Here is my plan for the next steps:
The next thing to do is that the dynamic object have a type (NPC, INTERACTIVE, NON-INTERACTIVE). The NPC type will use it set of animations states (SPAWN, WALK, RUN, ATTACK, INJURED, KNOCKBACK, DIE, DESPAWN), the INTERACTIVE will have theses (CLOSED, OPEN). Non-interactive will have only 1 animation state (IDLE)

After the dynamic object NPC can have the same state and behavior as the player, I'll be able then to get on the combat system with the rules (calculating points of damage, based on properties (strenght, stamina, etc.) and implement DOT damage properties (poisons for example)...

====================================================================
EDIT (nov 7, 2010): Just checked the game compiling with CodeBlock, fixed a little thing, now it seem to run as before. The new stuff is in the file. Updated the Codeblock project so Codeblock can also be able to produce a Release version (win32).

This current release does what I described earlier (improved animation system), the player now as an idle animation (really quickly done to see if it work) in a separate file, you can look how I've done that by looking at the XML file for the player. There is also a generic script for the player, and one for a generic enemy. So setting a "quick" game can be done in a couple of mouse click with NO SCRIPTING at all.. :D

The current update file is now around 20Mb, I just hope the code will still compile fine on Linux.

http://www.clavet.org/files/irb_alpha1_update.zip Same link as I presented this week. I just update the same file.
leebojammin
Posts: 16
Joined: Thu Jun 15, 2006 8:45 pm

paging support , and still being worked on ?

Post by leebojammin »

Hi there,

Just wanted to say that this is a very nice project you have going here, and thanks for the license ;)

Is this still being worked on ?

Can paging terrain be used with this, or is there even paging terrain in irrRPG/irrlicht yet ?

I really need paging, for the huge seamless worlds I have planned. If its not in here yet, is it planned, and if not can anyone point me somewhere
to get information on how to incooporate paging into this nice irrRPG system ? ;)

thanks
leebo

christianclavet wrote:Wow! Thanks guys!

I'll for sure be very happy to work together on this while I have time! Reading at your source code seem to have unblocked some C++ things I was stuck with and now it seem easy!!!

Virion: Thanks! Theses anims will serve for testing the engine, happy that you like them!

Right now, I've upgraded theses (still need to recompile this on codeblock) so that could work also on linux:

- The animation system is completely revamped. Now the AI support theses states (only player ATM): IDLE, WALK, RUN, ATTACK, INJURED, DIE. My current build show theses actually (IDLE, WALK, ATTACK, INJURED, DIE).

- Each animation can use another file. (My preferred way) instead of assigning frames inside the same file. But can work/compatible both way. So we could have a file containing all the attack animations for example. It can be defined in the XML file, the application still is compatible with the old format. (original release)

This new system will permit the use of added equipement re-using the animation of the player so it will move the same as the player. The equipment/weapon need to be skinned on the bone setup of the object. (I will try to make a tutorial in 3DS Max to show how it's working)

- Reworked a little the LUA scripts of the SAMPLE, but will improve them again when the combat system will be working. The frogs are attacking the player, the player can kill them (displaying their stats) and the player can die with a panel asking to restart... :)

- Added LIFE and MONEY to the dynamic object, I want to give the same states (and much more) so when their health is modified it will trigger the proper animation automaticaly. (As it's done with the player now)

Here is my plan for the next steps:
The next thing to do is that the dynamic object have a type (NPC, INTERACTIVE, NON-INTERACTIVE). The NPC type will use it set of animations states (SPAWN, WALK, RUN, ATTACK, INJURED, KNOCKBACK, DIE, DESPAWN), the INTERACTIVE will have theses (CLOSED, OPEN). Non-interactive will have only 1 animation state (IDLE)

After the dynamic object NPC can have the same state and behavior as the player, I'll be able then to get on the combat system with the rules (calculating points of damage, based on properties (strenght, stamina, etc.) and implement DOT damage properties (poisons for example)...

====================================================================
EDIT (nov 7, 2010): Just checked the game compiling with CodeBlock, fixed a little thing, now it seem to run as before. The new stuff is in the file. Updated the Codeblock project so Codeblock can also be able to produce a Release version (win32).

This current release does what I described earlier (improved animation system), the player now as an idle animation (really quickly done to see if it work) in a separate file, you can look how I've done that by looking at the XML file for the player. There is also a generic script for the player, and one for a generic enemy. So setting a "quick" game can be done in a couple of mouse click with NO SCRIPTING at all.. :D

The current update file is now around 20Mb, I just hope the code will still compile fine on Linux.

http://www.clavet.org/files/irb_alpha1_update.zip Same link as I presented this week. I just update the same file.
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Hi, The project is active, but to get the latest build you will need to get it from the SVN. Check the official site...
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Re: IrrRPG Builder

Post by christianclavet »

Hi, IRR RPG reached alpha 0.2 release today and we're happy to announce it (me and Andres).
Image

This new release (from svn 250) introduce a lots of new features since alpha 0.1! Here are some of them:
- Improved edition interface
- Improved terrain
- New characters and props
- Added music and sound effects (under the creative commons license)
- Improved trees
- Improved script editor, with new preset scripts (player, enemy, etc) pre-made scripts
- New editor commands with documentation
- Updated camera/controls
- Shaders have been tested to work on both ATI/NVidia hardware. Ground and water should render correctly now
- Added post effect shaders for adding effects (including rain/show)
- first implementation of a battle system (with hitpoint calculation based on properties)
- first implementation of AI based on animation states
- Timed game loops so that the gameplay should work the same.
- Support for more languages (English, Portuges, French, German, Spanish)

There is also a "player" build that you can use to give to your friend to play your own created RPG games.

We still have a lot of things to improve, but this is much better now than release 0.1!! :D

You can check the official web site:
http://irrrpgbuilder.sourceforge.net/
Post Reply