Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Monsieur OUXX

#1041
Quote
abstract
I'm not trying to explain what's an abstract class to do abstract classes in AGS. What I'm doing is what's presented in the first column of the table: prevent a class from being instantiated.
As you said I probably made a mistake: The cheat is to add "builtin" in front of it, not "managed".

Quote from: Gurok on Mon 18/04/2016 02:16:55
EDIT: I just realised this cheat sheet was probably written about 3.3.x. The notes I made apply to AGS 3.4.0 and above.
Nope. I definitely tested 3.4.x.
But your post clearly shows how I got lost in the information about new features. I knew instantiating structs was now possible, but just couldn't find it, or how. so I thought I had imagined it.

Quote
MyClass *a[†‹] = new MyClass[20];
So admitedly this is now possible. But what I'm interested in, is what is not possible.
For example, can I have an array of DynamicSprite, String, ViewFrame, File in such a class?
Can I have an array of MyClass* in another custom struct?
How do I put an instance of Myclass in the array? Like this? (below)
Quote
MyClass c;
a[0] = c;

#1042
No automated way.
#1043
Critics' Lounge / Re: Indy sprite
Sun 17/04/2016 20:56:57
[imgzoom]http://41.media.tumblr.com/5d887ddf6f198c099929666f4d03af81/tumblr_o5snbyYZjq1tsfksfo1_500.png[/imgzoom]

Once again, please tell which is your favorite
1) body
2) hat.
#1044
Critics' Lounge / Re: Indy sprite
Sun 17/04/2016 18:49:15
Quote from: Fred Five on Sun 17/04/2016 18:31:58
Did a quick paint-over of the hat. Do not like either hat 1 nor 2.
Every time someone saves pixel art as JPG instead of PNG, a kitten dies! ;)
#1045
Critics' Lounge / Re: Indy sprite
Sun 17/04/2016 17:24:25
Quote from: Amélie on Sun 17/04/2016 16:54:27
I can't decide  :undecided: :confused: Both have no neck...
They have no neck because there's the jacket's collar. I welcome criticism but your sprite's shoulders are too pushed backwards and narrow. There's got to be a proper solution.
#1046
Critics' Lounge / Re: Indy sprite
Sun 17/04/2016 16:10:02
Please vote (on each point separately)


[imgzoom]http://41.media.tumblr.com/4d39c9b5a7d6c833a58327407939e331/tumblr_o5saqltGNJ1tsfksfo1_400.png[/imgzoom]

PS: Amelie you didn't respect the one requirement I expressed (don't move the eyes up or down) so I had to move the head one pixel down on your sprite.
#1047
Critics' Lounge / Re: Indy sprite
Sun 17/04/2016 00:28:58
Quote from: Avirosb on Sun 17/04/2016 00:03:49
To me it looks like he looks more straight-forward now, though it might not look as good if you zoom in on it.

