The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Create & Discover > Game Development
Reload this Page Frame rate problem -Sphere-
Sign Up Rules/FAQ Daily Battle Blogs Mark Forums Read


Game Development Your number one stop for anything related to creating games (except ROM hacks). You can even make your own!

Reply
 
Thread Tools
  #1    
Old August 10th, 2007 (10:00 PM).
rm2kdude's Avatar
rm2kdude rm2kdude is offline
Advanced Pixel-Artist
 
Join Date: Jun 2004
Location: usa
Age: 27
Gender: Male
Nature: Jolly
Posts: 356
Code:
function game()
  {
  CreatePerson("person", "aegis.rss", false);
  SetPersonSpriteset("person", LoadSpriteset("Trunks.rss"));
	AttachCamera("person");
	SetRenderScript("Movement();");
	AttachInput("person");//but we don't want the standard movement interfereing with the movement we'll be having so...
BindKey(KEY_LEFT, "", "");
BindKey(KEY_RIGHT, "", "");
BindKey(KEY_UP, "", "");
BindKey(KEY_DOWN, "", "");
	MapEngine("Test.rmp", 60);
}

var facing, walker;
 
function Movement()
{
	walker = GetInputPerson();
	if (IsKeyPressed(KEY_UP))
	if (IsKeyPressed(KEY_UP))
 
	walker = GetInputPerson();
	if (IsKeyPressed(KEY_UP))
	{
		if(!facing ||
		    facing == "d" ||
		   (!IsKeyPressed(KEY_LEFT) &&
		    !IsKeyPressed(KEY_RIGHT)))
		{
			facing = "u";
			QueuePersonCommand(walker, COMMAND_FACE_NORTH, true);
		}
		QueuePersonCommand(walker, COMMAND_MOVE_NORTH, true);
	}
	 
	else if (IsKeyPressed(KEY_DOWN))
	{
		if(!facing ||
		    facing == "u" ||
		   (!IsKeyPressed(KEY_LEFT) &&
		    !IsKeyPressed(KEY_RIGHT)))
		{
			facing = "d";
			QueuePersonCommand(walker, COMMAND_FACE_SOUTH, true);
		}
		QueuePersonCommand(walker, COMMAND_MOVE_SOUTH, true);
	}
	
	if (IsKeyPressed(KEY_LEFT))
	{
		if(!facing ||
		    facing == "r" ||
		   (!IsKeyPressed(KEY_UP) &&
		    !IsKeyPressed(KEY_DOWN)))
		{
			facing = "l";
			QueuePersonCommand(walker, COMMAND_FACE_WEST, true);
		}
		QueuePersonCommand(walker, COMMAND_MOVE_WEST, true);
	}
	else if (IsKeyPressed(KEY_RIGHT))
	{
		if(!facing ||
		    facing == "l" ||
		   (!IsKeyPressed(KEY_UP) &&
		    !IsKeyPressed(KEY_DOWN)))
		{
			facing = "r";
			QueuePersonCommand(walker, COMMAND_FACE_EAST, true);
		}
		QueuePersonCommand(walker, COMMAND_MOVE_EAST, true);
	}
}
It takes like a second for the first frame to appear but also the frame 0 shouldn't be used when looking the animation..
__________________
Mother of god... it's almost been 12 years since I joined this community!!
Damn, time sure does fly ^O^
Reply With Quote

Relevant Advertising!

  #2    
Old August 11th, 2007 (2:30 AM).
Revolution's Avatar
Revolution Revolution is offline
Da Bestest Pokemon Master
 
Join Date: Jul 2007
Location: Everywhere
Age: 24
Gender:
Nature: Quiet
Posts: 122
Send a message via AIM to Revolution Send a message via Windows Live Messenger to Revolution Send a message via Yahoo to Revolution Send a message via Skype™ to Revolution
Have you asked this question of the SphereDev Forum? I'm guessing its in your Movement.
__________________

Has anyone ever saw a ACP that allows you to post News, update Pokemon of the Week, Site options and many more things? If not ask me and ill show you one.

Sites: PR, PG

AuctionAds: Increase the bid on your site's income!
Reply With Quote
  #3    
Old August 11th, 2007 (6:27 PM).
rm2kdude's Avatar
rm2kdude rm2kdude is offline
Advanced Pixel-Artist
 
Join Date: Jun 2004
Location: usa
Age: 27
Gender: Male
Nature: Jolly
Posts: 356
It's always in the movement, but I made 2 spritesets 1 for walking and another for standing. But to use both I'd need a variable so I'd name it hero_move. and if it =true I use trunks_walking.rss and if =false I use trunks.rss. Though since there is no IsNoKeyPressed it makes it impossible to figure out if I'm pressing a key.
__________________
Mother of god... it's almost been 12 years since I joined this community!!
Damn, time sure does fly ^O^
Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 2:19 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2016 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2016.