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.
46
Off-Topic / Re: Check it out: The craziest shit I've ever done in C++
« on: September 28, 2013, 02:06:17 am »
It doesnt have a surface, it can return a surface (or rather, it can have its parent return a surface).
BTW turns out, this is actually a pattern: http://en.wikipedia.org/wiki/Curiously_recurring_template_pattern. Guess it's not that crazy after all.
BTW turns out, this is actually a pattern: http://en.wikipedia.org/wiki/Curiously_recurring_template_pattern. Guess it's not that crazy after all.
47
Off-Topic / Re: Check it out: The craziest shit I've ever done in C++
« on: September 27, 2013, 02:38:48 pm »
Hai Robert .
@DaSpirit: Here's more context so you see why I had to do it:
@DaSpirit: Here's more context so you see why I had to do it:
Code: (cpp) [Select]
template <class T, class U> class Image {
public:
// ...
U cropping(int x, int y, uint width, uint height) {
// ...
}
// ...
protected:
std::vector<std::vector<T> > grid;
}
class Surface : public Image<Tile, Surface> {
// ...
}
class Layer : public Image<MapFeature, Layer> {
// ...
}
If you think there's a better way of doing this I'm all ears.
48
Off-Topic / Check it out: The craziest shit I've ever done in C++
« on: September 26, 2013, 11:53:07 pm »Code: (cpp) [Select]
template <class T, class U> class SomeClass {
public:
// ...
U some_method() {
// ...
}
}
class OtherClass : public SomeClass<YetAnotherClass, OtherClass> { // !!!
public:
// ...
}
So it's a class that inherits from a template of another class and itself, so it can later return its own type. I couldn't believe it but it even works and everything.
And...
Yeah...
That's it.
49
Issues Help Desk / Re: Some problems I have found.
« on: August 19, 2013, 09:17:09 pm »
If anyone it should be LGM who warns about that when saving.
50
Issues Help Desk / Re: collision_line and collision_rectangle are not working
« on: June 22, 2013, 10:36:54 pm »And why is -4 so special?Because noone equals -4?
51
General ENIGMA / Re: License Exemptions
« on: June 21, 2013, 09:17:28 am »
This sounds like something you could try asking Hacker News for help about. Lots of people there that know their shit.
52
General ENIGMA / Re: hey plions
« on: June 16, 2013, 11:02:37 am »
What about -Wextra? I always use it along with -Wall and -O2, though I really don't know how useful it is . Also I'm pretty sure gcc doesn't catch certain things at -O0 so you should probably have -O3 in regular run (or maybe -O2?).
53
Issues Help Desk / Re: Input box popup
« on: June 11, 2013, 10:57:30 pm »
[snip=edl]var = str;[/snip]? I don't think that's correct. You probably meant [snip=edl]var str;[/snip].
That may or may not be the problem.
EDIT: Actually, if the error you are getting is [snip]unknown function or script "get_string"[/snip] then this probably isn't the problem.
That may or may not be the problem.
EDIT: Actually, if the error you are getting is [snip]unknown function or script "get_string"[/snip] then this probably isn't the problem.
54
Issues Help Desk / Re: Problem with animation speed
« on: June 11, 2013, 06:14:46 am »
The speed in the sprite editor is in frames per second, the speed in the object is in...well... frames per frame. What you want is 1 frame per second, and the game's fps are given by the room_speed, so set the sprite's speed to 1 / room_speed.
Also since you only want to set the animation speed, it's sort of redundant using the set sprite action (since the sprite is already set in the object properties anyway), so you may want to just use the set variable action (at the botton left in the control tab). Type image_speed as the variable name and 1 / room_speed as the value.
Also since you only want to set the animation speed, it's sort of redundant using the set sprite action (since the sprite is already set in the object properties anyway), so you may want to just use the set variable action (at the botton left in the control tab). Type image_speed as the variable name and 1 / room_speed as the value.
55
General ENIGMA / Re: Perfect Circles
« on: May 27, 2013, 09:46:54 am »Quote
http://tinyurl.com/JANETHISISYOU
uu: I BELIEVE I HAVE CHOSEN THE PERFECT SHAPE FOR YOU.
uu: IT IS DESCRIBED IN CERTAIN CIRCLES KNOWLEDGEABLE OF THE ARTS. AS. "A CIRCLE".
uu: I AM VERY PLEASED WITH HOW FAITHFULLY IT HAS CAPTURED THE OBSCENE ROTUNDITY. OF YOUR MAGNIFICENT CARRIAGE.
uu: TRULY A SPITTING IMAGE OF THE CROCKER BITCH.
uu: NOW LISTEN CAREFULLY. YOU MAY LEARN SOMETHING.
uu: THE MASTERPIECE AFICIONADO WILL NOTICE. HOW I ACHIEVED THIS HIGHLY ADVANCED AND DIFFICULT SHAPE.
uu: WHAT MOST GIFTED ARTISANS WILL TELL YOU. IS THAT. CIRCLES ARE BASICALLY FUCKING IMPOSSIBLE TO DRAW.
uu: TRUST ME.
uu: IT'S LIKE A PARADOX. A SHAPE WITHOUT ANGLES. WHAT??
uu: SO I FUCKING CHEATED.
uu: I NAVIGATED THE IRRATIONAL PERIMETER BY MAKING A LOT OF EASILY UNDERSTANDABLE, TOTALLY LOGICAL MARKS. FORMING A WHOLE BUNCH OF LITTLE RIGHT ANGLES.
uu: THE CHEATING PART HAPPENS WHEN I DO THIS A LOT. SO IT GOES IN A ROUND DIRECTION.
uu: THIS ONE CAME OUT WELL I THINK. BUT THERE'S ROOM TO IMPROVE.
uu: I HAVE THEORIZED THAT IF I KEEP MAKING BOGUS CIRCLES LIKE THIS.
uu: WHILE DRAWING MORE AND MORE ANGLES. BUT SMALLER. SO SMALL THAT YOU START CAN'T SEEING THEM.
uu: THAT THE ILLUSION OF THE CIRCLE WILL BE COMPLETE! AND PEOPLE WILL BELIEVE IN THE FAKE CIRCLE. LIKE A BUNCH OF SUCKERS.
uu: I BET NOBODY HAS THOUGHT OF THAT CIRCLE STRATEGY. I THINK I'M THE FIRST AT THIS IDEA. AND BEST AT IT ALREADY.
uu: PEOPLE THINK I'M DUMB. ESPECIALLY THE VOICE IN MY HEAD.
uu: AND THEY MAY BE RIGHT ABOUT ME BEING DUMB.
uu: BUT WHEN IT COMES TO THE SPECIAL WAY I DO THINGS. WHICH IS ALWAYS ACTUALLY. THE PERFECT WAY.
uu: I AM.
uu: A GENIUS!
56
Issues Help Desk / Re: How to prevent a collision to a player for 3 seconds after he has respawned.
« on: May 27, 2013, 09:35:32 am »57
General ENIGMA / Re: Innacurate Framerate Counter
« on: May 24, 2013, 07:15:55 pm »
Why thank you, Josh. That was pretty... insightful.
58
Third Party / Re: Ultimate3D 2.1
« on: May 18, 2013, 12:07:24 pm »
Why would you even bother then?
59
Announcements / Re: LateralGM 1.8 Beta
« on: May 17, 2013, 10:31:35 pm »
Looking good. Nice, Robert.
60
General ENIGMA / Re: Should Josh start merging the compiler?
« on: May 04, 2013, 04:33:51 pm »The pretty printer basically takes the code and makes it export to several languages, in this case it takes the code and makes it easily export to JavaScript, which is required for the HTML5 port, basically it just means we put the HTML5 port and stuff on hold for a bit so that we can have scripting with event inheritance and EDL to be %100 GML compatible, then Josh can worry about his pretty printers, because its going to take him another 3 months to finish.Ninja'd.