Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 953 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 24 of 31 1 2 22 23 24 25 26 30 31
Re: Unity 3 announced [Re: JibbSmart] #316705
03/25/10 23:07
03/25/10 23:07
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
hm... i think there is some confusion about components.

unity uses objects just like other engines.

this.transform.position = ...

"this" is the current object. i haven't used unityscript yet but probably "this" is implicit there and you can leave it away?

in gamestudio the pendant is "my".

my.x = ...

Re: Unity 3 announced [Re: Slin] #316706
03/25/10 23:12
03/25/10 23:12
Joined: Apr 2002
Posts: 4,801
Richmond B.C., Canada
Captain_Kiyaku Offline

Dichotomic
Captain_Kiyaku  Offline

Dichotomic

Joined: Apr 2002
Posts: 4,801
Richmond B.C., Canada
Originally Posted By: Slin
Is there btw a reason for the mouse position being given based on the bottom left corner, while all 2D elements have their origin on the top left? o.O


Now thats a picky non related question which should belong to unity forum lol.

But you can always use Screen.height - Input.mousePosition.y

Though i don't know right now if it's really inverted...


@Ventilator, yes you can leave the "this" away. I never use it.

It's just useful if use it like this way:

Code:
private string name;

public Classname(string name)
{
  this.name = name;
}



But this is not Unity related and you probably know it by yourself anyway.

Last edited by Captain_Kiyaku; 03/25/10 23:15.

My Blog

"Tag und Nacht schrei ich mich heiser,
Wind weht alle Worte fort,
Tag und Nacht schrei ich mein Krähenwort!"

Subway To Sally - Krähenkönig
Re: Unity 3 announced [Re: Captain_Kiyaku] #316707
03/25/10 23:20
03/25/10 23:20
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
yes, i just think that leaving away "this" can lead to confusion.

the zen of python: laugh
http://www.python.org/dev/peps/pep-0020/
"explicit is better than implicit."

Re: Unity 3 announced [Re: ventilator] #316709
03/26/10 00:13
03/26/10 00:13
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline
Expert
Slin  Offline
Expert

Joined: May 2005
Posts: 2,713
Lübeck
Kiyaku, it of course is picky, but it took me a lot of time to figure out why rect.Contains() returned wrong values for my mouse position. The worst thing was that it was only a problem for one rect, as all others where kinda mirrored...
What I basicly wanted to express was, that even Unity isn´t perfect even though quite close, as far as I got to know it until now laugh
I also had a bit trouble to figure out that network view system, as I didn´t find much information about it (using the search through the answers stuff and the reference manual thingy), there are some more things which aren´t documented too great. I for example just searched for a way to adjust the speed of an animation. It is actually very easy, but the information on how to do it for just a single animation with example wasn´t really were I expected it to be.
But well, there really isn´t much to complain about wink

Re: Unity 3 announced [Re: ventilator] #316788
03/26/10 16:27
03/26/10 16:27
Joined: Oct 2006
Posts: 1,245
A
AlbertoT Offline
Serious User
AlbertoT  Offline
Serious User
A

Joined: Oct 2006
Posts: 1,245
Originally Posted By: ventilator
hm... i think there is some confusion about components.

unity uses objects just like other engines.

this.transform.position = ...

"this" is the current object. i haven't used unityscript yet but probably "this" is implicit there and you can leave it away?

in gamestudio the pendant is "my".

my.x = ...


You want to have a character walking on the screen

3dgs

you load a model in the editor
You create an Action in SED :
ent_Animate(my,...);
c_move(my,..);
you assign the Action to the model

Unity3d

you load a model in the editor
you create a script :
transform.Translate(...);
animation.Play("Walk",..);
you assign the script to the model

Truevision3D

The engine supplies a TVActor() class

you instance your model
TVActor myModel;

You load the model
myModel = TVActor.Load(".."):

In the game play you write
myModel.Move(...);
myModel.PlayAnimation("Walk",...);

Are exactly the same stuff for you ? I dont think so

In my opinion TrueVision only allow a true traditional OOP
Unity3d is on Component side, Components are also classes, if it is what you meant
3dgs is something in between
Actions in my opinion are components created by developer
3DGS is probably more flexibile than other engines but I find the code style quite ugly...personal taste of course




