ReverseAnti Gravity demo walk right side up or upside down!!

Post here your demos and examples with the source files.
Forum rules
Always post the games with a screenshot.
The file must have the ged and data files (complete game source)
Use the forum attachment to post the files.
It is always better to use the first post to put the game files

ReverseAnti Gravity demo walk right side up or upside down!!

Postby again » Thu Feb 24, 2011 5:35 pm

I am in the belief there are no limitation you can have. Now with this you can reverse gravity and walk along walls. This is absolutely amazing and fun , just think of the games we could make!!!!
Attachments
reverse gravity mario.png
reverse gravity.zip
(554.01 KiB) Downloaded 216 times
Free windows mobile games like doodle jump and super mario bros
http://krenisis.freeforums.org/
again
 
Posts: 258
Joined: Wed Jan 19, 2011 7:06 pm
Score: 33 Give a positive score

Re: ReverseAnti Gravity demo walk right side up or upside do

Postby schnellboot » Thu Feb 24, 2011 5:39 pm

some day pyro made a game with gravity changing it was pretty fun I think ..
schnellboot
 
Posts: 819
Joined: Sat Mar 31, 2007 1:35 pm
Location: Germany
Score: 102 Give a positive score

Re: ReverseAnti Gravity demo walk right side up or upside do

Postby MrJolteon » Thu Feb 24, 2011 6:44 pm

You mean Mazeman?
Join us on Discord!
Game Editor 2
These are the best ways to reach me these days


Your local Community Janitor, always lurking in the shadows...
User avatar
MrJolteon
 
Posts: 2326
Joined: Sat Aug 09, 2008 3:25 pm
Location: Stranded under endless sky
Score: 105 Give a positive score

Re: ReverseAnti Gravity demo walk right side up or upside do

Postby Hblade » Thu Feb 24, 2011 7:35 pm

nice dude :D
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: ReverseAnti Gravity demo walk right side up or upside do

Postby MrJolteon » Fri Feb 25, 2011 6:22 am

Nice, reminds me of a flash game called VVVVVV(It's just a demo)
Join us on Discord!
Game Editor 2
These are the best ways to reach me these days


Your local Community Janitor, always lurking in the shadows...
User avatar
MrJolteon
 
Posts: 2326
Joined: Sat Aug 09, 2008 3:25 pm
Location: Stranded under endless sky
Score: 105 Give a positive score

Re: ReverseAnti Gravity demo walk right side up or upside do

Postby Bee-Ant » Fri Feb 25, 2011 5:07 pm

Kren, I think I will post the optimization here as well. So that we all can learn it.

OK, here's my optimization...

Edit:
1. Mario -> KeyDown -> Space to be:
Code: Select all
int tmp=antigravity;
if(tmp==-1)
{
    ChangeAnimation("Event Actor", "upside down right", FORWARD);
    antigravity=1;
}
if(tmp==1)
{
    ChangeAnimation("Event Actor", "Small_Mario_Run_Right", FORWARD);
    antigravity=-1;
}

2. Mario -> DrawActor to be:
Code: Select all
x+=8;
yvelocity=-antigravity*12;

it will make yvelocity to be 12 if antigravity is -1, and -12 if antigravity is 1.
So the basic is just use the antigravity value to decide the yvelocity.
Even simpler than using IF ELSE right?

Also, don't forget to add:
Mario -> CreateActor:
Code: Select all
antigravity=1;

As the default value. Since we don't use 0 value anymore, so we need to set the initial value.

If you want to make it even simpler, you can edit the Keydown code to be like this:
Code: Select all
int tmp=antigravity;
char str[4][64]={"Small_Mario_Run_Right","none","upside down right"};
ChangeAnimation("EventActor", str[tmp+1], FORWARD);
antigravity=tmp*-1;

So it will change the animation by pointing the array value.
If tmp is -1, then it will point str[0], where str[0] is "Small_Mario_Run_Right"
If tmp is 1, then it will point str[2], where str[2] is "upside down right"
What about str[1] then???
It will point str[1] if tmp is 0. Since we don't use 0 value for tmp (or antigravity in this case), so we can just ignore it.
That's why I type "none" on it.

Hope that helps :D
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: ReverseAnti Gravity demo walk right side up or upside do

Postby again » Mon Feb 28, 2011 4:52 pm

Thanks bee-ant Iam glad you guys enjoyed the game.
Free windows mobile games like doodle jump and super mario bros
http://krenisis.freeforums.org/
again
 
Posts: 258
Joined: Wed Jan 19, 2011 7:06 pm
Score: 33 Give a positive score

Re: ReverseAnti Gravity demo walk right side up or upside do

Postby lcl » Tue Mar 01, 2011 1:01 pm

Good job kren! :)
But one thing. You should disable changing the gravity
when player isn't touching the ground.
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score


Return to Game Demos

Who is online

Users browsing this forum: No registered users and 1 guest