Is the Code for My Age Available?

Help bring our custom Ages to life! Share tips and tricks, as well as code samples with other developers.

Is the Code for My Age Available?

Postby Jennifer_P » Mon Dec 17, 2007 3:44 pm

So as I was leaving my computer graphics class on Thursday, my instructor mentions that he wants us to include the source code for our projects when we turn them in. "But my project doesn't have any source code," I said, since my Age creation project wasn't written directly in OpenGL like others' projects were. And my instructor replied that I should submit the file the plug-in sends to Uru, which he expected would just be an ASCII file.
I'm not sure, so I'm asking, but isn't that file (if such a file exists) being kept under wraps to protect us from nasty hackers? If not, where can I find it? (And if so, that's fine too, because as long as I have a valid explanation for why I can't get it I'm sure my instructor won't mind.)

Assuming I can't get the other code file, I was planning to send him my .fni file, the export readout from the Blender console window, the ULM0 file, and the XML document that is associated with my Age in Uru's dat folder. With these code-related documents I hope to satisfy the source code requirement as much as I possibly can. So could anybody tell me if I'm missing any other code-related files which could be added to that...? I'm trying to include as much as possible so that I can say "This is everything that I could get." :geek: Thanks a bunch!
Jennifer_P
 
Posts: 729
Joined: Fri Sep 28, 2007 10:54 pm

Re: Is the Code for My Age Available?

Postby Aloys » Mon Dec 17, 2007 3:51 pm

I may be totally off here, but why don't you hand him your .blend file?
User avatar
Aloys
 
Posts: 1968
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Re: Is the Code for My Age Available?

Postby Trylon » Mon Dec 17, 2007 4:01 pm

I think that's the best idea.

The prp files that PyPRP makes are humanly unreadable, so he would have a great deal of trouble understanding it.
Well, the .age and .fni files are actually human readable once decoded, but they don't give you a lot of detail :)

But, as pyprp is technically open-source, you can hand him a snapshot of it if he fancies reading through the bloody thing :)
One day I ran through the cleft for the fiftieth time, and found that uru held no peace for me anymore.
User avatar
Trylon
 
Posts: 1446
Joined: Fri Sep 28, 2007 11:08 pm
Location: Gone from Uru

Re: Is the Code for My Age Available?

Postby Chacal » Mon Dec 17, 2007 4:15 pm

Give him the prp, a hex editor, and the object reference!

MUHAHAHAHAHAHAHAHA

Trylon is right, it's inhuman. Sadly, I've been doing it for days. :(

Seriously Jennifer, you should give him the blend file and provide an explanation on how the objects are exported in the prp file.

The prp file structure (used as data by the Plasma engine) has been investigated by H'uru hackers starting in 2004, by reverse-engineering the Uru code.
First the encryption scheme and key were found, then the structure of the binary file was slowly worked out.
There are several types of objects, which are described in the link I provided (it seems to be down as I write this but is normally up).

For example, colliders are objects which are invisible but have a physical presence. They are used for blocking player movement, and in fact they define the physical world in Cyan Ages (solid floors and walls). All movement is constrained inside these colliders, usually there's just one huge collider in every file. If you import city_District_KahloPub.prp in Blender, and then show layer 2, you'll find a mesh called "kpWallsCollision".

In the Prp file (open it with prpExplorer 0.6 - open "City", then "KahloPub"):
- there is an object of type SceneNode that contains a list of all objects (type SceneObject) in the Age. We find kpWallsCollision in the list.
- all objects are defined as SceneObjects, and of course we find a SceneObject called kpWallsCollision.
- it is invisible, so it doesn't refer to a DrawInterface object or a a CoordinateInterface object.
- it is physical, so it refers to a SimulationInterface object also called kpWallsCollision.
- there's no sound associated with it, so it doesn't refer to an AudioInterface object.
- it has no other properties
- Under SimulationInterface we find an object called kpWallsCollision.
- It refers to a Physical object called, surprisingly, kpWallsCollision.
- Under Physical we do find an object called kpWallsCollision.
- This object contains the vertices of our collider, along with such properties as mass, rc, el, etc that you can see in Blender.

The Pyprp plugin creates those objects and puts the corrects values from memory in Blender into them.
Here's a simplified graphical representation of some of the prp structure:

prpStructure.gif
prpStructure.gif (16.44 KiB) Viewed 4514 times
Last edited by Chacal on Mon Dec 17, 2007 5:08 pm, edited 2 times in total.
Chacal


"The weak can never forgive. Forgiveness is an attribute of the strong."
-- Mahatma Gandhi
User avatar
Chacal
 
Posts: 2509
Joined: Tue Nov 06, 2007 2:45 pm
Location: Quebec, Canada

Re: Is the Code for My Age Available?

Postby Trylon » Mon Dec 17, 2007 4:25 pm

:D That object reference is SO outdated :D
One day I ran through the cleft for the fiftieth time, and found that uru held no peace for me anymore.
User avatar
Trylon
 
Posts: 1446
Joined: Fri Sep 28, 2007 11:08 pm
Location: Gone from Uru

Re: Is the Code for My Age Available?

Postby Chacal » Mon Dec 17, 2007 5:08 pm

If you have a newer reference, would you mind giving me a link?
I've been poring over this one for days.
Chacal


"The weak can never forgive. Forgiveness is an attribute of the strong."
-- Mahatma Gandhi
User avatar
Chacal
 
Posts: 2509
Joined: Tue Nov 06, 2007 2:45 pm
Location: Quebec, Canada

Re: Is the Code for My Age Available?

Postby Paradox » Mon Dec 17, 2007 6:57 pm

Does anyone still have a copy of IngisKahn's map showing ALL of the references between objects?

It looked like a big knot :D
Paradox
 
Posts: 1292
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada

Re: Is the Code for My Age Available?

Postby Tsar Hoikas » Mon Dec 17, 2007 7:32 pm

Your map has a mistake...

First off, a plWinAudible can reference either a plWin32StreamingSound or a plWin32StaticSound, which are devrived from plWin32Sound. Also, plWin32Sound references two plSoftVolumes, not necessarily a plSoftVolumeInvert and a plSoftVolumeSimple...

Just FYI ;)

