Josh @ Dreamland
|
 |
Reply #15 Posted on: November 11, 2010, 04:12:15 PM |
|
|
Prince of all Goldfish
 Location: Ohio, United States Joined: Feb 2008
Posts: 2340
|
void action_bounce(int precise, int solid) { if (((enigma::object_planar*)enigma::instance_event_iterator->inst)->x < 32 || ((enigma::object_planar*)enigma::instance_event_iterator->inst)->x > room_width - 64) ((enigma::object_planar*)enigma::instance_event_iterator->inst)->hspeed = -((enigma::object_planar*)enigma::instance_event_iterator->inst)->hspeed; if (((enigma::object_planar*)enigma::instance_event_iterator->inst)->y < 32 || ((enigma::object_planar*)enigma::instance_event_iterator->inst)->y > room_height - 64) ((enigma::object_planar*)enigma::instance_event_iterator->inst)->vspeed = -((enigma::object_planar*)enigma::instance_event_iterator->inst)->vspeed; } PLEASE do something like this:
void action_bounce(int precise, int solid) { enigma::object_planar* const inst = ((enigma::object_planar*)enigma::instance_event_iterator->inst); if (inst->x < 32 || inst->x > room_width - 64) inst->hspeed = -inst->hspeed; if (inst->y < 32 || inst->y > room_height - 64) inst->vspeed = -inst->vspeed; } But I'm quite happy you got that example working.
Fixed: edited in a const.
|
|
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
|
|
|
Josh @ Dreamland
|
 |
Reply #18 Posted on: November 12, 2010, 10:33:02 AM |
|
|
Prince of all Goldfish
 Location: Ohio, United States Joined: Feb 2008
Posts: 2340
|
We won't be mimicking glitches. Setting x to xprevious and y to yprevious for solid collisions is a part of GM, not a glitch.
|
|
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
IsmAvatar
|
 |
Reply #19 Posted on: November 16, 2010, 01:33:20 AM |
|
|
LateralGM Developer
 Location: Pennsylvania/USA Joined: Apr 2008
Posts: 849
|
With revision 538 fixing the collision bbox to account for the origin, and a minor coding adjustment to factor for the fact that Enigma doesn't store the 'solid' state of an object, I was able to get the example working perfectly. I've also included an empty action_set_alarm function so that the original Catch The Clown works flawlessly sans suddenly changing direction every couple of seconds (intended behavior in the original game to add complexity. Enigma doesn't support Alarms in Definitions yet, so I couldn't code it).
As far as Catch The Clown goes, the original uses a Midi sound, and Enigma doesn't support Midi, so I'd recommend converting your midi's into wav or ogg. If you're using Ubuntu, Timidity++ will do in a snap:
$ sudo apt-get install timidity $ timidity -Ov music.midWhere "music.mid" is the location/name of the midi. The resulting file will be output as "music.ogg". To do .wav instead, use -Ow instead of -Ov
If you don't do the conversion, enigma will simply discard the offending sound. The original Catch The Clown's background will not show up. I think backgrounds still aren't fully supported in Enigma yet.
|
|
|
|
« Last Edit: November 16, 2010, 01:37:07 AM by IsmAvatar »
|
Logged
|
|
|
|
|
|
|
|
|
|
|
|
Josh @ Dreamland
|
 |
Reply #24 Posted on: November 29, 2010, 06:31:13 PM |
|
|
Prince of all Goldfish
 Location: Ohio, United States Joined: Feb 2008
Posts: 2340
|
Your mix between gradated effects and shrunken pictures is almost disturbing in click the clown. The... f... bah, never mind. I can't hear any of the sounds for ENIGMA reasons, but yeah.
|
|
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
Fede-lasse
|
 |
Reply #25 Posted on: November 30, 2010, 02:44:44 AM |
|
|
AI Programmer
 Location: Denmark, Europe Joined: Oct 2008
Posts: -2342534e-10
|
i leki itt11! stfu!!!!!!!!!!!!!!!!! edet: i m8 space cl33ner spaceshit LOL look goooood bye texturising it and thinsg, i also m8 bl0kz lock bettere in lolcat XD the clown edett2 :sry had 2 correct spellin errorz Your mix between gradated effects and shrunken pictures is almost disturbing in click the clown. The... f... bah, never mind. I can't hear any of the sounds for ENIGMA reasons, but yeah.
OMG DOUTCHE!!!!!!!! ITS A CARE4LY EDITIED TEXXXTURE BADASSSSS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
« Last Edit: November 30, 2010, 07:00:36 AM by Fede-lasse »
|
Logged
|
Call me Fede.
|
|
|
Josh @ Dreamland
|
 |
Reply #26 Posted on: November 30, 2010, 08:59:06 AM |
|
|
Prince of all Goldfish
 Location: Ohio, United States Joined: Feb 2008
Posts: 2340
|
;__;
WHAT are we BREEDING?
|
|
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
|
Fede-lasse
|
 |
Reply #28 Posted on: December 06, 2010, 03:57:41 AM |
|
|
AI Programmer
 Location: Denmark, Europe Joined: Oct 2008
Posts: -2342534e-10
|
We won't be mimicking glitches. Setting x to xprevious and y to yprevious for solid collisions is a part of GM, not a glitch.
I just want to point out that even things like move_outside_all/solid() won't work... I think. And that's bad for a "solid" feature that renders collisions useless. EDIT: Finished 3-Dimensional Games. I edited the code in a couple of the examples to make the depth effects look better. EDIT 2: Updated 3-Dimensional Games. Retep was so nice that he decided to make a tile smoother that made interpolated versions of different tiles for me, so that I could make a complete tileset without spending ages doing it in GIMP or something. Kudos to him. EDIT 3: Finished the 1945 example that I decided to name 9000 instead with American/Russian stealth bombers/jets flying around and shooting each other or something. Yes, I have nothing better to do here at school. EDIT 4: Finished Maze Games. EDIT 5: Fixed the room speed in the Pacman (treasure) example, because it was slow and laggish. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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