| We hope you enjoy your visit. You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you are already a member please log in to your account to access all of our features: |
| Why?; functions set up kind of funny | |
|---|---|
| Tweet Topic Started: Aug 21 2006, 09:03 PM (414 Views) | |
| elmernite | Aug 21 2006, 09:03 PM Post #1 |
|
Member
![]() ![]() ![]() ![]()
|
Why are the functions setup so that you have to declare variables (eg, file = 'model/tank.x') Then call the function (eg, LoadMesh();) Why don't you have it setup so that you just do
rather than
It seams easier to understand and do the top one to me. Plus, thats how all of the other 3d engines and scripts for Game Maker do it. -Elmernite |
![]() |
|
| Despellanion | Aug 21 2006, 10:00 PM Post #2 |
|
Forum God
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Probably because the current U3D engine isn't built that way. E.g LoadMesh() has no control over textures and so on. You are of course right that it would be alot easier if the engine was built that way. Maybe so easy that it would be difficult for Dr.Best to build the engine in that way. I'm not 100% sure so maybe Dr.Best can shed some more light on this when he reads it. |
![]() |
|
| elmernite | Aug 22 2006, 03:56 PM Post #3 |
|
Member
![]() ![]() ![]() ![]()
|
I was just using Texture as an example. I do know that LoadMesh uses file. So why not have it set up like.
It shouldn't be that hard, I took a look at the script for loadmesh. Where it refers to the file variable he just needs to replace it with argument0. -Elmernite |
![]() |
|
| Dr. Best | Aug 22 2006, 04:02 PM Post #4 |
|
Administrator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
One of the basic principals of Ultimate 3D is that every object in the Ultimate 3D scene has to be represented by an object in Game Maker. This way the user can simply use variables to transform the object (which is done by the Step function). By taking the parameters for creating objects from member variables of the object the user gets forced to make one object for every 3D object in the scene. If all parameters would get passed as arguments of the script it would be easy to forget that. And then the user wouldn't have a possibility to change the properties of the object after creating it. A solution to this problem would be returning the ID of the Ultimate 3D object in the script that creates it. But then the user had to pass all parameters for every function manually. In this case the Step script for models would suddenly have eleven arguments. And if one of them would be at the wrong place this would lead to very strange behaviour. Besides it's very probable that users of U3D would forget to call Destroy for every single object they have created. That can't happen when every U3D-object has it's own GM-object. At least it's less probable then. If you prefer this system anyway you can modify the U3D scripts to realize it. |
![]() |
|
| elmernite | Aug 22 2006, 04:11 PM Post #5 |
|
Member
![]() ![]() ![]() ![]()
|
Makes since. It's just I've been using the other two really good Gm 3d dll's (irrilch and Xtreme) and they both do it like I said. So it was a little bit new to do it this way. But yeah, I guess it makes it easier on you. -Elmernite |
![]() |
|
| Dr. Best | Aug 22 2006, 04:17 PM Post #6 |
|
Administrator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Actually it would be easier for me to make it in the same way as GMI and Xtreme3D do it (not significantly but at least a bit). But IMHO it's really more user friendly in the way it is. For that reason I won't change it. |
![]() |
|
| elmernite | Aug 22 2006, 04:25 PM Post #7 |
|
Member
![]() ![]() ![]() ![]()
|
Yeah, it's best to keep it that way then. Thats one of the biggest draws of this engine is it's user friendlyness. -Elmernite |
![]() |
|
| Bami | Aug 24 2006, 02:33 PM Post #8 |
|
Guess the character, win a prize
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Little bit of comment. You know, function calls to DLLs are pretty damn slow, and now you are doing update thing every step for every object. Even if you implement a couple of if statements, its still slower then for example a "X_object_setPosition(obj,x,y,z);" function in Xtreme3D. I used to make whole engines in GMI/X3D using only 4-5 objects. It's a lot faster, since objects just take time to update and such in GM. |
Here are the thrill seekers, corrupt and immoral.
| |
![]() |
|
| Despellanion | Aug 24 2006, 03:03 PM Post #9 |
|
Forum God
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I have never used Xtreme3D, however I have played around some with the real Irrlicht and I was quite pleased with it eventhought it's OpenGL. But I doubt the performance of Xtreme3D is even close to what Ultimate3D offers. As far as I know, Xtreme3D is just a engine which focuses on cool 3D effects rather than performance and quality. Am I wrong? This is mostly opinions based on what I have seen and read and I don't wan't to be the one who hands out prejudices so please correct me if I am wrong. |
![]() |
|
| « Previous Topic · Questions about Ultimate 3D · Next Topic » |





![]](http://z1.ifrm.com/static/1/pip_r.png)




10:34 AM Jul 11