Oh, as for the the newer reference... Think about the stinking pot.
Image
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2180
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Re: Is the Code for My Age Available?

Postby Jennifer_P » Tue Dec 18, 2007 12:25 am

Ooh, so that's where Cobbs is--what cool stuff people have been working on! I think maybe I'll look into learning Python during Christmas break so I can understand more of what is going on. :)
Anyway, it can't hurt to send him the .blend file as you suggest Aloys, though I don't think it's really what he wants. But maybe it is, so why not? And I'd take the human-unreadable prp files too Trylon, if for no other reason than to say, "I looked into your request and here's the result, although it isn't very helpful since it's human unreadable." How would one go about reading those .prp files? I'm seeing carbo_District_mainRoom.prp, carbo_District_Textures.prp, and carbo_District_BuiltIn.prp, but their file type is not recognized by my computer. Then I don't think he'll be interested in PyPRP's source code so much, because otherwise I might as well include the source code for Blender or Python too, which I'm certain he doesn't expect. But the .age file sounds like it might be good to include, even if it's excessively simple--that shouldn't matter.
you should give him the blend file and provide an explanation on how the objects are exported in the prp file.

You know, he did want me to find out about how PyPRP works, but I knew instantly that would a Herculean task on my time budget. Maybe if the project was due next month instead of by midnight tomorrow.
So to sum my questions up:
1. How would I open and read the .prp files?
2. How would I open and read the .age file?
Again, thanks for the help--this is just what I was looking for. :geek:
Jennifer_P
 
Posts: 729
Joined: Fri Sep 28, 2007 10:54 pm

Re: Is the Code for My Age Available?

Postby Chacal » Tue Dec 18, 2007 12:37 am

Read my post again, Jen. You should use prpExplorer 0.6.
Better not use 0.7 yet, it has a tendency to shred my prp files.

PrpExplorer has some editors that will help you see more easily the contents of objects.
For example, right-click on a SceneObject and select "properties". You'll see a human-readable view of the content.
But if you select "hexadecimal" instead, you'll see the raw binary content (in hex).

For .age, .fni and .sum files, I use Urufun.
See also my tutorial for a practical use of those tools.
Chacal


"The weak can never forgive. Forgiveness is an attribute of the strong."
-- Mahatma Gandhi
User avatar
Chacal
 
Posts: 2509
Joined: Tue Nov 06, 2007 2:45 pm
Location: Quebec, Canada

Next

Return to Scripting

Who is online

Users browsing this forum: No registered users and 4 guests