Not at all, it's actually a good enhancement. I'm not very good at those "indirect enhancements" where changing pixels somewhere makes it look better somewhere else. To me, that's black magic.
#1048
Cool
#1049
No one has anything to add on this topic?
#1050
Critics' Lounge / Indy sprite
Sat 16/04/2016 15:54:54
Any paintover of this is welcome, provided it doesn't change the character's height (the eyes must not be moved up or down) or style (don't turn it into cartoony style).
I think it has reached the stage where written critics can only lead to misunderstandings. I strongly suggest you paint over the bits that you consider faulty.


[imgzoom]http://41.media.tumblr.com/c02b6d4f52b0d18ef7540f08c9627fe1/tumblr_o5qeejxQBE1tsfksfo1_75sq.png[/imgzoom]
3x
[imgzoom]http://40.media.tumblr.com/2155b1b3d124829741774a396d3e7e3c/tumblr_o5qeer02dV1tsfksfo1_100.png[/imgzoom]

VERSION 2
[imgzoom]http://41.media.tumblr.com/6a530df3ed8c9e7cfd24c0ded48749c1/tumblr_o5r2b5JGxH1tsfksfo1_75sq.png[/imgzoom]
3x
[imgzoom]http://40.media.tumblr.com/b5a110282b110b9aa35b818af0fcc9e3/tumblr_o5r2cbjqAH1tsfksfo1_100.png[/imgzoom]
Credits go to Amelie & ProgZmax for the original work base.
#1051
If I recall, this module is not compatible with scrolling backgrounds, but it's rather easy to tweak to make it work, provided you know AGS well. It would be a good idea to post an update version. Also it's useful to replace the hard-coded width and height with System.ViewportWidth or such (forgot the exact name)
#1052
Quote from: Retro Wolf on Wed 13/04/2016 14:00:11
You might find THIS MODULE interesting.

Just to explain to you how that post inserts in the discussion :
- Khris explained to you how to generate the maze, by using some randomness
- Retro Wolf provided a tool to generate "seeded randomness". that's a special kind of randomness where the sequences of random numbers generated will be the SAME every time provided you start out the sequence with the same initial number (seed).

That's helpful if you want to be able to generate the same maze twice amongst the millions of possible random mazes. For example, if you think of the game "worms", there were 65,000 available levels to play, but they were not actually stored on the disk. Instead, they were randomly generated, but each starting from one fixed seed (a number between 1 and 65,000).
#1053
A visual-novel engine programming self-teaching project to tell a story of sports management in a manga-style universe. Add one word to that statement and you'll create a gravity well that will swallow the galaxy.
#1054
Quote from: Crimson Wizard on Tue 12/04/2016 16:56:57
There is no way this keyword can benefit scripter, because after applying "builtin" keyword to your own struct you can no longer create objects of these types.

OK thanks
#1055
Help me redact this cheat sheet.


AGS 3.4 PATCH2 (current released version)

Use caseC#AGS languageComments
Classclassstruct
(don't forget the semicolon at the end!)
Non-instantiable class
(for example, if you want to make a factory
or a set of static utility methods)
abstractbuiltin (that's a trick, that keyword was not originally intented for that)
static member in a classstaticuse a static attribute + a local variable in the script bodySee http://www.adventuregamestudio.co.uk/wiki/Keyword:_attribute
properties (getters and setters)use propertiesattribute+extenderSee http://www.adventuregamestudio.co.uk/wiki/Keyword:_attribute
yeah, yeah, I know that my description in the first column is a poor summary of what properties are.
Array propertiespropertySame as above, but use geti_ and seti_See http://www.adventuregamestudio.co.uk/wiki/Keyword:_attribute
ConstructorsnewYou can use this keyword only for arrays of primitive types (e.g. int[]), unmanaged structs (see below in the table), arrays of unmanaged structs (see below in the table), arrays of built-in types' pointers.
int i[] = new int[20];
DummyStruct1 d = new DummyStruct1; //provided DummyStruct1 was declared "unmanaged"
DummyStruct1 a[] = new DummyStruct1[1];
DynamicSprite* s[] = new dynamicSprite[1];


arrays as parameters : void MyFunc(int a[]) {...}by reference (changes propagate back)by referenceI didn't test what "returning" an array does, but it probably creates a copy
string as parameter : void MyFunc(String s) {...}by copyby copyyeah, yeah, I know that it isn't as simple as "by copy" for strings in C#.
dynamic arrays of custom class
(see also: "dynamic arrays of (built-in) pointers")
MyClass obj[] = new MyClass[20];not possible if 'unmanaged' struct
//this does not work:
struct DummyStruct1{
    int i;
};
...
DummyStruct1 a[];
a = new DummyStruct1[1];
DummyStruct1 d;
a[0] = d;

Possible if 'managed' struct
autoptr managed struct DummyStruct1{
    int i;
    import void Func();
};

void DummyStruct1::Func()
{
    Console.W("i=%d", this.i);
}
void Test3()
{
    DummyStruct1 a[];
    a = new DummyStruct1[1];
    DummyStruct1 d = new DummyStruct1;
    a[0] = d;
    a[0].Func();
}

...unless it contains a dynamic array
autoptr managed struct DummyStruct1{
    int i[]; //won't compile
    import void Func();
};
fixed-sized arrays of custom class
(see also: "dynamic arrays of built-in class")
MyClass obj[20];MyClass obj[20];
UNLESS : ... unless what, by the way? what forbids it?
a class member inside a classclass ClassA{
    int i;
}
class ClassB {
    ClassA a; //this (needs to call "new" later on)
}
not possible
(except as pointers to built-in types:
struct ClassB {
     DynamicSprite* sp;
     GUI* g;
     String s;
};
void game_start() {
  ClassB b;
  b.sp = DynamicSprite.Create(...)
  b.g = ...; //any existing GUI
  b.s = "mlkmlkmk";
}
fixed-sized arrays of built-in classMyClass obj[20]; //actually references
possible...
  s2 = new String[10];  s2[0] = "test";

  DynamicSprite* sp3[10];  sp3[0] = DynamicSprite.Create(10, 10);
...including in structs...
  struct MyClass {
    DynamicSprite* sp[3];
    String s[3];
  };
  MyClass t;
  t.s[0] = "test";
  t.sp[0] = DynamicSprite.Create(10, 10);
...and arrays of structs structs...
  MyClass t[10];
  t[0].s[0] = "test";
  t[0].sp[0] = DynamicSprite.Create(10, 10);
dynamic arrays of built-in classMyClass obj[] = new MyClass[20];
//This C# example actulaly
//shows references,
//but who cares

Instantiable built-in types:
  Possible...
  String s2[];  s2 = new String[10];
  ...including in structs
   struct MyClass {
    String s[];
   };
   MyClass o; o.s = newString[10];

Non-Instantiable built-in types:
   Possible...
   DynamicSprite* sp[];
   sp = new DynamicSprite[10];
   sp[0] = DynamicSprite.Create(10, 10);

   ...except in structs
   struct MyClass {
      DynamicSprite* sp[];
       //this will compile but
       //you can't instantiate
       //at runtime :'(
   };
   
#1056
I didn't understand this sentence :
QuoteThe built-in types like GUI are permitted to have pointers via the builtin keyword
Since forever, I've been having pointers to, let's say, GUIButtons, inside my structs (I believe? Or did I fantasize this?).

So where does "builtin" step in? Is it used only in the built-in AGS script headers (not visible in the Editor, obviously), or are you sayin gthat they could be of benefit somewhere else, for the end-scripter?
#1057
Really, really nice use of color scheme and dithering.
#1059
Quote from: Crimson Wizard on Mon 11/04/2016 17:09:06
Quote from: Monsieur OUXX on Mon 11/04/2016 16:19:21
Oh sh#t I forgot that, it might ruin our upcoming verbcoin interface.
You can make it work, if you do click detection yourself.
Actually we do! we do the GetAtXY or whatever it's called. Crisis averted! Wes till need to use the function you provided. However I trust that since it was written, the .Z proptery of buttons can be read?

thanks for the link I'll have a look
#1060
Critics' Lounge / Re: Character pixel draft
Mon 11/04/2016 16:23:14
+1 for anian's comment on the side view: the butt/hipbone structure is all flat, too far back (i.e. too far to the left) and too low.
SMF spam blocked by CleanTalk