fighter

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
dtodabreezy
Posts: 10
Joined: Wed Jun 21, 2006 5:05 am

fighter

Post by dtodabreezy »

if any body can help me with any references to fighters becuz thins is my very first time programing a game im used to a lot buy now but somethings i think would be very complicated souch as the hit system anything to help ill take at the end results to the game its gonna be one huge fighting game with every one you can think so any help will be notted for the criedits thx also how do u get lua running on windows our can you write the script in something elese
dtodabreezy
Posts: 10
Joined: Wed Jun 21, 2006 5:05 am

come on

Post by dtodabreezy »

can some body help me this is my first game im making in a scrippted program i need these questions answered
1. is there in ai scripts i can study
2. should i use image collision or a hit box
3 . should i use lua or c++
4. does any body wana help
plz
Altair
Posts: 76
Joined: Sat May 20, 2006 2:33 am
Location: The Netherlands

Post by Altair »

1. I only know of an AI tut made by Vaza. Search for that, they have it at QJ forums,but more sites have it.
2. Since images are a "box" its the same, or do you mean something else?
3. C is better I guess, but its also more difficult to learn (havent tried it yet, but from the looks of it). Well LUA is pretty simple anyway and i think it should be able to run a fight game.
4. sorry i have my own thing and Im in the middle of my tests aswell.
dtodabreezy
Posts: 10
Joined: Wed Jun 21, 2006 5:05 am

hit box

Post by dtodabreezy »

is a invisble box created at certain parts of the charectar to allow pepole
to only get hit buy that part and not anothere like in mortal kombat when you high punches theres a hit box at his hands that way if some body sweeps you they wont get damaged im a horrible explainer :(
romero126
Posts: 200
Joined: Sat Dec 24, 2005 2:42 pm

Post by romero126 »

When you program. think if i were a computer how would i code myself. It kinda helps.. actually
dtodabreezy
Posts: 10
Joined: Wed Jun 21, 2006 5:05 am

thanks

Post by dtodabreezy »

thanks for the tip any is welcome
dtodabreezy
Posts: 10
Joined: Wed Jun 21, 2006 5:05 am

?

Post by dtodabreezy »

when i put my files in the lua it reads no script file found
i used luaide if that may be the problem
Altair
Posts: 76
Joined: Sat May 20, 2006 2:33 am
Location: The Netherlands

Post by Altair »

I don't exactly know what can be the problem thats causing it. I think there are many possibilities (maybe Im wrong about that), but I do know it doesn't matter if you use luaide or something else.
dtodabreezy
Posts: 10
Joined: Wed Jun 21, 2006 5:05 am

?

Post by dtodabreezy »

still havent got it to work but i got a question how do u know exactly were to put an image on lua like do u guess and check or is there some other way
Altair
Posts: 76
Joined: Sat May 20, 2006 2:33 am
Location: The Netherlands

Post by Altair »

Maybe i can help you with the problem but you'll have to post your code, or atleast the line of code where the error is.

For the image thing: you just have to calculate it with smple math, or use a little program with which you can check coordinates. OR you just guess and adjust, yes.
dtodabreezy
Posts: 10
Joined: Wed Jun 21, 2006 5:05 am

Post by dtodabreezy »

--menu setup
menu=image.load[menu/mainmenu.png]
menus=1
--menu

while true do

pad=control.read[]

screen:blit[0,0,menu]

if pad:cross[] then dofile["menu.lua"]
end
start up menu



screen:clear
--load menus
bg=image.load[menu/bg]
bg2=image.load[menu/bg2]
end

while true do

pad=control.read

menus=1

screen:blit[0,0,bg]
end
if pad:down[] then
menus=menus+1
end
if pad:up[]then
menus=menus-1
end
if menus==0 then
menus=menus+2
end
if menus==3 then
menus=menus-2
end
if menus==1
screen:blit[0,0,bg]
end
if menus==2
screen:blit[0,0,bg2]
end
if menus==1 and pad:cross[]then
dofile["charcter.lua"]
end
if menus==2 and pad:cross[]then
dofile["options.lua"]
end
end

menu to options and charectar screen

chosse=image.load[menu/chosse]
face=image.load[scorpion/misc/face]

screen:blit[0,0,chosse]

screen:blit[30,40,face]

menuc=1

while true do

pad=control.read[]

if menuc=1 and pad.cross[]
then dofile["game.lua"] and scorpion=1
end

charectar select screen if theres any thing rong with it tell me so i can move on to the game it self (my first time coding remeber)
Altair
Posts: 76
Joined: Sat May 20, 2006 2:33 am
Location: The Netherlands

Post by Altair »

I think this should work, but i did it fast. Fat is edited.
BTW Are you sure you can use [] instead of ()?


--menu setup
menu=image.load[menu/mainmenu.png]
menus=1
--menu

while true do
screen:clear()
pad=control.read[]

screen:blit[0,0,menu,0,0,menu:width(),menu:height()]

screen.waitVblankStart() --you need this so it shows on the screen
screen:flip()


if pad:cross[] then dofile["menu.lua"]
end

--start up menu

screen:clear()

--load menus
bg=image.load[menu/bg.png] --I assumed here that its a png
bg2=image.load[menu/bg2.png] -- You just have to adjust that to the right filetype

end -- end of while true loop



while true do
screen:clear()
pad=control.read()

menus=1

screen:blit[0,0,bg,0,0,bg:width(),bg:height()]

screen.waitVblankStart() --you need this so it shows on the screen
screen:flip()

-- end -- this one shouldn't be here
if pad:down[] then
menus=menus+1
end
if pad:up[]then
menus=menus-1
end
if menus==0 then
menus=menus+2
end
if menus==3 then
menus=menus-2
end
if menus==1
screen:blit[0,0,bg,0,0,bg:width(),bg:height()]
end
if menus==2
screen:blit[0,0,bg2,0,0,bg2:width(),bg2:height()]
end
if menus==1 and pad:cross[]then
dofile["charcter.lua"]
end
if menus==2 and pad:cross[]then
dofile["options.lua"]
end

screen.waitVblankStart() --you need this so it shows on the screen
screen:flip()


end -- end of while true loop

--menu to options and charectar screen

chosse=image.load[menu/chosse.png]
face=image.load[scorpion/misc/face.png]

screen:blit[0,0,chosse,0,0,chosse:width(),chosse:height()]

screen:blit[30,40,face,0,0,face:width(),face:height()]

screen.waitVblankStart() --you need this so it shows on the screen
screen:flip()


menuc=1

while true do

pad=control.read[]

if menuc=1 and pad.cross[]
then dofile["game.lua"] and scorpion=1
end

end -- end of while true loop
User avatar
daurnimator
Posts: 38
Joined: Sun Dec 11, 2005 8:36 pm
Location: melbourne, australia

Post by daurnimator »

you can't

[] are only for use when dealing with tables
dtodabreezy
Posts: 10
Joined: Wed Jun 21, 2006 5:05 am

o

Post by dtodabreezy »

thanks didnt know that that may have been the problem
Altair
Posts: 76
Joined: Sat May 20, 2006 2:33 am
Location: The Netherlands

Post by Altair »

well among others anyway as you can see by my edited version of your code. Have you read any LUA tutorial?
dtodabreezy
Posts: 10
Joined: Wed Jun 21, 2006 5:05 am

yea

Post by dtodabreezy »

i have yet i never coded before and still havent got it to work
Post Reply