forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

NEED HELP REAL BAD WITH IMAGES ON MY GAME !!!!!!!!!

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development
View previous topic :: View next topic  
Author Message
chrismackle



Joined: 17 May 2008
Posts: 2

PostPosted: Sun May 18, 2008 11:25 am    Post subject: NEED HELP REAL BAD WITH IMAGES ON MY GAME !!!!!!!!! Reply with quote

Im making a POKEMON game for psp in lua but when i put pictures of like houses and trees on the game the character just walks ontop of it i want to know how i can make it so u cant walk on the houses so u stop moving on the sides

MY GAME WILL BE RELEASED !!! AS SOON AS I FIND OUT !!!

Please help
Back to top
View user's profile Send private message
PiCkDaT



Joined: 04 Oct 2007
Posts: 69

PostPosted: Tue May 20, 2008 3:19 am    Post subject: Reply with quote

Make an array of a map like this

map = {
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,2,2,2,2,2,2,2,2,2,3,2,2,2,2,2,2,2,1,
1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
}

just as an example make 1 = water and 2 = grass(walkable) and 3 = house... what you do is keep track of where the character is on the map and depending on that and what space the character will move to next you can say...

tileUp is a function that looks for the tile above the character

if tileUp = water or tileUp = house then canWalkUp = false end

hope this gives you an idea.
_________________
Enlighten me, Reveal my fate -- Follow - Breaking Benjamin
Back to top
View user's profile Send private message AIM Address
Crux



Joined: 25 May 2008
Posts: 10

PostPosted: Mon May 26, 2008 8:21 am    Post subject: Reply with quote

I just have one comment to add to the above poster. Use numbers that aren't walkable on in the thousands (water would be 1000, a mountain maybe 1001, etc.), and those tiles that are walkable on everything under that(grass = 0, path = 1, etc).

I've gone the route of making a RPG and it just makes it easier to keep them separated. Keep it organized its a big project I'm sure. Good luck!

Edit: Also check this link if you've no idea what we're talking about http://www.evilmana.com/tutorials/lua_tutorial_12.php
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group