The Secret is Out

Discuss the development of Reality Factory 2
User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

The Secret is Out

Post by AndyCR »

OK, I will explain what I have been so hush hush about lately. I won't explain it in great depth, but I will gladly answer any questions you post about it.

In RF2, the scripting language is Python. ( http://www.python.org ) A scripting api consisting of multiple modules all beginning with 'rf', such as rfsetup, rfsound, and so on organizes the engine methods into various modules for easy, optimized scripting.

I can hear you saying, "Oh, great, it may mean my monster scripts are broken but it will also mean greater flexibility in Pawn scripting!

It's not only for Pawns anymore, folks.

Almost all areas of RF2 are controllable by script. RF Pretty much consists of code to run one script at start up, named 'setup.py', then create a main window, then run another script and be done with it. In this setup.py script, only the rfsetup module is available for use, which contains methods to set startup stuff, like resolution, windowed/fullscreen, etc. After that, it creates a main window using those parameters. (If the script is not found, or some values are not set, it uses default, hard-coded parameters for those values.)

Now, within these scripts, you have full control of the python language. Heck, if you so desire, you can do some pretty cool stuff, like creating a window the user can use to pick a resolution, driver, etc. with.

Next, it looks for another file. The name of that is not decided yet, but it will most likely be called 'bootstrap.py' or 'start.py'. In that script, and scripts linked to it, you will handle everything that goes on in your game, having full access to the rf engine api to do whatever you want. No more messy Pawn scripting for weapons hacks, no more scripted players, no more games held together by a player in a hollow, unlit box (anyone remember doing that to make a racing game or something similar?). If you want to change the player, just open the player script. It's that simple.

Likewise, the menu is not hardcoded, so if you want things like custom settings in the menu (selectable spraypaint image ala Half-Life anyone?) you are perfectly free to do so.

Best of all, no more trying to find the one archaic compiler that manages to compile RF1 successfully, along with a stale version of DirectX, etc. Not that those things would be a problem with RF2 anyway - hey, I can't find a compiler that WON'T compile it! - but it's still nice to know recompiling is not necessary.

I can hear everyone yelling at me by now. "THATS WHAT RF IS ALL ABOUT, YOU ONLY NEED SCRIPTING FOR ENEMIES! WHAT ARE YOU DOING TO RF?!?!?!!" Don't worry. RF2 comes acting and looking almost identical to RF1. Everything is pre-scripted for your click-and-create, red-eyed, it's-midnight-but-I'm-addicted enjoyment. Everything works almost identically to RF1 out of the box. If you don't want to script, then don't. You don't have to. But the flexibility is there, and I know one of these days you'll go "Hmm, I wish my player could go prone... HEY, he said it was controlled by scripts! Heres player.py... Hmmmmm...".

This introduces the concept of ScriptSets. ScriptSets are, shockingly enough, sets of scripts. These sets of scripts can change the functionality of RF entirely. One, and the one that ships with RF2, makes RF2 behave almost exactly like RF1. Another can make RF2 behave like Final Fantasy. They are a bit like Game Boy cartridges; they share a common interface, but they can change the functionality dramatically.

Entities are all scripted. You can easily add a new entity, too, just by scripting it (or copying it out of a scriptset you like!)

I hope you enjoy, feel free to comment, and God bless.
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

Holy sh.... !!!!

My fantasy has come true! That sounds unbelievably GREAT! I mean.. Scripting is my thing in RF. It's my absolute favourite thing in RF ! If everything can be controlled with scripts that easily... it's a paradise for me! And I bet for many others too!! :D
Pain is only psychological.
User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR »

:D I hoped people wouldn't hate me for it.

And everyone out there, the big thing to remember is, "If you don't like scripting, you do not in any way have to!"

Anyone else have thoughts on it?
User avatar
scott
Posts: 1151
Joined: Tue Jul 05, 2005 1:59 am
Location: United Kingdom

Post by scott »

wel first thought WOW!
seond thought WOW!
third thought IMPOSIBLY WOW FACTOR!

from what you have put, and if i am understanding you correcty, then scripting will become ALOT easier because the code is universal for any charactor, this means ALOT more flexability and ease of use when scripting, as you dont need to learn scripting language, as you got sets of scripts for specific tasks.

so that will mean we can have a community script base, where the comunity can make custom scripts and easy insertion into player scripst, this sounds so just WOW!

im not sure if this is to do with the graphics engine or the scripting system, but now with this new system, is it possible to create custom entities? like types of lights, through the scripts, or this tied to the options within the graphic engine.

but their is one majour question that is worying me, wont this make it harder for you, and so wont development go slower?
*GD*
User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR »

:D

Yes, creating custom entities is easy with the new system. You are of course limited to what the graphics engine can do, but limit is a very useless word here :) .

Yes, that was my idea - a repository of scripts that people can download to extend their games.

No, it will likely be about the same development time. On one hand, I don't have to code everything in C++ any more, and the compile time I'll save alone shaves an average of 10% off actual working development time (which is about 20% of total development time). Then take the fact that scripting takes less time than coding. Counterbalance it with the fact that I will probably want to include more scripts than just the default RF1 functionality.
User avatar
scott
Posts: 1151
Joined: Tue Jul 05, 2005 1:59 am
Location: United Kingdom

