Zeige Ergebnis 5.881 bis 5.910 von 10238
Lua Programming Help Thread
This is a discussion on Lua Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; You mean to unencrypt?...
-
02-28-2007, 08:23 PM #5881lol

- Registriert seit
- Aug 2006
- Ort
- Whittier, CA
- Beiträge
- 5.791
- Points
- 20.859
- Level
- 91
- Downloads
- 0
- Uploads
- 0
You mean to unencrypt?
-
02-28-2007, 08:29 PM #5882Look at my user title :p
- Registriert seit
- Feb 2006
- Ort
- Texas
- Beiträge
- 1.183
- Points
- 14.103
- Level
- 77
- Downloads
- 0
- Uploads
- 0
thats what i meant srry really tired
**********, ********** :p
http://img143.imageshack.us/img143/6...boysfanij8.gif
-
02-28-2007, 08:46 PM #5883QJ Gamer Blue
- Registriert seit
- Jul 2006
- Ort
- Alabama
- Beiträge
- 142
- Points
- 4.241
- Level
- 41
- Downloads
- 0
- Uploads
- 0
Just keep a spare, unencrypted script.
-
02-28-2007, 08:57 PM #5884Look at my user title :p
- Registriert seit
- Feb 2006
- Ort
- Texas
- Beiträge
- 1.183
- Points
- 14.103
- Level
- 77
- Downloads
- 0
- Uploads
- 0
yeah i forgot to cause i was tired and just clicked it. now remembered i didnt have an extra
**********, ********** :p
http://img143.imageshack.us/img143/6...boysfanij8.gif
-
03-01-2007, 06:57 AM #5885QJ Gamer Green
- Registriert seit
- Jul 2006
- Ort
- Middle Europe
- Beiträge
- 1.281
- Points
- 11.800
- Level
- 71
- Downloads
- 0
- Uploads
- 0
why do you encrypt lua codes? o_O
[1 Year QJ Member]
[LUA Coder and C Learner]
[Ball Revamped Clone v0.1]
[Phil's Shooting Range v0.3]
[HideFile PRX v2]
[SSR PRX v1.1]
-
03-01-2007, 08:06 AM #5886Banned for LIFE
- Registriert seit
- Oct 2006
- Ort
- East London, England
- Beiträge
- 2
- Points
- 18.744
- Level
- 86
- Downloads
- 0
- Uploads
- 0
So nobody can copy his hard work. Although i don't encrypt my scripts.
-
03-01-2007, 10:10 AM #5887QJ Gamer Green
- Registriert seit
- Nov 2005
- Ort
- Sweden
- Beiträge
- 460
- Points
- 6.520
- Level
- 52
- Downloads
- 0
- Uploads
- 0
The actual characters within the document also becomes fewer, and LuaPlayer reads the code faster as well.
Zitat von eldiablov
Geändert von HaxxBlaster (03-01-2007 um 10:27 AM Uhr)
[CENTER]Some of my homebrew Applications/Games:
[URL=http://forums.qj.net/showthread.php?t=47294&page=1&pp=10]Planet Fighter[/URL] | [URL=http://forums.qj.net/showthread.php?p=641672#post641672]Graphic Creator (V2.0)[/URL] | [URL=http://forums.qj.net/showthread.php?p=512717]Fire Pong[/URL] | [B][URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html#post1430891"][COLOR="Red"][SIZE="3"]Brushes v2.0[/COLOR][/SIZE][/B][/URL] [URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][B][SIZE="2"][COLOR="Black"]Released![/COLOR][/SIZE][/B][/URL]
[URL="http://haxxblaster.2u.se/"][COLOR="black"][FONT="Arial Black"]www.HaxxBlaster.com[/FONT][/COLOR][/URL]
[URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][IMG]http://img19.imageshack.us/img19/1346/brushesbannerqz3.png[/IMG][/URL][/CENTER]
-
03-01-2007, 12:15 PM #5888
you're saying that if i encrypt my code that my game will run faster?
Zitat von HaxxBlaster
-
03-01-2007, 12:24 PM #5889I'm Baaaack!

- Registriert seit
- May 2006
- Ort
- Nowhere
- Beiträge
- 2.186
- Points
- 17.067
- Level
- 83
- Downloads
- 0
- Uploads
- 0
Yes. It'll save space too.
Zitat von emericaska8r

-
03-01-2007, 12:56 PM #5890
what do you use to encrypt it?
-
03-01-2007, 02:31 PM #5891
i'm searching for it, i'll let you know when i find it
-
03-01-2007, 02:36 PM #5892I'm Baaaack!

- Registriert seit
- May 2006
- Ort
- Nowhere
- Beiträge
- 2.186
- Points
- 17.067
- Level
- 83
- Downloads
- 0
- Uploads
- 0
The Luac binary.
Make a new text file. Inside of it write:
Luac yourscriptname.lua outputname.lua
pause
Then rename it to Luac.bat and run it.
-
03-01-2007, 02:39 PM #5893
seems like there is a thing called luac which precompiles your code into binary files which will load faster, and protect your code.
-= Double Post =-
and XtreamLua CompilerGeändert von emericaska8r (03-01-2007 um 02:58 PM Uhr) Grund: Automerged Doublepost
-
03-01-2007, 03:02 PM #5894I'm Baaaack!

- Registriert seit
- May 2006
- Ort
- Nowhere
- Beiträge
- 2.186
- Points
- 17.067
- Level
- 83
- Downloads
- 0
- Uploads
- 0
LuaC is different than XtreamLua Compiler. XtreamLua Compiler is harder to decrypt.

-
03-01-2007, 03:23 PM #5895
ok i need some more help here i got my animation to work I acutally didn't use animation lib but soulkiller's aniamtion instead :Punk: but i have a scrolling bg and when i move the whole animation comes with me here's my script if anyone wants to give a crack at it
[code]
--///////////////// Aquateen Created By : pspaquaforce, Thanks To Evilmana Tutorials\\\\\\\\\\\\\\\\ \\
--///////////////// Special Thanks : Jason215, soulkiller, Evilmana Forums
green = Color.new(0,255,0)
white = Color.new(255,255,255)
red = Color.new(255,0,0)
black = Color.new(0,0,0)
--// Player, Enemy, Ground , bullet
splash = Image.load("splashScreen. png")
--OPENING SPLASH SCREEN
screen:clear()
screen:blit(0,0,splash)
screen.flip()
screen.waitVblankStart(10 0)
backgroundCache = Image.load("image.png")
backgroundCache2 = Image.load("image2.png")
backgroundCache3 = Image.load("image3.png")
bullet = Image.createEmpty(4,4)
bullet:clear(red)
player1 = Image.load("figure.png")
Player = {}
Player[1] ={ x = 50, y = 200, gravity = 200, jumpspeed = 10, jumpstate= "ground"}
enemy1 = Image.load("shake.png") --// enemy image
Enemy= {}
Enemy[1] ={x = 400, y = 150, gravity = 200, jumpspeed = 10, jumpstate= "ground"}
BulletInfo = {}
for a = 1,5 do
BulletInfo[a] = { pic = bullet , firing = false, direction = "right", x = Player[1].x + 32,
y = Player[1].y + 16 }
end
Back1 = {} --------first scrolling background ( standard image 480 x 272)
Back1.x = 0 ----positioned at the start
Back1.y = 0
Back1.img = backgroundCache --- first background
Back2 = {} --------Second scrolling background ( standard image 480 x 272)
Back2.x = 480 ---- positioned precisely after the first background
Back2.y = 0
Back2.img = backgroundCache2 --- second background to scroll after first
Back3 = {} --------Third scrolling background ( standard image 480 x 272)
Back3.x = 960 ---- positioned precisely after the second background
Back3.y = 0
Back3.img = backgroundCache3 --- second background to scroll after second
ground = Image.load("ground.png")
frame1 = Image.load("frame1.png")
frame2 = Image.load("frame2.png")
frame3 = Image.load("frame3.png")
currentFrame = 1 --this represents which frame is displaying
counter = 0 --this is the frame counter which is used to determine when to change frames
--// Variable
oldpad = Controls.read()
currentBullet = 0
direction = "right"
--// Functions
function bulletFire()
for i = 1,5 do
if BulletInfo[i].firing == true then
if BulletInfo[i].direction == "right" then BulletInfo[i].x = BulletInfo[i].x + 10 end
if BulletInfo[i].direction == "left" then BulletInfo[i].x = BulletInfo[i].x - 10 end
screen:blit(BulletInfo[i].x,BulletInfo[i].y,BulletInfo[i].pic)
end
if BulletInfo[i].x < 0 or BulletInfo[i].x > 480 or BulletInfo[i].y < 0 or BulletInfo[i].y > 272 then BulletInfo[i].firing = false end
end
end
function bulletSetup()
--Increase the current bullet by one, or reset it to 1
if currentBullet < 5 then
currentBullet = currentBullet + 1
else
currentBullet = 1
end
if direction == "left" then
BulletInfo[currentBullet].x = Player[1].x
BulletInfo[currentBullet].y = Player[1].y + 16
end
if direction == "right" then
BulletInfo[currentBullet].x = Player[1].x + 32
BulletInfo[currentBullet].y = Player[1].y + 16
end
BulletInfo[currentBullet].direction = direction
BulletInfo[currentBullet].firing = true
end
function movePlayer()
pad = Controls.read()
if pad:left() then
Player[1].x = Player[1].x - 1.5
Back1.x = Back1.x + 3 ------ moves the background to scroll in the direction you are going
Back2.x = Back2.x + 3 ------ moves the background to scroll in the direction you are going
Back3.x = Back3.x + 3 ------ moves the background to scroll in the direction you are going
direction = "left"
end
if pad:right() then
Player[1].x = Player[1].x + 1.5
Back1.x = Back1.x - 3 ------ moves the background to scroll in the direction you are going
Back2.x = Back2.x - 3 ------ moves the background to scroll in the direction you are going
Back3.x = Back3.x - 3 ------ moves the background to scroll in the direction you are going
direction = "right"
end
if pad:up() then
Player[1].y = Player[1].y - 1
direction = "up"
end
if pad:down() then
Player[1].y = Player[1].y + 1
direction = "down"
end
end
function chasePlayer()
stallchase = math.random(2)
if stallchase == 1 then
if Enemy[1].x > Player[1].x then
Enemy[1].x = Enemy[1].x - 1.5
elseif Enemy[1].x < Player[1].x then
Enemy[1].x = Enemy[1].x + 2
end
end
end
function Jump() --// Function to jump
if pad:cross() and Player[1].jumpstate == "ground" then Player[1].jumpstate = "jumping"
end
if Player[1].jumpstate == "jumping" then
Player[1].jumpspeed = Player[1].jumpspeed - 0.5
Player[1].gravity = Player[1].gravity - Player[1].jumpspeed
end
if Player[1].gravity < 0 then
Player[1].jumpstate = "falling"
end
if Player[1].gravity < 200 and Player[1].jumpstate == "falling" then
Player[1].gravity = Player[1].gravity + (Player[1].jumpspeed + 3)
end
if Player[1].gravity == 200 then
Player[1].jumpspeed = 10
Player[1].jumpstate = "ground"
end
if Player[1].gravity > 200 then Player[1].gravity = 200
end
Player[1].y = Player[1].gravity
end
while true do
pad = Controls.read()
screen:clear()
counter = counter + 1
screen:clear()
if counter > 60 then --if 60 frames have passed
if currentFrame == 3 then --if we are on the last frame
currentFrame = 1 --go back to first frame (loops animation)
else
currentFrame = currentFrame + 1 --else goto the next frame
end
counter = 0 --reset the counter
end
if pad:circle() and oldpad:circle() ~= pad:circle() then
bulletSetup()
end
--// Loads Functions
movePlayer()
chasePlayer()
Jump()
--
--// blitting Image to screen and text
screen:blit(Back1.x, Back1.y, Back1.img) --- blits first background to the screen
screen:blit(Back2.x, Back2.y, Back2.img) --- blits second background to the screen
screen:blit(Back3.x, Back3.y, Back3.img) --- blits third background to the screen
screen:blit(Player[1].x, Player[1].y, player1)
screen:blit(Enemy[1].x, Enemy[1].y, enemy1)
screen:blit(0,262,ground)
bulletFire()
screen
rint(10,10,"X: "..Player[1].x.." Y: "..Player[1].y,green)
screen
rint(10,20,"Jumps tate: "..Player[1].jumpstate,green)
screen
rint(400,10,"You Suck",green)
--
if currentFrame == 1 then --draw first frame
screen:blit(370,50,frame1 )
elseif currentFrame == 2 then --draw second frame
screen:blit(370,50,frame2 )
elseif currentFrame == 3 then --draw third frame
screen:blit(370,50,frame3 )
end
screen.waitVblankStart()
screen.flip()
end[code]
-
03-01-2007, 03:55 PM #5896
I'm trying to make a function that will load all the images in the sub directory "tiles" into a table. The code I've put together so far doesn't work, lua player quits with this error message:
error: tileloader.lua:15 attempt to index global 'files' (a nil value)
or
error: tileloader.lua:15 Image.load: error loading image
it depends on whether or not I use ".tiles/" or "tiles/"
can anyone tell me what I'm doing wrong?Code:loop1 = true loop2 = true tilenum = 1 files = {} tiles = {} white=Color.new(255,255,255) -- load all images from tiles folder function loadtiles(tiles) loop1 = true files = System.listDirectory("tiles/") while loop1 do tiles[tilenum] = Image.load(files[tilenum].name) tilenum = tilenum +1 if files[tilenum].name == nil then loop1 = false end end end loadtiles(tiles) -- display images one at a time loop1 = true tilenum = 1 while loop1 do loop2 = true screen:blit (10,10, tiles[tilenum]) screen:flip() while loop2 do pad = Controls.read() if pad:start() then loop2=false oldpad = pad end end tilenum = tilenum +1 if pad:start() and pad ~= oldpad then loop1 = false end endGeändert von Merick (03-01-2007 um 04:11 PM Uhr)
-
03-01-2007, 04:47 PM #5897I love the PS3!!!
- Registriert seit
- Nov 2005
- Ort
- Look behind you
- Beiträge
- 1.876
- Points
- 11.447
- Level
- 70
- Downloads
- 0
- Uploads
- 0
I just had a inquiry
which is more efficient, doing 3 if statements or using one if and 2 else if?[size=-3][color=#fefefe]11[/color][color=white]0[/color][color=#fbfbfb]1[/color][color=#f1f4f6]0[/color][color=#f2f5f8]0[/color][color=#f7f8fa]1[/color][color=#fcfcfc]0[/color][color=#fdfefd]0[/color][color=#fffffe]1[/color][color=#fefefe]1[/color][color=white]1[/color][color=#fefefe]000[/color][color=white]1[/color][color=#fefefe]0[/color][color=white]0[/color][color=#fefefe]1111011[/color][color=white]1[/color][color=#fefefe]1[/color][color=white]101[/color]
[color=white]1[/color][color=#fffefe]0[/color][color=#cad3e0]0[/color][color=#6f7f9c]1[/color][color=#788eaf]0[/color][color=#98b7d6]0[/color][color=#99c0e1]0[/color][color=#9ac2e2]1[/color][color=#a5c6e2]1[/color][color=#a6c3e2]0[/color][color=#b2bed1]1[/color][color=#dbe2ed]0[/color][color=#f7f9fa]1[/color][color=#fefefd]10110[/color][color=#fefefe]01[/color][color=#fefefd]0[/color][color=#fefefe]1[/color][color=#fefefd]10[/color][color=#fefefe]1[/color][color=white]00100[/color]
[color=#fefefe]0[/color][color=#f2f6f8]0[/color][color=#566da3]0[/color][color=#8a919d]1[/color][color=#e2e5e4]0[/color][color=#eff2f3]0[/color][color=#eef2f6]1[/color][color=#e8eef3]1[/color][color=#dfe6ee]1[/color][color=#d1dee8]0[/color][color=#c1cddd]1[/color][color=#7997ce]1[/color][color=#8ea4d1]1[/color][color=#ebeeee]0[/color][color=#fdfef9]0[/color][color=#fefffa]1[/color][color=#fefefc]01101011[/color][color=#fefefd]1[/color][color=#fefefe]00[/color][color=white]10[/color][color=#fefefe]1[/color]
[color=#fefefe]1[/color][color=#dde3ef]0[/color][color=#4866a7]1[/color][color=#b3bbc6]0[/color][color=#fafbf7]1[/color][color=#fefefc]0[/color][color=#f6f7f9]0[/color][color=#a8b6cf]1[/color][color=#6a7c9b]0[/color][color=#6886b2]0[/color][color=#7697c8]0[/color][color=#85a3cd]1[/color][color=#6287c3]1[/color][color=#496eb6]1[/color][color=#98abce]0[/color][color=#dde5e5]1[/color][color=#fcfef4]0[/color][color=#fdfef7]1[/color][color=#fefffa]100[/color][color=#fefefb]00[/color][color=#fefefc]00[/color][color=#fefefd]1[/color][color=#fefefe]1[/color][color=white]0[/color][color=#fefefe]0[/color][color=white]1[/color]
[color=#fefefd]0[/color][color=#f8fafa]0[/color][color=#a7bce4]1[/color][color=#6887cf]0[/color][color=#9eb0d3]1[/color][color=#e3e9ec]1[/color][color=#bbc4d6]0[/color][color=#405b99]1[/color][color=#848b97]0[/color][color=#c2cace]0[/color][color=#c2cdd7]1[/color][color=#bdcce0]0[/color][color=#94acd4]1[/color][color=#547dc3]1[/color][color=#385ea9]1[/color][color=#496eb1]1[/color][color=#90a7c7]1[/color][color=#dde4e4]1[/color][color=#f6f9ee]1[/color][color=#fcfef3]1[/color][color=#fdfff5]1[/color][color=#fdfef7]1[/color][color=#fdfef8]0[/color][color=#fdfef9]1[/color][color=#fefefa]1[/color][color=#fefffb]1[/color][color=#fefefb]0[/color][color=#fefefc]1[/color][color=#fefefe]11[/color]
[color=#fefefc]01[/color][color=#fcfdfc]0[/color][color=#e6ecf7]0[/color][color=#9fb5e7]0[/color][color=#6889cf]0[/color][color=#6b86c0]1[/color][color=#415ba1]0[/color][color=#6c82b0]0[/color][color=#d4d9da]0[/color][color=#f4f6ec]0[/color][color=#f8faf1]1[/color][color=#f5f8f3]0[/color][color=#e0e7ec]1[/color][color=#a0b7d8]1[/color][color=#5e82c2]0[/color][color=#2e5fb4]0[/color][color=#4065b0]1[/color][color=#809cc5]1[/color][color=#cdd7d9]1[/color][color=#f7f9e9]0[/color][color=#fafcef]1[/color][color=#fcfef2]1[/color][color=#fdfef5]1[/color][color=#fdfef6]1[/color][color=#fdfef9]0[/color][color=#fefff9]1[/color][color=#fefffa]1[/color][color=#fefefc]10[/color]
[color=#fefefc]1100[/color][color=#fbfcfc]1[/color][color=#e8eff7]1[/color][color=#a5b8e6]1[/color][color=#5a7cc9]1[/color][color=#3a589d]0[/color][color=#3c5ba2]1[/color][color=#8d9fc1]1[/color][color=#d8deda]0[/color][color=#f4f7e8]0[/color][color=#f5f8ec]1[/color][color=#f1f5ea]0[/color][color=#dee5e4]1[/color][color=#b1c2d5]0[/color][color=#6b8dc7]1[/color][color=#416dba]1[/color][color=#3965b2]0[/color][color=#6c88b8]1[/color][color=#b5c3cd]0[/color][color=#e4e8df]1[/color][color=#f7f8e8]0[/color][color=#fbfdef]1[/color][color=#fcfef4]0[/color][color=#fdfff7]1[/color][color=#fefffa]0[/color][color=#fefefb]0[/color][color=#fefefc]1[/color]
[color=#fefffb]1[/color][color=#fefefb]1[/color][color=#fefefc]0[/color][color=#fefffb]10[/color][color=#fdfefa]1[/color][color=#f9fbf9]0[/color][color=#dce4f1]1[/color][color=#94aada]1[/color][color=#4567b4]0[/color][color=#2c509f]0[/color][color=#4c6bac]0[/color][color=#a0adc3]1[/color][color=#e3e6db]0[/color][color=#f0f2e2]1[/color][color=#f0f3e4]0[/color][color=#ecf0e3]0[/color][color=#dde1dd]0[/color][color=#b1bfd1]0[/color][color=#7893bf]0[/color][color=#416fb7]0[/color][color=#3c66ad]0[/color][color=#6181b8]1[/color][color=#a3b2c8]1[/color][color=#dfe4de]1[/color][color=#f1f3e6]0[/color][color=#fafbf0]0[/color][color=#fcfdf6]1[/color][color=#fdfff8]1[/color][color=#fefffa]0[/color]
[color=#fefffa]10[/color][color=#fefefa]1[/color][color=#fefffa]1[/color][color=#fefff9]11[/color][color=#fdfef8]1[/color][color=#fcfdf4]0[/color][color=#f5f7f3]0[/color][color=#d6dee9]1[/color][color=#809ad5]0[/color][color=#3a5cad]1[/color][color=#264a9f]1[/color][color=#4e6aad]1[/color][color=#a8b3c5]1[/color][color=#e2e4d5]1[/color][color=#ebecda]1[/color][color=#edeee0]0[/color][color=#e9ebde]0[/color][color=#dee1db]1[/color][color=#bfc7cd]1[/color][color=#869ec2]1[/color][color=#5479ba]1[/color][color=#3665b4]1[/color][color=#466aaf]0[/color][color=#7f95b9]1[/color][color=#c5ccd0]1[/color][color=#f2f3e6]0[/color][color=#f9faef]1[/color][color=#fcfef4]0[/color]
[color=#fdfef7]10110[/color][color=#fdfef5]1[/color][color=#fdfdf2]1[/color][color=#fbfdf1]0[/color][color=#fbfcf0]0[/color][color=#f6f8ec]0[/color][color=#eaece8]0[/color][color=#c0cbdc]1[/color][color=#6e88c5]1[/color][color=#3657ab]0[/color][color=#2d4ea1]1[/color][color=#5b73ac]1[/color][color=#b1b9c1]1[/color][color=#dbdccf]0[/color][color=#e5e6d4]0[/color][color=#e6e7d7]0[/color][color=#e4e5da]0[/color][color=#d9ddd5]1[/color][color=#c1caca]0[/color][color=#99a9be]1[/color][color=#6584b9]1[/color][color=#4369b1]0[/color][color=#3f5fa1]0[/color][color=#7586a6]0[/color][color=#dcddd0]1[/color][color=#f4f4e7]1[/color]
[color=#fcfdf1]01[/color][color=#fcfcf0]1[/color][color=#fcfcef]1[/color][color=#fcfcf0]1[/color][color=#fcfcef]0[/color][color=#fbfced]0[/color][color=#f9fbeb]1[/color][color=#f9faea]1[/color][color=#f7f8e7]0[/color][color=#f3f4e6]1[/color][color=#eeeee2]1[/color][color=#dbdfdb]0[/color][color=#a4b1ca]1[/color][color=#5670b4]1[/color][color=#284ca4]1[/color][color=#2e4e9a]0[/color][color=#6d80aa]1[/color][color=#bcc0bb]0[/color][color=#d9dbc9]1[/color][color=#dfe0ce]0[/color][color=#e2e3d2]0[/color][color=#dfe1d2]1[/color][color=#d7dbd0]1[/color][color=#c4cbc9]1[/color][color=#96a2b6]0[/color][color=#3c558e]0[/color][color=#56637f]0[/color][color=#d0d2c2]0[/color][color=#eae9db]0[/color]
[color=#fafbec]1[/color][color=#f9faea]1000[/color][color=#f8f8e8]0[/color][color=#f7f7e6]1[/color][color=#f5f7e5]0[/color][color=#f5f5e3]0[/color][color=#f3f3e1]1[/color][color=#f1f1dd]0[/color][color=#eeeedc]0[/color][color=#ececda]0[/color][color=#e3e4d4]0[/color][color=#ced0c9]0[/color][color=#8e9db9]1[/color][color=#4766ac]0[/color][color=#234799]0[/color][color=#2e4c96]0[/color][color=#727d93]1[/color][color=#c1c2b1]0[/color][color=#d0d2c0]0[/color][color=#c1c6c1]1[/color][color=#9ba3b1]0[/color][color=#677591]0[/color][color=#415179]1[/color][color=#515d75]1[/color][color=#9fa29b]0[/color][color=#dbdacc]0[/color][color=#eceadb]0[/color]
[color=#f6f5e5]10[/color][color=#f5f4e4]1[/color][color=#f5f5e3]01[/color][color=#f3f3e1]0[/color][color=#f3f2de]1[/color][color=#f2f1e0]0[/color][color=#f0efdc]0[/color][color=#efeed9]0[/color][color=#edecd8]0[/color][color=#ebebd6]1[/color][color=#e8e8d2]1[/color][color=#e3e2cd]0[/color][color=#e0dfcb]1[/color][color=#d6d6c6]1[/color][color=#b7bcbf]0[/color][color=#7a8cb0]1[/color][color=#4564a7]0[/color][color=#354d81]1[/color][color=#616b7f]0[/color][color=#57657f]1[/color][color=#445371]1[/color][color=#4f586b]1[/color][color=#6f7478]0[/color][color=#999b93]0[/color][color=#bdbeb0]1[/color][color=#d7d6c6]0[/color][color=#e5e3d3]1[/color][color=#eae9d8]0[/color]
[color=#f1f0dd]0[/color][color=#f1efdc]0[/color][color=#f1f0e0]1[/color][color=#f0efdc]0[/color][color=#f0f0db]1[/color][color=#f0efd9]1[/color][color=#eeedd8]1[/color][color=#ededd7]1[/color][color=#ebebd4]0[/color][color=#eae9d3]0[/color][color=#e8e7d2]1[/color][color=#e6e6cf]0[/color][color=#e4e4cc]1[/color][color=#e2e2ca]1[/color][color=#e0dfca]0[/color][color=#dddcc6]0[/color][color=#d7d8c3]0[/color][color=#cdcfbd]1[/color][color=#adb1ac]1[/color][color=#868f95]1[/color][color=#777e7f]1[/color][color=#82867f]1[/color][color=#9d9e8f]1[/color][color=#b7b6a2]0[/color][color=#c6c6b0]1[/color][color=#d0d0ba]1[/color][color=#d7d6c3]0[/color][color=#dddcc9]0[/color][color=#e2e1ce]1[/color][color=#e5e4d1]0
[/color][/size]
[SIZE=1]a paper clip made by thekon[/SIZE]
-
03-01-2007, 05:05 PM #5898I'm Baaaack!

- Registriert seit
- May 2006
- Ort
- Nowhere
- Beiträge
- 2.186
- Points
- 17.067
- Level
- 83
- Downloads
- 0
- Uploads
- 0
I would think they would be exactly the same. If not, it can't make that much of a difference.
Zitat von dracule

-
03-01-2007, 05:14 PM #5899
I like the "if" statment its fun and understandable
example "if Homo.x == 69.x then
Gay = true
-
03-01-2007, 05:15 PM #5900lol

- Registriert seit
- Aug 2006
- Ort
- Whittier, CA
- Beiträge
- 5.791
- Points
- 20.859
- Level
- 91
- Downloads
- 0
- Uploads
- 0
Dont use Gay on these forums.
Some people find it offensive.
-
03-01-2007, 05:17 PM #5901Your Fate is Grim...

- Registriert seit
- Oct 2005
- Beiträge
- 2.269
- Points
- 11.640
- Level
- 70
- Downloads
- 0
- Uploads
- 0
the second one. and it does make a big difference. suppose you did this:
Zitat von dracule
when you ran the script, the program would first check if x was 5. suppose it was. then the code that is inside executes. BUT, after the code is done, the computer AGAIN checks if x is 6 or 7, when it has already matched 5. thus, it wastes some time. this can make a huge difference in programs.Code:if x == 5 then -- do whatever -- end if x == 6 then -- do whatever -- end if x == 7 then -- do whatever -- end
NOW, suppose you did this:
NOW, the compuet again checks if x is 5. suppose it is again. NOW, the code inside executes. after the code has been completed, the program sees the else if and IGNORES the other two if statements, because it knows that a match was made. thus, it saves some time.Code:if x == 5 then -- do whatever -- elseif x == 6 then -- do whatever -- elseif x == 7 then -- do whatever -- end
--------------------------------------------------------------------------------------
-
03-01-2007, 05:40 PM #5902
how about saying Homosexuals or lezibions that is the proper way to call them. Gay is just a slang term for the meaning homosexualDont use Gay on these forums.
Some people find it offensive.
I don't think they would find it that offensive, unless your affended by it
-
03-01-2007, 06:08 PM #5903QJ Gamer Blue
- Registriert seit
- Jan 2007
- Ort
- U.S.
- Beiträge
- 405
- Points
- 7.014
- Level
- 55
- Downloads
- 0
- Uploads
- 0
Lezibions..hmm interesting. Sounds like a relative of the lion. JK.
-
03-01-2007, 06:16 PM #5904QJ Gamer Gold
- Registriert seit
- Aug 2006
- Beiträge
- 1.633
- Points
- 11.629
- Level
- 70
- Downloads
- 0
- Uploads
- 0
Zitat von Merick
Try something like that. If you need to know why its for i = 3 and imagetable[i-2] its because listdirectory tables also contain two extra items, . and ..Code:imagetable = {} tiledir = System.listDirectory("./ tiles") for i = 3, table.getn(tiledir) do imagetable[i-2] = Image.load("./tiles/"..tiledir[i].name) end
That'll load every image in the directory into the table.
-
03-01-2007, 06:30 PM #5905
Thanks a lot, that fixed it right up! Now I get get to work on the rest of the program.
-
03-01-2007, 06:46 PM #5906
any idea about mine
Geändert von pspaquaforce (03-01-2007 um 06:56 PM Uhr)
-
03-01-2007, 07:46 PM #5907QJ Gamer Blue
- Registriert seit
- Jul 2006
- Ort
- Alabama
- Beiträge
- 142
- Points
- 4.241
- Level
- 41
- Downloads
- 0
- Uploads
- 0
I'll post the code I made for you a couple of days ago. It has notes (mine have !!! before and after), and it improves blitting, too (but it could still be better).
Spoiler for script:
EDIT:
I have a question:
Can someone send me a copy of Wedge Racer? I can't seem to download it, and I need the source as an example.
EDIT Again:
Nevermind. After six attempts on dial-up, I got it.Geändert von Aphonia (03-01-2007 um 09:54 PM Uhr)
-
03-02-2007, 06:38 AM #5908
hmm, I'm having some trouble with tables in tables. In my tile loader, how would I make my "tiles" into a two-part table, one part with the image and the second part with the filename of the image?
*edit*
I think I've got it worked out nowGeändert von Merick (03-02-2007 um 11:42 AM Uhr)
-
03-02-2007, 12:19 PM #5909
thanks aphonia but you still didn't solve my problem. I wanted the animation to stay in one place instead of it moving with me. But thanls for fixing of some my errors
-
03-02-2007, 12:22 PM #5910Banned for LIFE
- Registriert seit
- Oct 2006
- Ort
- East London, England
- Beiträge
- 2
- Points
- 18.744
- Level
- 86
- Downloads
- 0
- Uploads
- 0
Use animlib to make it easier.


LinkBack URL
About LinkBacks
Mit Zitat antworten

Hello everyone I am new here and I am glad to be part of this amazing community and I think there...
New to forum