Last edited by AlbertoT; 03/26/10 16:30.
Re: Unity 3 announced [Re: AlbertoT] #316791
03/26/10 16:48
03/26/10 16:48
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
yes, it's the same stuff to me. yes, components are just objects attached to other objects.

in unity it's:

this.transform.Translate(...); // "this" can be left away. internally "this" still will be used then.
this.animation.Play("Walk", ...);

or:

someotherobject.transform.Translate(...);
someotherobject.animation.Play("Walk", ...);



in gamestudio:

c_move(my, ...);
ent_animate(my, ...);

c_move(someotherobject, ...);
ent_animate(someotherobject, ...);

if gamestudio used object oriented syntax it would be (that's how it works with my python wrapper):

my.move(...);
my.animate(...);

someotherobject.move(...);
someotherobject.animate(...);



i don't see the big difference to unity there? and i don't think gamestudio is more flexible. the lack of oo rather makes it less flexible in my opinion (or maybe not less flexible but certainly more cumbersome in many situations).

Re: Unity 3 announced [Re: ventilator] #316807
03/26/10 19:09
03/26/10 19:09
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
C# together with unity is probably the most powerful solution.

Re: Unity 3 announced [Re: ventilator] #316809
03/26/10 20:10
03/26/10 20:10
Joined: Oct 2006
Posts: 1,245
A
AlbertoT Offline
Serious User
AlbertoT  Offline
Serious User
A

Joined: Oct 2006
Posts: 1,245
Originally Posted By: ventilator
yes, it's the same stuff to me. yes, components are just objects attached to other objects.



Unity3d and 3dgs are about the same stuff but TrueVision3d game architecture is different
The formers are component oriented engines
The latter an OO engine


Last edited by AlbertoT; 03/26/10 20:15.
Re: Unity 3 announced [Re: AlbertoT] #316813
03/26/10 20:33
03/26/10 20:33
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline
Expert
Slin  Offline
Expert

Joined: May 2005
Posts: 2,713
Lübeck
And wtf is the difference between
Code:
myModel = Instantiate(".."):
myModel.transform.Translate(...);
myModel.animation.Play("Walk");


and
Code:
myModel = TVActor.Load(".."):
myModel.Move(...);
myModel.PlayAnimation("Walk",...);


?

Re: Unity 3 announced [Re: Slin] #316822
03/26/10 21:41
03/26/10 21:41
Joined: Oct 2006
Posts: 1,245
A
AlbertoT Offline
Serious User
AlbertoT  Offline
Serious User
A

Joined: Oct 2006
Posts: 1,245
I quote from " The complete guide to Torque x " by John Kanalakis

Quote

Torque x promotes a new approach to game programming.
Unlike the classic inheritance model,objects share common components that provide reusable functionality instead of sharing a common base class.
For example when an object needs to process collisions, you simply add a collision component.
The aggregation methodology results in more code reuse and less copy and past code sharing "

and again

" Object oriented languages such as C++ and C# promote the practice of inheritance.In this case , new functionality is added to an existing object by deriving a new class and adding the functionality there.
....over Time it becomes increasingly complicated to add new functionality to an existing class hierarchy "

again

" Components are simply packaged element of game functionality.
In Chapter 2 we used the physics, Collision, worldLimits components...
In the following chapters we wil create several additional components from movement components to weapon components to AI components.
Each of this components will be designed to be as generic as possible to add functionality to a wide variety of games "

unquote

I do not know how to explain it better, to me the different game engine architecture is evident

In classic OOP you focus on objects and you add functionalities to your objects
C++ has not been designed for games wink
Suppose you want to develop a database for a Company
You declare a Class Employee which contains variable such as : id , name , salary etc and functions such as : CalculateSalary() etc
You can instance hundreds or even thousamds employees objects: Mr Smith, Mr John etc

This may not be the case of games

In games it may be better to focus on functionalities , I called them "task" in my previous post
Functionalities can be : Movement, Collision,Physics etc

Of course you must link the components to the objects thus you must use pointers such as "my" or "this" or such pointers may be even implicit




Last edited by AlbertoT; 03/26/10 21:47.
Page 24 of 31 1 2 22 23 24 25 26 30 31

Moderated by  aztec, Blink, HeelX 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1