Lua Scripts/Examples/Snippets
This is a discussion on Lua Scripts/Examples/Snippets within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Yes, especially in Lua (because it is a dynamically typed language) you can do this: Code: color = Color.new; pad ...
-
12-07-2007, 04:51 PM #121QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Yes, especially in Lua (because it is a dynamically typed language) you can do this:
Code:color = Color.new; pad = Controls.read; -- use red = color( 255, 0, 0 ); curentPadState = pad();
[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
12-23-2007, 06:08 PM #122Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
this will let you check for a file
so to make a file check functionCode:assert()
by using assert there is no need to actually open the file or close it so it should be much quickerCode:function file_check(file_path) file = assert(io.open(file_path)) if file == nil then screen:print(10, 10, "the file path was invalid") else screen:print(10, 10, "the file path was valid") end end
you can also return custom error messages using this command and create an error handler for your programs
- i dont have an example error handler but this is sort of how assert is used
this code means that if the condition is met then it will carry out the assert command so say if file == nil then you would useCode:if condition then assert(test, "message") end
if there is no message then the command can be used to check values and will return either false or nil so if the error or condition is false it wont be executed, but if it is nill it will assert the command givenCode:if file == nil then assert(file == nil, "this file is invalid") end
- an example of this is the code used at the top of my post
that is the part of the code that is seen as the test
in the top post no message was passedCode:io.open(file_path)
the error messages come out the same was as if an error is returned in lua player with a black screen and a white error message
thanks------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
01-17-2008, 02:46 PM #123Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
oh here is a handy little charge bar function i made all you need to do is put this
above while true do
and then to use it it only takes two arguments and x co-ordinate and a y co-ordinate like thisCode:function charge_bar_horizontal(xpos, ypos) green = Color.new(0, 255, 0) black = Color.new(0, 0, 0) white = Color.new(255, 255, 255) Charge = {} Charge.percentage = System.powerGetBatteryLifePercent() screen:fillRect(xpos, ypos, 138, 12, white) screen:fillRect(xpos + 1, ypos + 1, Charge.percentage, 10, green) screen:drawLine(xpos + 1, ypos + 1, xpos + 1, ypos + 10, black) screen:drawLine(xpos + 11, ypos + 1, xpos + 11, ypos + 10, black) screen:drawLine(xpos + 21, ypos + 1, xpos + 21, ypos + 10, black) screen:drawLine(xpos + 31, ypos + 1, xpos + 31, ypos + 10, black) screen:drawLine(xpos + 41, ypos + 1, xpos + 41, ypos + 10, black) screen:drawLine(xpos + 51, ypos + 1, xpos + 51, ypos + 10, black) screen:drawLine(xpos + 61, ypos + 1, xpos + 61, ypos + 10, black) screen:drawLine(xpos + 71, ypos + 1, xpos + 71, ypos + 10, black) screen:drawLine(xpos + 81, ypos + 1, xpos + 81, ypos + 10, black) screen:drawLine(xpos + 91, ypos + 1, xpos + 91, ypos + 10, black) screen:drawLine(xpos + 101, ypos + 1, xpos + 101, ypos + 10, black) screen:fillRect(xpos + 104, ypos + 1, 33, 10, black) screen:print(xpos + 106, ypos + 2, Charge.percentage .. "%", white) end
if you wanted to blit it to an empty image that has been created then you could use thisCode:charge_bar_horizontal(10, 10)
then to use thatCode:function charge_bar_horizontal(display, xpos, ypos) green = Color.new(0, 255, 0) black = Color.new(0, 0, 0) white = Color.new(255, 255, 255) Charge = {} Charge.percentage = System.powerGetBatteryLifePercent() display:fillRect(xpos, ypos, 138, 12, white) display:fillRect(xpos + 1, ypos + 1, Charge.percentage, 10, green) display:drawLine(xpos + 1, ypos + 1, xpos + 1, ypos + 10, black) display:drawLine(xpos + 11, ypos + 1, xpos + 11, ypos + 10, black) display:drawLine(xpos + 21, ypos + 1, xpos + 21, ypos + 10, black) display:drawLine(xpos + 31, ypos + 1, xpos + 31, ypos + 10, black) display:drawLine(xpos + 41, ypos + 1, xpos + 41, ypos + 10, black) display:drawLine(xpos + 51, ypos + 1, xpos + 51, ypos + 10, black) display:drawLine(xpos + 61, ypos + 1, xpos + 61, ypos + 10, black) display:drawLine(xpos + 71, ypos + 1, xpos + 71, ypos + 10, black) display:drawLine(xpos + 81, ypos + 1, xpos + 81, ypos + 10, black) display:drawLine(xpos + 91, ypos + 1, xpos + 91, ypos + 10, black) display:drawLine(xpos + 101, ypos + 1, xpos + 101, ypos + 10, black) display:fillRect(xpos + 104, ypos + 1, 33, 10, black) display:print(xpos + 106, ypos + 2, Charge.percentage .. "%", white) end
EDIT:Code:blank_image = Image.createEmpty(200, 200) blank_image:clear() screen:blit(10, 10, blank_image) charge_bar_horizontal(blank_image, 10, 10)
here is what it looks like

thanksGeändert von FaT3oYCG (01-19-2008 um 02:07 PM Uhr)
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
01-17-2008, 03:55 PM #124QJ Gamer Green
- Registriert seit
- Jan 2008
- Beiträge
- 612
- Points
- 3.721
- Level
- 38
- Downloads
- 0
- Uploads
- 0
simpler less cpu-using charge function that only redraws the battery bar when the battery life goes down enough to change the size of the bar:
Code:cb = {w = 100, h = 10,c = Color.new(255,0,0)} cb.i = Image.createEmpty(cb.w,cb.h) cb.lbpc = (cb.w+2)*(100/cb.w) function updateCB() cb.bp = System.getBatteryLifePercent() if math.abs(cb.lbpc-cb.bp)*100 >= cb.w then cb.lbpc = cb.bp cb.i:clear() cb.i:fillRect(0,0,cb.w*cb.bp/100,cb.h,cb.c) end endGeändert von TurtlesPwn (01-17-2008 um 04:06 PM Uhr)
-
01-25-2008, 02:30 PM #125Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
here is the code for a menu that is as simple as i can get it at the moment
-- to add more items variables need to be changed and to accept input more code must be added but if you run this code you will see what it does and why it is simple
and here is a very advanced menu code that uses functions for the variable values to save time for the coderCode:white = Color.new(255,255,255) red = Color.new(255,0,0) option = { "spot - 1 -", "spot - - 2 - -", "spot - - - 3 - - -" } current = 1 oldpad = Controls.read() while true do pad = Controls.read() screen:clear() for i = 1, 3 do screen:print(10, 10 * i, option[i], white) screen:print(10, 10 * current, option[current], red) end if pad:up() and oldpad:up() ~= pad:up() and current > 1 then current = current - 1 end if pad:down() and oldpad:down() ~= pad:down() and current < 3 then current = current + 1 end screen.flip() screen.waitVblankStart() oldpad = pad end
use that if you want it straight in your code and a layout like this if you want it in a separate file - you need to use pad and oldpad or change the menu.lua file corresponding to what you have used instead of pad and oldpadCode:white = Color.new(255,255,255) red = Color.new(255,0,0) option = { "spot - 1 -", "spot - - 2 - -", "spot - - - 3 - - -" } current = 1 function menu_setup(table_name, start_index, end_index) for i = start_index, end_index do screen:print(10, 10 * i, table_name[i], white) screen:print(10, 10 * current, table_name[current], red) end end function menu_controls(min_index, max_index) if pad:up() and oldpad:up() ~= pad:up() and current > min_index then current = current - 1 end if pad:down() and oldpad:down() ~= pad:down() and current < max_index then current = current + 1 end end oldpad = Controls.read() while true do pad = Controls.read() screen:clear() menu_setup(option, 1, 3) menu_controls(1, 3) screen.flip() screen.waitVblankStart() oldpad = pad end
menu.lua
index.luaCode:function menu_setup(table_name, start_index, end_index) for i = start_index, end_index do screen:print(10, 10 * i, table_name[i], white) screen:print(10, 10 * current, table_name[current], red) end end function menu_controls(min_index, max_index) if pad:up() and oldpad:up() ~= pad:up() and current > min_index then current = current - 1 end if pad:down() and oldpad:down() ~= pad:down() and current < max_index then current = current + 1 end end
ok here is the code in a file that will just run it will display the amount of items chosen by the user maximum and move the menu up one every time down is pressed and up one every time up is pressed if you wanted the menu to come from the bottom of the screen then you would just reverse the the y codeCode:white = Color.new(255,255,255) red = Color.new(255,0,0) option = { "spot - 1 -", "spot - - 2 - -", "spot - - - 3 - - -" } current = 1 oldpad = Controls.read() while true do pad = Controls.read() screen:clear() menu_setup(option, 1, 3) menu_controls(1, 3) screen.flip() screen.waitVblankStart() oldpad = pad end
this could easily be modified to be a file browser by putting the_end = table.getn(System.listDir ectory()) and then changing this lineCode:white = Color.new(255,255,255) red = Color.new(255,0,0) option = { "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29", "s30", "s31", "s32", "s33", "s34", "s35" } current = 1 function menu_setup(table_name, max_index) for i = current, max_index do screen:print(10,10 + 10 * i - current * 10, table_name[i], white) screen:print(10,10 + 10 * current - current * 10, table_name[current], red) end end function menu_controls(min_index, max_index) if pad:up() and oldpad:up() ~= pad:up() and current > min_index then current = current - 1 end if pad:down() and oldpad:down() ~= pad:down() and current < max_index then current = current + 1 end end oldpad = Controls.read() while true do pad = Controls.read() screen:clear() screen:print(10, 0, current, red) menu_setup(option, 30) menu_controls(1, 30) screen.flip() screen.waitVblankStart() oldpad = pad end
toCode:menu_setup(option, 30)
and setting the rest up as a file browser so that the other controls e.g. cross go to the next directory you would do this by putting current.nameCode:menu_setup(table.getn(System.listDirectory()), the_end)
like this
thanksCode:if pad:cross() and oldpad:cross() ~= pad:cross() then System.currentDirectory(option[current]) current = 1 the_end = table.getn(System.listDirectory()) end
[email protected]
p.s. i will post a more advanced menu than this soon when i modify it to automatically change the menu's position depending on the current menu item
p.p.s. turtlespwn wouldn't your code constantly check if the new value is smaller or bigger than the old one therefore using the same amount of cpu maybe even more than mine, if not could you please explain whyGeändert von FaT3oYCG (01-26-2008 um 01:44 AM Uhr)
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
01-25-2008, 04:35 PM #126QJ Gamer Green
- Registriert seit
- Jan 2008
- Beiträge
- 612
- Points
- 3.721
- Level
- 38
- Downloads
- 0
- Uploads
- 0
each loop to draw the bar, yours does this:
-declare three colors
-create a table, put System.getBatteryLifePerc ent() into it
-3 screen:fillRect()s
-11 screen:drawLine()s
-a screen print
-lots of math among all of that
each loop, mine does this:
-1 screen:blit()
-update the battery percentage value
-check if the battery charge percentage has changed enough to affect the size of the bar
------if so redraw the battery bar
And, all but the first part of mine needn't even be done every loop. If you want, you could run them every 3600 loops - once per minute (about the time it takes to charge 1% during the fast charge stage (pre-80% charge))
Trust me, if you want, I'll make a speed comparison test and the results will show that mine is SIGNIFICANTLY faster than yours.
Also, if you want a true SUPER SIMPLE menu, make each option able to be given a function to execute when X is pressed with it chosen, and turn the entire thing into about 15 lines. Yes, it is possible.
edit: also, your filebrowser modification guide will not work. System.listDirectory returns in a much different way than you seem to be using it. You set current to a number and then use current.name as a string when current is a table index. You also attempt to use System.currentDirectory without checking that the selected item is actually a directory.
-
01-25-2008, 05:39 PM #127Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
- i wasn't having a go at you i just wanted to know why yours was faster
Zitat von TurtlesPwn
- where did i use System.listDirectory() ?
- current is the number, current is the numbers name in the table - the table is the memory stick directory - sorry my bad i have fixed it now i was wrong
- i dont need to check if it is a directory - i have made a file browser but i didn't check if it was a dir or not and it worked fine i think that it is if it is a file it has an extension so doesn't open it if it doesn't have an extension then it opens it as a new directory
- i didn't complete the code to make it a file browser it was just a suggestion
- also i could have made a simpler charge bar but i was going for aesthetics not speed - which doesn't really matter in lua player any way
EDIT:
a while ago now i took a look at sg57's lua state snippet but since then i have improved it and added some more functions in that are very useful here it is
Code:white = Color.new(255, 255, 255) black = Color.new(0, 0, 0) red = Color.new(255, 0, 0) green = Color.new(0, 255, 0) blue = Color.new(0, 0, 255) orange = Color.new(235, 115, 0) yellow = Color.new(255, 255, 0) state = { loading = 1, menu = 2, game = 3 } current_state = state.loading function Set_State(state_to_change_to) current_state = state_to_change_to end function Get_State() return current_state end function Start_States() if Get_State() == state.loading then -- do loading stuff screen:print(10, 10, "loading state", white) if pad:cross() and oldpad:cross() ~= pad:cross() then Set_State(state.menu) end elseif Get_State() == state.menu then -- do menu stuff screen:print(10, 10, "menu state", white) if pad:cross() and oldpad:cross() ~= pad:cross() then Set_State(state.game) end elseif Get_State() == state.game then -- do game stuff screen:print(10, 10, "game state", white) if pad:cross() and oldpad:cross() ~= pad:cross() then Set_State(state.loading) end end end oldpad = Controls.read() while true do pad = Controls.read() screen:clear() -- main Start_States() -- main if Controls.read():start() then break end screen.flip() screen.waitVblankStart() oldpad = pad endGeändert von FaT3oYCG (01-25-2008 um 05:49 PM Uhr)
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
01-25-2008, 07:39 PM #128QJ Gamer Green
- Registriert seit
- Jan 2008
- Beiträge
- 612
- Points
- 3.721
- Level
- 38
- Downloads
- 0
- Uploads
- 0
"- where did i use System.listDirectory() ?"
When you set values based on table.getn(System.current Directory()), you should have been using it. currentDirectory returns a string of the current working directory that you're navigated to, not a table of the files in the current directory.
"- i dont need to check if it is a directory - i have made a file browser but i didn't check if it was a dir or not and it worked fine i think that it is if it is a file it has an extension so doesn't open it if it doesn't have an extension then it opens it as a new directory"
I don't think you've run it before - half your code for this one is broken. If you tried to cd to a file, I'm fairly certain it would get an error because it cannot find the folder. Lua isn't smart enough to check if something has an extension, and folder names can be named as if they have an extension anyways just as files can be named as if they don't.
"- i didn't complete the code to make it a file browser it was just a suggestion"
I know, but if you're going to walk people through how to do it, at least make sure your code will work - it is IMPOSSIBLE to make a filebrowser without System.listDirectory and you have it NOWHERE in your code.
"- also i could have made a simpler charge bar but i was going for aesthetics not speed - which doesn't really matter in lua player any way"
Speed doesn't matter in lua? Speed (or, code efficiency) is the most important thing in lua - lua being a fourth level language and using the slow graphics.h libraries and other restraints slowing it down, you MUST code as efficiently as possible, and you cannot let background things like a battery bar be slowing down your program. Besides, I could make my chargebar have the same aesthetics as yours while still being just as efficient as my current one.
-
01-26-2008, 01:43 AM #129Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
ok ill change it to System.listDirectory() - i just looked at my code again i must have read it wrong
- i dont know why the direcory thing works but i get no error
here is the dir code - which is much the same as tacticalpenguins as i used his code to understand how file browsers work
- and here is the file codeCode:if pad:cross() and oldpad:cross() ~= pad:cross() then System.currentDirectory(listitem[current].name) current = 1 listitem = System.listDirectory() number = table.getn(listitem) end
and that works fine no errorsCode:if pad:cross() and listitem[current].directory == false then if string.sub(listitem[current].name, -4) == ".lua" then screen:clear() dofile(listitem[current].name) end end
- i did not know that lua player was that inefficient but i will think about the way i code now thanks
- i dont like starting arguments and i wasn't trying too but on the Internet the way you word a reply decides the mood or tone that the reader thinks it was in when i reply to messages it tends too look like i am having a go at people but im not trying to sorry
thanks
[email protected]
p.s. woooooooooo this was my 777'th post lol
here is a simple script that will help you to understand how draw line works it also helps for when you are trying to see from perspective
screenie:

Code:white = Color.new(255, 255, 255) x = 20 y = 20 x1 = 10 y1 = 10 gap = 20 block = Image.createEmpty(gap * 2, gap * 2) block:clear(white) oldpad = Controls.read() while true do pad = Controls.read() screen:clear() -- insert your main code here screen:print(10, 10, x .. " " .. y, white) screen:blit(x - gap, y - gap, block) screen:drawLine(0, 0, x - gap, y - gap, white) screen:drawLine(480, 0, x + gap, y - gap, white) screen:drawLine(0, 272, x - gap, y + gap, white) screen:drawLine(480, 272, x + gap, y + gap, white) if pad:left() then x = x - 5 end if pad:right() then x = x + 5 end if pad:up() then y = y - 5 end if pad:down() then y = y + 5 end if pad:square() then x1 = x1 - 5 end if pad:circle() then x1 = x1 + 5 end if pad:triangle() then y1 = y1 - 5 end if pad:cross() then y1 = y1 + 5 end if pad:l() then screen:save("C:\\sc.png") end -- insert your main code here if Controls.read():start() then break end oldpad = pad screen.flip() screen.waitVblankStart() endGeändert von FaT3oYCG (01-26-2008 um 06:23 AM Uhr)
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
01-26-2008, 11:14 AM #130QJ Gamer Green
- Registriert seit
- Jan 2008
- Beiträge
- 612
- Points
- 3.721
- Level
- 38
- Downloads
- 0
- Uploads
- 0
It's really bad when you can't even make stolen code work. If you're going to try to only take bits and pieces (of which there are like, 3 in a filebrowser) then at least learn to make it still work when you're done butchering it. What you've done is just as bad as stealing the whole thing and passing it off as your own. How could you have read it wrong while saying it works fine? Your code that you repeatedly insist works fine will not work.
Zitat von FaT3oYCG
Luaplayer itself isn't inefficient, it's people who code like you do and use up all the cpu power in the world for the smallest little things that make it appear that way. You just have to make your code actually do as little as possible to do what you want. You obviously have never made a decent project that needs all the CPU it can get - a battery bar like yours would kill everything.
Zitat von FaT3oYCG
Also, your drawLine example could be cleaned up and simplified a lot:
Code:white = Color.new(255, 255, 255) x = 0 y = 0 bs = 10 b = Image.createEmpty(bs,bs) while true do pad = Controls.read() screen:clear(white) screen:blit(x,y,b) screen:drawLine(0,0,x,y) screen:drawLine(479,0,x+bs,y) screen:drawLine(0,271,x,y+bs) screen:drawLine(479,271,x+bs,y+bs) ax = pad:analogX() ay = pad:analogY() if math.abs(ax) > 24 then x = x + ax/32 end if math.abs(ay) > 24 then y = y + ay/32 end if pad:start() then break end screen.flip() screen.waitVblankStart() end
-
01-26-2008, 04:42 PM #131lol

- Registriert seit
- Aug 2006
- Ort
- Whittier, CA
- Beiträge
- 5.791
- Points
- 20.859
- Level
- 91
- Downloads
- 0
- Uploads
- 0
TurtlesPwn sure does Pwn alot.
-
02-28-2008, 03:10 PM #132Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
file operations
i hadnt really looked into file operations much before but after looking at how Nielkie used binary file io i have come up with some custom commands that you might find useful
- i will post them on the snippets thread too so they can bee looked at and found easily
ok there are two files or sections that you need
if you use separate files, which i like to do to keep the main file clean, but i usually just have a functions.lua file or something alike, then this would be your file operations.lua or whatever you want to call it
that basically just holds all of the commands for the file io that i have madeCode:function file_io_reset(operand) if operand == nil then end if operand == 1 then source_file = "" elseif operand == 2 then output_file = "" elseif operand == 3 then source_file = "" output_file = "" elseif operand == 4 then file_io_data_store = "" end end function file_io(source_io_file, output_io_file, mode) if mode == nil then end if mode == "cut" then source_file = io.open(source_io_file, "rb") file_io_data_store = source_file:read("*a") source_file:close() System.removeFile(source_io_file) file_io_reset(1) elseif mode == "paste" then output_file = io.open(output_io_file, "wb") output_file:write(file_io_data_store) output_file:close() file_io_reset(4) file_io_reset(2) elseif mode == "copy" then source_file = io.open(source_io_file, "rb") file_io_data_store = source_file:read("*a") source_file:close() output_file = io.open(output_io_file, "wb") output_file:write(file_io_data_store) output_file:close() file_io_reset(4) file_io_reset(3) end end
- if you just keep it in your main file then put it above while true do
ok now this would be your main file if you referenced to the file io commands file
that is a quick example that works with any type of file i just used an image named a.png to test itCode:white = Color.new(255, 255, 255) dofile("./file_operations.lua") oldpad = Controls.read() while true do pad = Controls.read() screen:clear() -- insert your main code here if pad:cross() and not oldpad:cross() then file_io("./a.png", nil, "cut") end if pad:circle() and not oldpad:circle() then file_io(nil, "./b.png", "paste") end if pad:square() and not oldpad:square() then file_io("./b.png", "./a.png", "copy") file_io("./b.png", nil, "cut") end -- insert your main code here if Controls.read():start() then break end oldpad = pad screen.flip() screen.waitVblankStart() end
i have only made copy, cut, and paste commands but that is all you need as moving a file would just be cut and paste at the same time, if you want to delete a file, just cut it, if you then cut another file that files data will take its place
it can only obviously cut and paste certain sized files as there is limited memory in lua player
- these functions could be optimized if you feel like it you could optimize them yourself and post it or just keep it to yourself, i just thought i would post these here for reference------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
02-28-2008, 03:32 PM #133
Creates a little counter and says if the number is above or below 1000.Code:white = Color.new(255,255,255) counter = Timer.new() counter:start() while true do screen:clear() currentTime = counter:time() screen:print(10,10,"Counter Time: " .. currentTime,white) if currentTime < 1000 then screen:print(100,100,"Less than 1000",white) end if currentTime > 1000 and currentTime < 2000 then screen:print(100,100,"Greater than 1000",white) end if currentTime > 2000 then counter:reset(0) counter:start() end screen.waitVblankStart() screen.flip() end
-
02-28-2008, 09:59 PM #134words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
Here's a visualizer I found on my PSP I wrote a long time ago. It can create the Window's screensaver Lines among many other neat visualizations.
It's very readable, efficient and easily configurable. Mess with the constants for some pretty neat effects :o
Thought someone may find it useful.Code:-- General Constants Screen = { leftBound = 0, topBound = 0, rightBound = 480, bottomBound = 272 } BACKGROUND_COLOR = Color.new(0,0,0) -- black bg -- Line specific constants NUM_LINES = 5 NUM_LINES_PER_LINE = 5 COLORS = {} -- manage respectively to match NUM_LINES COLORS[1] = Color.new(255,255,255) COLORS[2] = Color.new(255,0,0) COLORS[3] = Color.new(0,255,0) COLORS[4] = Color.new(0,0,255) COLORS[5] = Color.new(0,255,255) SPEEDS = {} -- manage respectively to match NUM_LINES SPEEDS[1] = 2 SPEEDS[2] = 4 SPEEDS[3] = 6 SPEEDS[4] = 3 SPEEDS[5] = 5 -- General declarations and initiation(s) bPaused = false -- Line specific declarations and initiation(s) Line = {} for i = 1, NUM_LINES do Line[i] = { x = {}, y = {}, xspeed = {}, yspeed = {}, color = COLORS[i] } for j = 1, NUM_LINES_PER_LINE do Line[i].x[j] = math.random(Screen.leftBound,Screen.rightBound) Line[i].y[j] = math.random(Screen.topBound,Screen.bottomBound) Line[i].xspeed[j] = SPEEDS[i] Line[i].yspeed[j] = SPEEDS[i] end end -- All input-specific code should go in here function Input() bPaused = Controls.read():cross() -- hold X to freeze the visualizer end -- All thinking-specific code should go in here function UpdateLine(i) for j = 1, NUM_LINES_PER_LINE do if (Line[i].x[j] >= Screen.rightBound) then Line[i].xspeed[j] = -SPEEDS[i] elseif (Line[i].x[j] <= Screen.leftBound) then Line[i].xspeed[j] = SPEEDS[i] end if (Line[i].y[j] >= Screen.bottomBound) then Line[i].yspeed[j] = -SPEEDS[i] elseif (Line[i].y[j] <= Screen.topBound) then Line[i].yspeed[j] = SPEEDS[i] end if not bPaused then Line[i].x[j] = Line[i].x[j] + Line[i].xspeed[j] Line[i].y[j] = Line[i].y[j] + Line[i].yspeed[j] end end end -- All drawing-specific code should go in here (only exception is clearing the screen each loop) function DrawLine(i) for j = 1, NUM_LINES_PER_LINE do if j == NUM_LINES_PER_LINE then screen:drawLine (Line[i].x[j], Line[i].y[j], Line[i].x[1], Line[i].y[1], Line[i].color) else screen:drawLine (Line[i].x[j], Line[i].y[j], Line[i].x[j+1], Line[i].y[j+1], Line[i].color) end end end while true do screen:clear(BACKGROUND_COLOR) Input() -- input for i = 1, NUM_LINES do UpdateLine(i) -- think DrawLine(i) -- draw end screen.waitVblankStart() screen.flip() end
...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
02-29-2008, 05:37 PM #135words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
Oh, here's another thing i found embedded in a maze of folders in my COMMON folder :)
It doesn't really have a name (?) but it's basically particles affected by gravity with varying speeds (darker the color, slower it goes). Makes some pretty neat visualizations when the particles form a line and it waves around and wiggles.
(if your a fan of bleach - think of it like Byakuya's senbonsakura (spelling) where you can control where they go (looks like it))
The last date modified says August 2006 and, IMO, isn't structured and designed as well as it could be. It gets the job done however and is relatively easy to configure and have fun with ;) If you can see a use for it (visualizer in an mp3 player, make it a weapon (be neat :P), etc.) go for it.
One really sweet visual is to gather up speed by holding the X button. Let it loose and watch as this really cool 3dimensional figure slowly forms and rotates and slowly gets smaller and disappears :)Code:width = 480 height = 272 maxCells=500 cells = {} for i = 1, maxCells do cells[i] = {nr = 0, x = 0.0, y = 0.0, diago = 551.7100687, xpos = 0, ypos = 0, lastXpos = 0, lastYpos = 0, speed = 0.0, xmov = 0.0, ymov = 0.0, cr = 0, cg = 0, cb = 0} end started=false mouseX = 240 mouseY = 272 function initCell(x,y,i) cells[i].nr=i cells[i].x=x cells[i].y=y cells[i].xpos=x cells[i].ypos=y cells[i].lastXpos=cells[i].xpos cells[i].lastYpos=cells[i].ypos while (cells[i].xmov==0 and cells[i].ymov==0) do cells[i].xmov=math.random(-1.0,1.0) cells[i].ymov=math.random(-1.0,1.0) end cells[i].speed=0.6+(i/(maxCells+0.0))*0.8 cells[i].cr=255 cells[i].cg=255*(cells[i].speed-0.6)/0.8 cells[i].cb=128+127*(cells[i].speed-0.6)/0.8 end function initialize() xs = 0.0 ys = 0.0 rx = 0.0 ry = 0.0 for i=1, maxCells do rx=width/4+math.random(-width/8,width/8) ry=height/4+math.random(-height/8,height/8) xs=width/2+rx*math.cos(6.28318*i/maxCells) -- 6.28318 is 2pi ys=height/2+ry*math.sin(6.28318*i/maxCells) initCell(xs,ys,i) end end function setup() initialize() started=true end function dist(x,y,x2,y2) return math.sqrt( math.pow((x2 - x), 2) + math.pow((y2 - y), 2) ) end function update(i) d = dist(cells[i].x,cells[i].y,mouseX,mouseY) attrac=0.0010*(cells[i].diago-d)/cells[i].diago turn=false for i=1, 5 do iran=1+math.random(0,maxCells-1) md=math.random(1,4) if (dist(cells[iran].x,cells[iran].y,cells[i].x,cells[i].y)<md) then turn=true i=5 end end if (turn) then cells[i].xmov=cells[i].xmov+math.random(-0.8,0.8) cells[i].ymov=cells[i].ymov+math.random(-0.8,0.8) end if (cells[i].x>width or cells[i].x<1) then cells[i].xmov=cells[i].xmov*-1 end if (cells[i].y>height or cells[i].y<1) then cells[i].ymov=cells[i].ymov*-1 end cells[i].xmov=cells[i].xmov+(mouseX-cells[i].x)*attrac cells[i].ymov=cells[i].ymov+(mouseY-cells[i].y)*attrac cells[i].xmov=cells[i].xmov+math.random(-0.02,0.02) cells[i].ymov=cells[i].ymov+math.random(-0.02,0.02) for j=1, 5 do if (cells[i].nr>j) then cells[i].xmov=cells[i].xmov+0.001*cells[cells[i].nr-j].xmov cells[i].ymov=cells[i].ymov+0.001*cells[cells[i].nr-j].ymov end end cells[i].xmov=cells[i].xmov*0.992 cells[i].ymov=cells[i].ymov*0.992 cells[i].x=cells[i].x+cells[i].xmov*cells[i].speed cells[i].y=cells[i].y+cells[i].ymov*cells[i].speed cells[i].xpos=cells[i].x cells[i].ypos=cells[i].y screen:drawLine(cells[i].xpos,cells[i].ypos,cells[i].lastXpos,cells[i].lastYpos, Color.new(cells[i].cr,cells[i].cg,cells[i].cb)) cells[i].lastXpos=cells[i].xpos cells[i].lastYpos=cells[i].ypos end function draw() screen:clear(Color.new(0,0,0)) if (started) then for i=1, maxCells do update(i) end end screen:drawLine(mouseX,mouseY,mouseX+5,mouseY+5,Color.new(0,255,0)) screen:drawLine(mouseX,mouseY+5,mouseX+5,mouseY,Color.new(0,255,0)) end function input() if Controls.read():cross() then setup() end if Controls.read():left() then mouseX = mouseX - 2 end if Controls.read():right() then mouseX = mouseX + 2 end if Controls.read():up() then mouseY = mouseY - 2 end if Controls.read():down() then mouseY = mouseY + 2 end if mouseY >= height then mouseY = height end if mouseY <= 0 then mouseY = 0 end if mouseX <= 0 then mouseX = 0 end if mouseX >= width then mouseX = width end end setup() while true do input() draw() screen.waitVblankStart() screen.flip() endGeändert von SG57 (02-29-2008 um 09:13 PM Uhr)

...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
03-05-2008, 05:20 PM #136QJ Gamer Blue
- Registriert seit
- Jan 2007
- Ort
- U.S.
- Beiträge
- 405
- Points
- 7.014
- Level
- 55
- Downloads
- 0
- Uploads
- 0
This reduces a fraction to it's simplest form. If the denominator is 1, it returns the numerator (i.e., if the fraction is 2/1, it returns 2), and if the denominator is 0 it returns undefined. It is based off of Euclid's algorithm, and thanks go to LMelior over at evilmana.com for pointing me to the following page, which describes the algorithm.
http://en.wikipedia.org/wiki/Euclidean_algorithm
Code:function simplify(num,denom) num2 = num denom2 = denom while (denom ~= 0) do t = denom denom = math.fmod(num,denom) num = t end gcf = num if (denom2/gcf) ~= 1 and (denom2/gcf ~= 0) then simplified = (num2/gcf .. "/" .. denom2/gcf) elseif (denom2/gcf) == 1 then simplified = (num2/gcf) elseif (denom2/gcf) == 0 then simplified = "undefined" end end
-
03-07-2008, 10:56 AM #137Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
hi another snippet here, i decided to make a scrolling marquee function for lua player, i messed around trying to make a function that would work well in many different ways but found that the best way was to print the string onto images and scroll the images from one side to the other, the function has options for the string to be used, the y position, the background colour, the text colour and the speed at which the string will cycle from one side of the screen to the other
the direction of the marquee is determined by the speed if it is positive then the marquee will scroll from left to right if it is negative it will scroll from right to left, before circulating again
- i found that a nice quick speed where the text is still readable is 1.2 and -1.2, and a good slow scrolling speed is 0.5 and -0.5, but that is just my opinion
- i wouldn't choose speeds such as 20 as the letters and words will become unreadable
- this code may be unefficient but it works perfectly with a small amount of calculations
ok here is the code - this code will run if put into an lua file and played with either windows or psp lua player versions, without any modification
thanksCode:white = Color.new(255, 255, 255) black = Color.new(0, 0, 0) xpos = 0 function scrolling_marquee(marquee_string, y_position, background_colour, text_colour, speed) xpos = xpos + speed string_len = (string.len(marquee_string) * 8) images_needed = math.ceil(string_len / 64) for i = 1, images_needed do text_image = { } text_image[i] = Image.createEmpty(512, 10) text_image[i]:clear(background_colour) marquee_string_part = string.sub(marquee_string, (64 * i) - 64, 64 * i) text_image[i]:print(0, 1, marquee_string_part, text_colour) screen:blit(xpos + (512 * i) - 512, y_position, text_image[i]) end if speed > 0 then if xpos > 480 then xpos = 0 - (string_len) end elseif speed < 0 then if xpos < (0 - string_len) then xpos = 480 end end end oldpad = Controls.read() while true do pad = Controls.read() screen:clear() -- insert your main code here scrolling_marquee("test string for marquee and it is a really long string so it will go off the end of the screen but i am going to test it with lots of images as it will be quick and also it will create the right amount of images for the strings length which is an added bonus so the string can be as long as you want it to be", black, white, 1.2) -- insert your main code here if Controls.read():start() then break end oldpad = pad screen.flip() screen.waitVblankStart() end
[email protected]
p.s. thanks to eldiablov for suggesting to use imagesGeändert von FaT3oYCG (03-08-2008 um 05:50 AM Uhr)
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
03-09-2008, 04:29 AM #138Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
resize image function
this function resizes an image to the maximum size that you set, if you want the image to be smaller than 100 width or height and you dont know which is bigger on the image it wont matter it works it out for you
how it woks
you input the image you want to use and the maximum size
it then works out weather the height or width is larger
it then takes an aspect ratio based on that
it then makes the larger size width or height the maximum size you requested
it then makes the other width or height relevant to that based on the aspect ratio
usage
the codeCode:my_resized_image = resize_image(Image.load("picture.png", 200) screen:blit(10, 10, my_resized_image)
EDIT:Code:white = Color.new(255, 255, 255) function resize_image(the_image, max_size) image_height = the_image:height() image_width = the_image:width() if image_height ~= max_size or image_width ~= max_size then if image_width > image_height then resize_type = width image_aspect = (image_width / image_height) elseif image_width < image_height then resize_type = height image_aspect = (image_height / image_width) elseif image_width == image_height then resize_type = width image_aspect = (image_width / image_height) end if resize_type == width then new_image_width = max_size new_image_height = max_size / image_aspect elseif resize_type == height then new_image_height = max_size new_image_width = max_size / image_aspect end scaled_image = Image.createEmpty(new_image_width, new_image_height) for x = 1, new_image_width do for y = 1, new_image_height do scaled_image:blit(x,y , the_image, math.floor(x*(the_image:width()/new_image_width)), math.floor(y*(the_image:height()/new_image_height)),1,1) end end return scaled_image else return the_image end end oldpad = Controls.read() while true do pad = Controls.read() screen:clear() -- insert your main code here an_image = resize_image(Image.load("picture.png"), 100) screen:print(10, 10, an_image:width(), white) screen:print(10, 20, an_image:height(), white) screen:blit(10, 40, an_image) -- insert your main code here if Controls.read():start() then break end oldpad = pad screen.flip() screen.waitVblankStart() end
i just changed this line
to thisCode:if image_height > max_size or image_width > max_size then
so it can make images smaller or largerCode:if image_height ~= max_size or image_width ~= max_size then
Geändert von FaT3oYCG (04-06-2008 um 07:04 AM Uhr)
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
04-11-2008, 02:52 PM #139Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
ok im here again with another sample, before anyone says no i didn't copy any of it and no i did not use any examples the only thing i had to look up was the table.remove function that i have used from the lua users wiki, other than that i spent quite a while creating the priority system, it is useful for more things than this but adding it to this is one of the main features
ok so i know now your asking what the hell has he made, well i have made ...
a windowing system, it mixes a nice looking interface with speed and control
ok so here is the code
yeah there is a lot, i added lots of functions so you can play around with them if you like, if you know what one of my main current projects is then you will understand the reason why i made thisCode:white = Color.new(255, 255, 255) black = Color.new(0, 0, 0) red = Color.new(255, 0, 0) green = Color.new(0, 255, 0) blue = Color.new(0, 0, 255) orange = Color.new(235, 115, 0) yellow = Color.new(255, 255, 0) ubuntu_brown = Color.new(220, 170, 130) windows = { } duplicate_window_number = 0 function create_window(window_x, window_y, window_width, window_height, window_title) for i = 1, table.getn(windows) do if windows[i].title == window_title then duplicate_window_number = duplicate_window_number + 1 window_title = window_title .. " (" .. duplicate_window_number .. ")" end end window_number = table.getn(windows) + 1 windows[window_number] = { x = window_x, y = window_y, width = window_width, height = window_height, title = window_title, old_width = window_width, old_height = window_height, old_x = window_x, old_y = window_y, priority = table.getn(windows) + 1, state = 1 } -- create window images window_outline = Image.createEmpty(windows[window_number].width, windows[window_number].height) window_background = Image.createEmpty(windows[window_number].width - 2, windows[window_number].height - 2) window_bar = Image.createEmpty(windows[window_number].width - 4, 10) window_main = Image.createEmpty(windows[window_number].width - 4, windows[window_number].height - 15) -- create window images -- colour window images window_outline:clear(black) window_background:clear(ubuntu_brown) window_bar:clear(white) window_main:clear(white) -- colour window images -- display window title window_bar:print(1, 1, windows[window_number].title, black) -- display window title -- blit window images to the main image window_background:blit(1, 1, window_bar) window_background:blit(1, 12, window_main) window_outline:blit(1, 1, window_background) -- blit window images to the main image -- create the window image in that windows table windows[window_number].image = window_outline -- create the window image in that windows table end function refresh_window(window_number) -- create window images window_outline = Image.createEmpty(windows[window_number].width, windows[window_number].height) window_background = Image.createEmpty(windows[window_number].width - 2, windows[window_number].height - 2) window_bar = Image.createEmpty(windows[window_number].width - 4, 10) window_main = Image.createEmpty(windows[window_number].width - 4, windows[window_number].height - 15) -- create window images -- colour window images window_outline:clear(black) window_background:clear(ubuntu_brown) window_bar:clear(white) window_main:clear(white) -- colour window images -- display window title window_bar:print(1, 1, windows[window_number].title, black) -- display window title -- blit window images to the main image window_background:blit(1, 1, window_bar) window_background:blit(1, 12, window_main) window_outline:blit(1, 1, window_background) -- blit window images to the main image -- create the window image in that windows table windows[window_number].image = window_outline -- create the window image in that windows table end function display_windows() for i = 1, table.getn(windows) do if windows[i].state ~= 0 then screen:blit(windows[i].x, windows[i].y, windows[i].image) end end end function minimize_all_windows() for i = 1, table.getn(windows) do windows[i].state = 0 end end function minimize_window(number) windows[number].state = 0 end function maximize_window(number) if windows[number].state ~= 2 then windows[number].old_x = windows[number].x windows[number].old_y = windows[number].y windows[number].old_width = windows[number].width windows[number].old_height = windows[number].height windows[number].state = 2 windows[number].x = 0 windows[number].y = 20 windows[number].width = 480 windows[number].height = 232 refresh_window(number) end end function restore_window(number) if windows[number].state ~= 1 then windows[number].state = 1 windows[number].x = windows[number].old_x windows[number].y = windows[number].old_y windows[number].width = windows[number].old_width windows[number].height = windows[number].old_height refresh_window(number) end end function change_priority(window) temp = { } for i = 1, table.getn(windows) do temp[i] = windows[i] end windows[1] = windows[window] for i = 2, table.getn(windows) + 1 do windows[i] = { } windows[i] = temp[i - 1] end table.remove(windows, window + 1) end oldpad = Controls.read() while true do pad = Controls.read() screen:clear(white) -- insert your main code here if pad:cross() and not oldpad:cross() then create_window(10, 10, 300, 200, "title") end display_windows() if pad:up() then windows[table.getn(windows)].y = windows[table.getn(windows)].y - 3 elseif pad:down() then windows[table.getn(windows)].y = windows[table.getn(windows)].y + 3 elseif pad:left() then windows[table.getn(windows)].x = windows[table.getn(windows)].x - 3 elseif pad:right() then windows[table.getn(windows)].x = windows[table.getn(windows)].x + 3 end if pad:triangle() and not oldpad:triangle() then change_priority(table.getn(windows)) end -- insert your main code here if Controls.read():start() then break end oldpad = pad screen.flip() screen.waitVblankStart() end
now this took quite a while to make and i had to do a lot of recoding to get things to work so i would greatly appreciate that you credit me if you use this
-- functions
create_window() creates a window, the arguments are x position, y position, width, hight, and the title for that window
refresh_window() clears the window of all data inside the main box, the argument is the window to refresh
display_windows() does what it says and displays all of the windows if their state is right
minimize_all_windows() sets all of the windows states to 0 so that they are all minimized in effect
minimize_window() minimizes the window selected, the argument is the number of the window to minimize
maximize_window() makes the window full screen, the argument is the window to maximize
restore_window() makes the window return to the size it was before minimized or maximized
-- putting data in a window
to put data in a window use this method
- i will make a function to do this so it is easier to useCode:window[number].image:print(3, 18, "data")
thanks
[email protected]
- p.s. works on lua player windows
- p.s.s adding explanations of the functions and how to put data in a window
- p.s.s.s i reserve the right to change or add to this code at any timeGeändert von FaT3oYCG (04-11-2008 um 03:36 PM Uhr)
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
04-12-2008, 10:34 PM #140
someone needs to update the first post so that it is easier to find the scripts, i had to look through about 8 pages to find the script that i couldnt think of the name or what it did, but i knew it would help me
My Projects
[URL="http://www.megaupload.com/?d=Q860B1VV"]BUMPER HARVEST MOD - PEGGLE DELUXE BETA 1[/URL]
working on Zuno, an uno like game
[QUOTE=FreePlay]It's a picture of a monkey. There, I spoiled it for you.[/QUOTE]
-
04-13-2008, 02:20 AM #141QJ Gamer Green
- Registriert seit
- Jan 2008
- Beiträge
- 612
- Points
- 3.721
- Level
- 38
- Downloads
- 0
- Uploads
- 0
set pagination to 50
ctrl+f
-
04-13-2008, 03:26 AM #142words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
ifiwere1337 - Everyone knows to set the posts p/page to 40 (i believe that's the max) then use any find-feature in your browser...

...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
04-13-2008, 04:17 AM #143Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
yeah if you do that then you get about 4 pages for this thread in total - to make sure i get the max i chose custom and put 99 but it doesn't actually show 99 ppp
Zitat von SG57
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
04-13-2008, 09:34 AM #144
the thing is that i forgot what it was called or what it did, but i knew i could use it, so i couldnt search for it, where is the ppp setting?
Zitat von SG57
My Projects
[URL="http://www.megaupload.com/?d=Q860B1VV"]BUMPER HARVEST MOD - PEGGLE DELUXE BETA 1[/URL]
working on Zuno, an uno like game
[QUOTE=FreePlay]It's a picture of a monkey. There, I spoiled it for you.[/QUOTE]
-
04-13-2008, 10:09 AM #145Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
in user cp under options i think
EDIT:
here
user cp
- edit options
-- thread display options
--- Number of Posts to Show Per Page------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
04-13-2008, 02:35 PM #146
thanks nowi got it
Zitat von FaT3oYCG
My Projects
[URL="http://www.megaupload.com/?d=Q860B1VV"]BUMPER HARVEST MOD - PEGGLE DELUXE BETA 1[/URL]
working on Zuno, an uno like game
[QUOTE=FreePlay]It's a picture of a monkey. There, I spoiled it for you.[/QUOTE]
-
05-07-2008, 02:45 PM #147QJ Gamer Blue
- Registriert seit
- Apr 2008
- Beiträge
- 497
- Points
- 4.268
- Level
- 41
- Downloads
- 0
- Uploads
- 0
no one posts here any more it's been almost a month since anyone added anything to the thread
-
05-07-2008, 02:46 PM #148QJ Gamer Green
- Registriert seit
- Jan 2008
- Beiträge
- 612
- Points
- 3.721
- Level
- 38
- Downloads
- 0
- Uploads
- 0
so? people are tired of handing out their code that they WORKED to create to noobs who copy and paste it and complain when it doesn't work.
-
05-07-2008, 03:42 PM #149QJ Gamer Blue
- Registriert seit
- Apr 2008
- Beiträge
- 497
- Points
- 4.268
- Level
- 41
- Downloads
- 0
- Uploads
- 0
Hey!! I wasn't saying people had to just hand out there code, don't get so defensive, I was just noticeing, how this thread isn't being used, and so there should be a thread here that isused, instead. I wasn't saying that I want to take anyones, code or anything. I don't steal code like that and call it my own!!
-
05-07-2008, 04:44 PM #150QJ Gamer Bronze
- Registriert seit
- Mar 2007
- Beiträge
- 758
- Points
- 8.665
- Level
- 62
- Downloads
- 0
- Uploads
- 0
There's already 8 pages (20 post per page) of post, and the first post is absolutely massive, don't you think that's enough to learn from?


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