| View previous topic :: View next topic |
| Author |
Message |
dtodabreezy
Joined: 21 Jun 2006 Posts: 10
|
Posted: Wed Jun 21, 2006 5:12 am Post subject: fighter |
|
|
| 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 |
|
| Back to top |
|
 |
dtodabreezy
Joined: 21 Jun 2006 Posts: 10
|
Posted: Thu Jun 22, 2006 8:33 am Post subject: come on |
|
|
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 |
|
| Back to top |
|
 |
Altair
Joined: 20 May 2006 Posts: 76 Location: The Netherlands
|
Posted: Thu Jun 22, 2006 9:43 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
dtodabreezy
Joined: 21 Jun 2006 Posts: 10
|
Posted: Thu Jun 22, 2006 10:10 am Post subject: hit box |
|
|
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 :( |
|
| Back to top |
|
 |
romero126
Joined: 24 Dec 2005 Posts: 200
|
Posted: Fri Jun 23, 2006 5:21 am Post subject: |
|
|
| When you program. think if i were a computer how would i code myself. It kinda helps.. actually |
|
| Back to top |
|
 |
dtodabreezy
Joined: 21 Jun 2006 Posts: 10
|
Posted: Fri Jun 23, 2006 3:21 pm Post subject: thanks |
|
|
| thanks for the tip any is welcome |
|
| Back to top |
|
 |
dtodabreezy
Joined: 21 Jun 2006 Posts: 10
|
Posted: Sun Jun 25, 2006 5:05 am Post subject: ? |
|
|
when i put my files in the lua it reads no script file found
i used luaide if that may be the problem |
|
| Back to top |
|
 |
Altair
Joined: 20 May 2006 Posts: 76 Location: The Netherlands
|
Posted: Sun Jun 25, 2006 10:27 am Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
dtodabreezy
Joined: 21 Jun 2006 Posts: 10
|
Posted: Sun Jun 25, 2006 11:04 am Post subject: ? |
|
|
| 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 |
|
| Back to top |
|
 |
Altair
Joined: 20 May 2006 Posts: 76 Location: The Netherlands
|
Posted: Mon Jun 26, 2006 9:05 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
dtodabreezy
Joined: 21 Jun 2006 Posts: 10
|
Posted: Tue Jun 27, 2006 3:21 am Post subject: |
|
|
--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) |
|
| Back to top |
|
 |
Altair
Joined: 20 May 2006 Posts: 76 Location: The Netherlands
|
Posted: Tue Jun 27, 2006 6:19 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
daurnimator

Joined: 11 Dec 2005 Posts: 38 Location: melbourne, australia
|
Posted: Thu Jun 29, 2006 12:26 am Post subject: |
|
|
you can't
[] are only for use when dealing with tables |
|
| Back to top |
|
 |
dtodabreezy
Joined: 21 Jun 2006 Posts: 10
|
Posted: Thu Jun 29, 2006 1:15 am Post subject: o |
|
|
| thanks didnt know that that may have been the problem |
|
| Back to top |
|
 |
Altair
Joined: 20 May 2006 Posts: 76 Location: The Netherlands
|
Posted: Thu Jun 29, 2006 6:42 am Post subject: |
|
|
| well among others anyway as you can see by my edited version of your code. Have you read any LUA tutorial? |
|
| Back to top |
|
 |
dtodabreezy
Joined: 21 Jun 2006 Posts: 10
|
Posted: Fri Jun 30, 2006 10:15 am Post subject: yea |
|
|
| i have yet i never coded before and still havent got it to work |
|
| Back to top |
|
 |
|