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 - Gurok

#241
The Rumpus Room / Re: Happy Birthday Thread!
Tue 02/08/2016 00:09:33
Happy birthday, Adeel! I will reply to your PM soon.
#242
The Rumpus Room / Re: *Guess the Movie Title*
Mon 01/08/2016 15:11:45
Police Academy
#243
The Rumpus Room / Re: Name the Game
Tue 19/07/2016 08:30:38
Damn. I had this game when I was young and I've been searching for it for some time. Unfortunately, I didn't remember the name, but I could've told you it was shareware before it was mentioned in the thread. I did a reverse Google image search and found it, but just wanted to say thanks for helping me find this classic.
#244
The Rumpus Room / Re: Name the Game
Sat 16/07/2016 13:05:07
PC Globe? (Communism vs. Capitalism Edition)
#245
The Rumpus Room / Re: Name the Game
Wed 13/07/2016 05:54:27
SiN?
#246
The Rumpus Room / Re: Happy Birthday Thread!
Mon 04/07/2016 06:49:25
Also, happy belated birthday to Canada.
#247
The Rumpus Room / Re: Happy Birthday Thread!
Mon 27/06/2016 10:45:44
Thanks Adeel, Mandle, Anas and SinSin for the birthday wishes! I had a fantastic day... at work >:(

Oh well. Can't take the day off every year. Well, I guess you can, but I want to save annual leave for bulk AGS-ing.

Anyway, work bought me cake, so it wasn't that bad.
#248
The Rumpus Room / Re: Name the Game
Mon 13/06/2016 10:27:03
Yes! Yayyyy.
#249
The Rumpus Room / Re: Name the Game
Mon 13/06/2016 10:16:22
No. PC title with super rad artwork:

[imgzoom]http://i.imgur.com/HyMYJuG.png[/imgzoom]

[imgzoom]http://i.imgur.com/Q8uLXBV.png[/imgzoom]

[imgzoom]http://i.imgur.com/8JtYTRm.png[/imgzoom]
#250
The Rumpus Room / Re: Name the Game
Mon 13/06/2016 08:25:21
Ummm... I don't know. Toggle "game select"?

Try this one:

[imgzoom]http://i.imgur.com/Mh9eNNB.png[/imgzoom]
#251
The Rumpus Room / Re: Name the Game
Sun 12/06/2016 23:15:40
Adventure (for the 2600)
#252
The Rumpus Room / Re: Name the Game
Sat 04/06/2016 20:35:30
Limbo of the Lost
#253
The Rumpus Room / Re: Name the Game
Sat 04/06/2016 19:09:34
I think this is Blade Runner.
#254
The Rumpus Room / Re: Name the Game
Sat 04/06/2016 07:14:25
Damn, so quick! Yes, it's Who Shot Johnny Rock.

You going to take a turn now?
#255
The Rumpus Room / Re: Name the Game
Sat 04/06/2016 07:01:49
Who remembers this one?

[imgzoom]http://i.imgur.com/6KyMHyp.png[/imgzoom]
#256
The Rumpus Room / Re: Happy Birthday Thread!
Thu 02/06/2016 12:13:41
Happy birthday, Stupot+. Hope it's been a + day and not a - one.
#257
The Rumpus Room / Re: *Guess the Movie Title*
Tue 29/03/2016 00:34:07
The Other Side of Midnight?
#258
The Rumpus Room / Re: Happy Birthday Thread!
Thu 10/03/2016 02:03:11
But I know a lot of members who have an UNbirthday today!

A very merry unbirthday to Mandle (and everybody else).
#259
I think we want to eventually have some kind of polymorphism or type coercion for AGS proper. i.e. A Maths.Abs() that would support both floats and ints. For now, I think this is a good approach.

This library might also work as a good study reference or just time-tested implementations of common methods. I am not sure what your intention was though, Monkey. Was this just to fill gaps in the existing library or to be more of a supplemental library with slightly less general use things?

Whatever the case, there's Clamp, which is common for graphics stuff:

Code: ags

// Clamp a number to a specified range
float Maths::Clamp(float value, float minimum, float maximum);
int Maths::ClampInt(int value, int minimum, int maximum);


If you are taking further suggestions, here are some not-so-common ones I use:

Code: ags

// Find the distance between two points (a^2 + b^2 = c^2)
float Maths::DistanceBetween(float x1, float y1, float x2, float y2);
int Maths::DistanceBetweenInt(int x1, int y1, int x2, int y2);

// Find whether two ranges intersect (startA <= stopB and stopA >= startB)
// I put this in a method because it's annoying to have to work from the proof each time to get the right conditions
bool Maths::Intersects(float startA, float stopA, float startB, float stopB);
bool Maths::IntersectsInt(int startA, int stopA, int startB, int stopB);

// Return true if a given probability succeeds
// This is probably the best candidate for a library, as it's a standard form
bool Maths::Chance(float p); // p = 0.5 is a coin flip
// I actually use something like this because it's easy to read as "Chance(1, 20) => chance 1 in 20" and the default is a percentage
bool Maths::Chance(int numerator, int denominator = 100);


If this is a shared library, for something like Chance, it might be better to see which one people prefer.
#260
The Rumpus Room / Re: Happy Birthday Thread!
Tue 09/02/2016 05:44:02
Yes, happy birthday, Icey!
SMF spam blocked by CleanTalk