Thanks for the great feedback!
First of all, some answers to questions:
Justintime9 wrote:Wow. I had no idea anything like this was even possible. Beyond the basic terrain modification would it also be possible eventually to texture it etc. ingame?
Yes, that's what I'm planning to do with the other two screens. The middle one should be used for drawing different materials (i.e. different textures) onto the landscape. I even played with the thought to use the right one to place simple small geometry like grass or small rocks onto the ground.
Trylon wrote:Am I right in assuming you glued bits of pyprp to the age's python script?
As Diafero said: It's far worse than that. As promised, here's some more insight into the technical background of how things are done in Tahwah... (btw: Tahwah = tawa [the age file name] = Test Age Writing Age
)
Client SetupThe client is a standard Uru:TPotS or Uru:CC installation with the Offline KI installed. Aditionally it uses the UruSetup.exe from Untìl Uru and a serverconfig.ini pointing to my own data server.
Game Server SetupThe game server is a standard Alcugs installation. It has the tawa.age, generatedage.age and an additional SDL file added to its basic data set.
Data Server SetupThe data server is the one that does most of the work. Since the "old" Uru client versions simply use HTTP for their data server, my server is a standard Apache 2 installation. However, the machine also has the X desktop installed and can therefore run Blender.
For the communication between the Uru client and the data server I created a very simple "protocol" that allows the commands "Get", "Send", "Bake Book" and "Is Done?" both to transfer the landscape information (which is basically just a simple JPEG file) and to initialize the age creation process. The command Get simply returns the currently stored image, whereas the Send command stores a new image on the server. The "Is Done?" command will be called periodically by the client to check if the age creation process is already complete. Once this is the case, the red box will be made invisible again and the book animation is started.
The big worker command is the "Bake Book" command.
Originally this command simply started up Blender with an autostart Python script which directly exported the generated age, always with the current height profile. However, as I started to also use Blender's unwrap function to make the texture look a bit better (which you can not call through the Blender Python API), I had to do a step backwards. If you saw the current "Bake Book" code, you'd directly send it to
The Daily WTF... The current implementation starts up Blender and then emulates a series of key strokes and mouse move and click operations. Yes. Awesome, I know.
As the machine where all that stuff is running on can barely run just the X server this also explains the long waiting time at the moment. For future versions I'm planning to create a tool on the basis of libHSPlasma to replace Blender completely (and therefore make the X server unnecessary).
Anyway... Once Blender successfully exported the age, it calls a script written by Diafero which then automatically generates the new data server manifest files and also gzips the new data files. Once this process is complete, a flag on the data server will be set so that the "Is Done?" command will return "yes" from that point on.
(Technical) Age DesignThe age "Tahwah" itself uses a lot of Python code that is closely tied with the PRP files. I used a custom PyPRP version (the 1.6 release with some modified code) and PrpShop to compile the age. It makes a lot of use of GUI dialog elements (like the GUI Clickable Map) and Dynamic Maps. Since I didn't find a good way to paint stuff on the image at the beginning of my development, an earlier version introduced an additional executable called "consolepaint.exe". Originally this small program was used to do the following:
- Code: Select all
1. Wait for user console input.
2. Check the command. If it starts with "DRW" (for draw) interpret the remaining part of the line as a coordinate.
a) Open the file "./tawa/age.jpg".
b) Put a pre-loaded image at the specified coordinate onto the age.jpg.
c) Save the age.jpg again.
d) Send the string "OK\n" to stdout.
3. Goto 1.
I used pipes that are opened in another Uru Python thread to communicate with this application. Whenever the mouse cursor was moved, consolepaint received the "DRW" command and did the steps mentioned above. Whenever my thread received the line "OK\n", it called a Plasma function which re-loaded the age.jpg and drew it onto the Dynamic Map. Later on also the transfer commands were added to consolepaint. This first implementation was completely laggy as you might have already guessed.
In the newest version the "DRW" command could theoretically still be called... but fortunately we found a way to create some sort of paint application by just using Plasma functions. The classes used for this are ptImage and ptDynamicMap. If you want to do something similar, you should take a look at the methods those classes offer. Also the function PtLoadJPEGFromDisk() might be interesting for you.
In a future version I plan to completely remove consolepaint.exe (at the moment it's only used to transfer the files anyway) and replace it by an implementation which uses the _socket.pyd.
Thanks/CreditsSince the short "thanks" section in my video isn't very precise, I'll try to create a bit more thorough credits list here.
Thanks to:
- Diafero
for - a lot of Linux help (I'm not a Linux person at all)
- suggestions for Python code
- the manifest file generation and gzipping script
- setting up the game server for this project
- Mucol and Mr. Clock
for - ideas for the story
- ideas for the preliminary level design
- creating textures
- Old Wolle
for - letting the game server run on one of his machines
I'd also like to thank all these persons on this list for helping me test the age and the code.
Texture SourcesTo give credit to the people who created the textures (or the photographs of which I then created seamless textures), here is a list of texture sources:
- Rust
- Metal
- Paper
- The stars are from the NASA (therefore Public Domain)
- The wall texture was created by Mr. Clock
- The console texture was created by Mucol
If you have any remaining questions concerning this project, feel free to ask.
Cheers,
The.Modificator