see ya on the flipside fg-54 :D
Printable View
see ya on the flipside fg-54 :D
are you talking to shadowblind or me? well if you are talking to me i'm gonna see what pygame can do, and if its less limited then game maker i'll stick with that.Quote:
Great, now I would appreciate in knowing which path you have chosen.
i know, but there are about 20 different downloads there, wich one is the engine?
Define limited, it has its own scripting engine that you can use so I cant see where the limits would be for a beginner like you.Quote:
Originally Posted by fg-54
The one under Windows which is the operating system that you are using.Quote:
Originally Posted by fg-54
And RTFM: http://rene.f0o.com/mywiki/PythonGameProgramming
Why am I going to get the feeling you are going to get the same problems again?
..i dun know...anyways, i'll go to bed now, thanks again for you'r help, i'll just download everything until something comes up, bye!
WTF? I give up. I really do.
http://img60.imageshack.us/img60/7708/image1ps5.th.png
yaustar deep breaths, in and out...there u go :D
Does fg-54 even know what a programming language is?
This did not work. Why?
-- Lua Project 2
-- Author: Shadowblind
-- Blue Color Object
blue = Color.new(0, 255, 0)
upPressed = 'You are pressing the "UP" button'
downPressed = 'You are pressing the "DOWN" button'
leftPressed = 'You are pressing the "LEFT" button'
rightPressed = 'You are pressing the "RIGHT" button'
-- *****Main Loop******
while true do
screen:clear()
pad = Controls.read()
if pad:up() then
screen:print(100,100,upPressed,green)
end
if pad:down() then
screen:print(100,100,downPressed,red)
end
if pad:left() then
screen:print(100,100,leftPressed,blue)
end
if pad:right() then
screen:print(100,100,rightPressed,yellow)
end
if pad:l() then
screen:print(100,100,LPressed,orange)
end
if pad:r() then
screen:print(100,100,'You are pressing the "R" button',yellow)
end
if pad:triangle() then
screen:print(100,100,'You are pressing the "TRIANGLE" button',green)
end
if pad:circle() then
screen:print(100,100,'You are pressing the "CIRCLE" button',green)
end
if pad:cross() then
screen:print(100,100,'You are pressing the "X" button',green)
end
if pad:square() then
screen:print(100,100,'You are pressing the "SQUARE" button',green)
end
screen.waitVblankStart()
screen.flip()
end
and to answer your question yaustar: no, he doesnt.
@shadowblind. Some of your colours haven't been created (eg green)
green, huh? Thats the clor the tut told me to put... So how is that fixable?
no he means u didn't create a variable for the color green, is that right oh wise one(yaustar)?
Put it this way, you have created the colour blue like:
blue = Color.new(0, 255, 0)
But green, red, yellow etc haven't. Have a guess how it is fixable.
@Blaze: actually the variable has been created (where it is used) but not given a value hence it is crashing.
:D thats why i called u the wise one
ohhhhhhhhh thx man
ok: Tables. I dont understand they're exact definition and what they do, and where to implement them.
myTable[1]
myTable[2]
myTable[3]
myTable[4]
myTable[5]
hey yaustar is there a specific way to code the script, and are there techniques were can take to avoid annoying things in the end, like short cuts to make things a bit more easy on us?
tables is a place to hold infor mation i suugesst yousing as mouch of these as you can like if youd want to hold your charcters informatioon in a table it would be like
player{}
player.x=60
player.y=200
player.health=100
then you could call from that in your script such as to print your health you would do something like
screen:print(100,100,player.health)
or when you have to blit your charcter your charcters x and y wont be just variables like
screen:blit(player.x,player.y,playerimage)
you can youse that for anything and it saves you time hope that helps:cool:
tables and functions make things a lil easyer^^
shadow my understanding of tables is they give information about the chacacter(s), like health, weapons, ect...correct me if i'm wrong yaustar
hmmm... would a standard table be
green = Color.new(19, 20, 21)
red = Color.new(22, 23, 24)
orange = Color.new(25, 26, 27)
yellow = Color.new(28, 29, 30)
yo dtothabreezy screen:blit(player.x,player.y,playerimage) what exactly does that do?
player .x is where your charcter is relative to x of the psp like a graph its the one that goes out y is the one that goes up if you were to minus or plus x it would give the illosion of movment ahhh :rolleyes: you get it
playerimage is what i use so it will blit all of the images i want in what way i want like if i would want playerimage to be him walking when you press right it would say playerimage=walk or something like that in my new animation system it runs off functions but i still keep that as a defualt to make it easier:cool:
i don't think so, i mean i'm just lookin at the tuts at evilmana i used a different site before(shoulda use evilmana :D) but i think thats just creating colour for the script to use, tables are used to store information about the character, like health, weapons, ammo, ect.Quote:
Originally Posted by Shadowblind
you could do something like that but you would be going out of your way to make that becuz most pepole just put those in at the top yall r the fastest posters ive seen in my life :cool:
o and so u know the colors when you put them in are like
the c in the color.new most be capatalized
color=Color.new(red,green,blue)
just remeber that so like to make green youd
green=Color.new(0,255,0) 255 is the most you can put in:cool:
dont worry itll come quickly after a while youll get yoused to it
lol i know i do post fast :D
shadow heres a table:
green = Color.new(0, 255, 0)
Enemy = { }
Enemy[1] = { type = "gargoyle", health = 100 }
Enemy[2] = { type = "vampire", health = 100 }
Enemy[3] = { type = "goomba", health = 100 }
Enemy[4] = { type = "ghost", health = 100 }
Enemy[5] = { type = "zombie", health = 100 }
Player = { }
Player[1] = { weapon = "sword", health = 100 }
Player[2] = { weapon = "knife", health = 100 }
while true do
pad = Controls.read()
screen:clear()
screen:print(5,10,"Player 1 Health: " .. Player[1].health,green)
screen:print(5,20,"Player 1 Weapon: " .. Player[1].weapon,green)
screen:print(250,10,"Enemy Health: " .. Enemy[1].health,green)
screen:print(250,20,"Enemy Type: " .. Enemy[1].type,green)
if pad:cross() then
Enemy[1].health = Enemy[1].health - 5
end
screen.waitVblankStart()
screen.flip()
end
oldpad = Controls.read()
if pad:cross() and oldpad:cross() ~= pad:cross() then
oldpad = pad
if pad:cross() and oldpad:cross() ~= pad:cross() and Enemy[1].health > 0 then
...thats right off of evilmana, i think this is concidered the tabels(arrays)
I have a shot at explaining the concept of a table.
Think of a variable as a storage box. The box can be empty (nil) or it can have something in it. Eg, value, image, text etc.
Now a table is a stack of these boxes and you can refer to them as Box 1, Box 2 etc. You can remove or insert boxes into/out of this stack and you can refer the stack of boxes as a group under one name.
That's the concept, the syntax in Lua can be cofusing so I let the Wiki deal with that.
http://lua-users.org/wiki/TablesTutorial
Note that tables are also refered to as arrays in places.
What you have done here is created a table called 'Enemy' and for each entry/storage box in 'Enemy' created another table that has two entries; 'type' and 'health'.Quote:
Enemy = { }
Enemy[1] = { type = "gargoyle", health = 100 }
Enemy[2] = { type = "vampire", health = 100 }
Enemy[3] = { type = "goomba", health = 100 }
Enemy[4] = { type = "ghost", health = 100 }
Enemy[5] = { type = "zombie", health = 100 }
fg-54 is having this problem: He has script.lua and script.cmd in the same file, when he runs script.cmd it says no lua file in the directory. Whats wrong?
BTW, can you make a simple game using a table? Thats what evilmana wants me to do...
Therefore, I can open your code and see how its placed.
fg-54 is ur script.lua still a text file? when u save it make sure to change the type of of the file, use "all files" and then save ur script.lua again, u'll have a lua file now(well u should) then just delete the txt file of ur script
they are, but i can only make one lua file (they can't all have the seame name)
he sent me a screenshot, here:
http://www.box.net/public/lpzmnq8sn9
this is what it looks like, but the .cmd file still doesnt appear to be runing it.
it can't be in a txt file, ok, go to file on the notepad, then save as, then at the bottom of the save box look for file type, its gunna say "*.txt" right? change that to "all files" then save it as "script.lua"
edit: ok after lookin at ur screenshot i'm kinda baffled, cuz u have a script.lua in the folder :confused:, i wonder y it won't work
i did that, but it doesn't work. look at the screen shot.
What is in script.cmd?