|
2
|
The Ur-Quan Masters Re-Release / Starbase Café / Re: SENSO - A fighting game
|
on: Today at 12:25:09 am
|
|
Started by onpon4 | Last post by onpon4
|
|
Of course you can. The variable will hold the id number of the object. That doesn't mean the variable itself is an object or instance of an object.
Have you ever used a real language? Unlike GM, real languages don't store a number "id" referencing an instance. The variables point to the instance itself. Let me demonstrate with Python. Take a look at this script:
class foo(object): pass
x = foo() print('Variable: {0}'.format(x)) print('ID: {0}'.format(id(x))) If we run this little script, we get this output:
Variable: <__main__.foo object at 0x02A0ABB0> ID: 44084144 Whoa! That doesn't look like a number at all, does it?
But it gets even better: see, I can actually manipulate exactly what converting it to a string does! By adding the __str__ method to the class foo, as seen here:
class foo(object): def __str__(self): return 'Class foo(d!): ID - {0}'.format(id(self))
x = foo() print('Variable: {0}'.format(x)) print('ID: {0}'.format(id(x))) We get a different output:
Variable: Class foo(d!): ID - 44084432 ID: 44084432 This is because, in a real language, what gets stored in a variable when you create an instance isn't a number, but a reference to the instance itself. In Python, what happens when you convert an instance into the str class is determined by the special __str__ method. On the other hand, if the variables only stored numbers (integers), printing the variable would always result in printing the "id" of the instance.
Game Maker works a little differently. It actually stores the "id" of the instance. Not having seen the source code, I can only guess, but it looks like if a variable is a "real" (float) value, and is followed by a dot, GM assumes it must be a reference to an instance and searches for that instance.
Look, I was just trying to tip you that your use of the word might be confusing to others. That's all.
Being inaccurate causes MUCH more confusion than being accurate.
|
|
|
6
|
The Ur-Quan Masters Re-Release / Starbase Café / Re: SENSO - A fighting game
|
on: September 08, 2010, 11:19:26 pm
|
|
Started by onpon4 | Last post by RTyp06
|
|
So, you can't assign an instance of your game's Player object to a variable? Of course you can. The variable will hold the id number of the object. That doesn't mean the variable itself is an object or instance of an object.
Look, I was just trying to tip you that your use of the word might be confusing to others. That's all.
|
|
|
7
|
The Ur-Quan Masters Re-Release / Starbase Café / Re: SENSO - A fighting game
|
on: September 08, 2010, 11:07:10 pm
|
|
Started by onpon4 | Last post by onpon4
|
Yes I got that part but look what you are saying. For example, in Python, there is the int class (for integers), the float class (for floating-point decimals), the str class, the list class, the dict class, and so on. All of these are in fact objects. integer, float and str are classes assigend to variables. They indicate the value that those individual variables will hold. I've never heard them called objects before... Call me crazy I guess. I don't know what they are teaching you over at Python school.  So, you can't assign an instance of your game's Player object to a variable? Strange... I remember doing that all the time when I used GM.
On a more on-topic note: Has anyone tried Senso, perhaps with a friend? I haven't seen any feedback yet.
|
|
|
8
|
The Ur-Quan Masters Re-Release / Starbase Café / Re: SENSO - A fighting game
|
on: September 08, 2010, 10:56:19 pm
|
|
Started by onpon4 | Last post by RTyp06
|
Yes I got that part but look what you are saying.
For example, in Python, there is the int class (for integers), the float class (for floating-point decimals), the str class, the list class, the dict class, and so on. All of these are in fact objects. integer, float and str are classes assigend to variables. They indicate the value that those individual variables will hold. I've never heard them called objects before... Call me crazy I guess. I don't know what they are teaching you over at Python school.
|
|
|
9
|
The Ur-Quan Masters Re-Release / Starbase Café / Re: SENSO - A fighting game
|
on: September 08, 2010, 10:48:35 pm
|
|
Started by onpon4 | Last post by onpon4
|
|
Except collision_point(), collision_circle(), and collision_rectangle() are not objects or instances of objects.
I hate to call your entire post pointless, but I never even implied that those were objects. The only way I can conceive you misinterpreting my post in this way is if you stopped reading right after the list of functions. I even used the word "function" in the next sentence. I was talking about the functions' return value.
|
|
|
10
|
The Ur-Quan Masters Re-Release / Starbase Café / Windows filenames?
|
on: September 08, 2010, 10:42:15 pm
|
|
Started by onpon4 | Last post by onpon4
|
This is just an interest question.
Is anyone here familiar with how file names are handled in Windows?
What I know is that, with current Windows versions, it is possible to use the 8.3 file format to reference a file. Before, I assumed that this is just a conversion of the normal file name. But my school's programming, desktop publishing, digital imaging, and robotics teacher (I suppose you could call him the "computers" teacher) seemed to imply earlier that their machines (which run Windows XP Professional) actually uses the 8.3 format, with a conversion applied to get it to the "normal" file name.
I'm asking because I was always under the impression that the 8.3 format was abandoned after the FAT16 file system.
|
|
|