Post by scott »

so, in the grand scheems.....
what have you done so far?
what are you defenitly planning to do that you havnt done yet
and what are you thinking about adding but not sure?

i ask these questions to see how muchyou have to do compared to what you have done so far, i understand that this is not a representation of how long it will take, just a question on how how much.

and i rmember seeing a post saying that you cant do this alone and that you will need other people, , i dont know how old that was, but also rmember seeing another post saying that you had another person helping you, just wondering if you need any one else, i know you yould like more people, that way it may develop faster, but im just wondering if you can actualy finish all 100% with the team u got so far, and if not, state what you need help with and mabe people will be able to help
*GD*
User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR »

No, I definitly do not have enough people. I need at least one more programmer working as much as I do on the project (IE no life outside of RF2), or two part-timers. At least.

What have I done so far? Not enough. I was a ways into the normal RF2, but with this new system almost all of that needs to be redone in Python. :( I had over 40 source files; now I'm down to six. In essence, RF2 has died, and RF2-PYTHON is just being born.

Definitly planning to get realityfactory.ini parsing via python in there, an entity manager in there, finish off the Python inireader class (which is hung up on a wierd python problem I'm waiting for help on the python forum for), rewriting the menu in python, rewrite the entities using python, finish off rfeditpro, finish the tools, use the tools to make a few rf2 demos, make additional scriptsets, kick it out the door as hard as possible, and last but not least, leave some poor unsuspecting rf2 programmer to take care of the flood of bug reports while I take a really long nap followed by a very long vacation. No, it isn't that simple. It never is.

I'm thinking of adding surround sound support, but not sure how long that would take. I'm thinking of adding physics, same reason, along with multiplayer. I'm thinking of adding in-editor gameplay testing. I'm thinking of adding in-editor entity previewing. I'm thinking of adding a central RF2 IDE that links all the tools together. Will some of these things get in? Most likely. Will all of them get in? I highly doubt it.
MakerOfGames
Posts: 866
Joined: Fri Jul 08, 2005 4:27 am
Location: PA, USA

Post by MakerOfGames »

WOW! So python will enable use to take control of everything via scripting?! Like we can change the function of everything if we know how?! So we could code a full video into the background of a menu instead of the small one like in RF1 and do all sorts of special menu effects etc..??!!!!!

Hey, I have a python script from gameSpace lite that grabs every fifth verticy on an object (the object used was a sphere)and moves them verticaly so many texels. (I think it was a demo called "hair" if anyone cares) Would the commands used in the script be able to give someone a good start on creating a true dynamic damage system? I mean one where when a collision is detected it finds the nearest verticies and then moves them according to the speed and direction of the object that hit it. To put it plainly, it would be a dynamic denting system.

Can I post the script or would that violate some kind of law? I dont have gameSpace lite anymore, unistalled it a year ago. Kept the script because I thought it could unlock the secret to a pure dynamic physical damage system. The cool part is its already in python! Of course to do it properly you would have to code some parameters to limit verticy movement. You can't have an explosion on one side of an oil drum blow that side out the other! So would this be possible if you knew the commands in python?
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
MakerOfGames
Posts: 866
Joined: Fri Jul 08, 2005 4:27 am
Location: PA, USA

Post by MakerOfGames »

Hey what python IDE are you using AndyCR. I would love to learn the language. It also seems much less daunting then learning C++ for some reason. Maybe its more like visual basic in some ways I dont know. Anyway, tell me where to get the IDE and I'll see how fast I can learn it.
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR »

I use KDevelop and KWrite, both of which are only available for Linux. Sorry. On windows, I would reccomend Notepad++.

I honestly don't know if dynamic would be possible; I have not explored that part of Irrlicht. If Irrlicht can do it, RF2 can do it; if not, RF2 might be able to do it. Sorry for the wonderfully specific answer.

Posting the script might break a law; though I do not know; however, I know what you mean and know how I would go about it if it were possible.
MakerOfGames
Posts: 866
Joined: Fri Jul 08, 2005 4:27 am
Location: PA, USA

Post by MakerOfGames »

Im surprised that you were able to give an answer at all at this early stage in development. I cant figure out if I have python on my pc or not. The blender python scripts work and I have used other apps with python, such as gameSpace and tureSpace. Does this mean I have the language on my pc or not?

EDIT: Blender loads stating using python version 2.4. So I have python on my pc? All I need is notepad++?
Last edited by MakerOfGames on Tue Jun 06, 2006 1:34 am, edited 1 time in total.
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR »

Not neccesarily. I would download the official python installer from http://www.python.org .
MakerOfGames
Posts: 866
Joined: Fri Jul 08, 2005 4:27 am
Location: PA, USA

Post by MakerOfGames »

See edit above. Blender loads using python version 2.4 So do I have it?
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR »

It depends. Python could have been compiled into the blender binary, or it could be a separate install. Did you have to download and install python seperately when you installed blender? If so, then you have it; if not, you don't.
MakerOfGames
Posts: 866
Joined: Fri Jul 08, 2005 4:27 am
Location: PA, USA

Post by MakerOfGames »

My python is a part of blender. I'll have to go download it from python.org then. Thanks for the help.
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
Post Reply