QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

Help!!!!!!!!!!!

This is a discussion on Help!!!!!!!!!!! within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; okay, so im making a new game for the psp right? i post a screen shot of it later, and ...

Reply
 
LinkBack Thread Tools
Old 12-03-2005, 12:17 PM   #1

Asleep...
 
Join Date: Oct 2005
Posts: 1,382
Trader Feedback: 0
Question Help!!!!!!!!!!!

okay, so im making a new game for the psp right? i post a screen shot of it later, and want ot know how to combine stuff.for example, i already got the menu pic, but wanna know how to make it so i load the menu, and when you push start it goes to level one. please help. also, when you get to the end of level one, like you collect the last thing, how do you like make it go to the next level and reapet the process? tnx for the help in advanced, ill post some screens of it later, its still in its beta mode i always wanted to say that
__________________
Hedzx is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-03-2005, 12:19 PM   #2

Asleep...
 
Join Date: Oct 2005
Posts: 1,382
Trader Feedback: 0
Default

oh and every thime i put a background music, it gets a total error and my psp turns off. ineed help wit that too
__________________
Hedzx is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-03-2005, 12:26 PM   #3

Mindless Self Indulgence
 
Realn0whereman's Avatar
 
Join Date: Oct 2005
Location: afk
Posts: 7,212
Trader Feedback: 0
Default

are you using lua?
__________________
PSN:realn0whereman
NEW MSI ALBUM APRIL 29TH: IF
*orgasm*
Realn0whereman is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-03-2005, 12:37 PM   #4

Asleep...
 
Join Date: Oct 2005
Posts: 1,382
Trader Feedback: 0
Default

yeah im using lua..... and congratulations, youve benn answered by my 100TH POST!!!!!!!!!YEAH!!!!!!!! !!!!!!!!!!!!!!!!!! okay yeah im usin lua
__________________
Hedzx is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-03-2005, 01:14 PM   #5
 
Join Date: Sep 2005
Posts: 18
Trader Feedback: 0
Default

come over to the psplua.com IRC we can help you out, server: irc.skinned.net , channel: #psplua . or use the web irc: http://psplua.com/modules/ircmod/
officiallypoor is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-03-2005, 03:20 PM   #6

Asleep...
 
Join Date: Oct 2005
Posts: 1,382
Trader Feedback: 0
Default

cant find help
my code:
Quote:
CODE:
tiles = Image.load("data/tiles.png")
figure = Image.load("data/figure.png")
menu = Image.load("data/menu.png")
white = Color.new(255, 255, 255)
-- Menu
onmenu = 1
-- Menu Control
menuy = 100
-- Menu Time
menutime = 0

-- Current Level
level = 1

-- Level Score
levelscore = 0
-- Score
score = 0
function level1()
-- the map
mapSource = {
"mmmmmmmmmmmmmmmmmmmmmmmm mmmmmm",
"meaaaaaaaaaaaaaaaaaaaafa aaaafm",
"mdnnnnbnnnnnnnnnnnnonndn nnpnbm",
"mdnonnbnnnnnbnnnnnnnnndn nnnnbm",
"mdnnnnnnnbnnbnnccccccchc cccnnm",
"mecccccccgnnnnnnnnnnnndn bnnnbm",
"mdnnnnnnnnnnnnnnnnnnnndn bnnnbm",
"mdnnnnnnnnnnnnnnnnbnnndc cnnnbm",
"mdnnecccccccccccnnbnnndn nnnnbm",
"mdnnbnnnnnbnnnnbnnbnnndn nnnnbm",
"mdnnbnnonnbnnonbnnbnnndn nnnnbm",
"mdnnbnnnnnbnnnnbnnbnnndn nnccbm",
"mdnnbnnccccnnnnbnnbnnndn nnnnbm",
"mdnnbnnnnnnnnnnnnnbnnnnn nnnnbm",
"mdnnbnnnnnnnnnnnnnbnnnnn nnnnbm",
"mhccgcccccccccccccgccccc ccccgm",
"mmmmmmmmmmmmmmmmmmmmmmmm mmmmmm"
}
-- offsreen image, where the map will be drawn
board = Image.createEmpty(480, 272)

-- draw one tile on the map
function drawTile(tile, x, y)
tile = string.byte(tile, 1) - string.byte("a")
local tileX = math.mod(tile, 4)
local tileY = math.floor(tile / 4)
board:blit(16 * x, 16 * y, tiles, 17 * tileX + 1, 17 * tileY + 1, 16, 16, false)
end

-- copy the map source to an array for easier access and draw the offscreen board
map = {}
for y = 1, 17 do
line = mapSource[y]
map[y] = {}
for x = 1, 30 do
tile = string.sub(line, x, x)
map[y][x] = tile
drawTile(tile, x - 1, y - 1)
end
end

-- current player position
playerX = 3
playerY = 14

-- current player animation image
animation = 0

-- 1 = animation images increases, -1: decreases
animationDirection = 1

-- animation slowdown counter
animationSlowDown = 0

-- controls the movement speed. At speedStep == 0, the last
-- pad will be evaluated, other steps the pad movements are only
-- saved
speedStep = 0

-- last pad direction
dx = 0
dy = 0

-- current score
score = 0

-- text color
white = Color.new(255, 255, 255)

while true do
-- read current pad
pad = Controls.read()

if pad:start() then
-- exit to lowser, if started from there
break
end
if speedStep == 0 then
-- save old player position
oldPlayerX = playerX
oldPlayerY = playerY

-- add last movement
playerX = playerX + dx
playerY = playerY + dy

-- check new tile
newTile = map[playerY][playerX]

-- if the position is not allowed, restore old player position
if newTile ~= "n" and newTile ~= "p" and newTile ~= "o" then
playerX = oldPlayerX
playerY = oldPlayerY
end

-- if it is a tile which can be eaten, eat it
if newTile == "p" then score = score + 5 end
if newTile == "o" then score = score + 1 end
if newTile == "p" or newTile == "o" then
-- set background tile
map[playerY][playerX] = "n"

-- draw background tile
drawTile("n", playerX - 1, playerY - 1)
end

-- reset last movement
dx = 0
dy = 0
else
-- check pad movement
if pad:up() then
dy = -1
elseif pad:down() then
dy = 1
elseif pad:left() then
dx = -1
elseif pad:right() then
dx = 1
end
end

-- update speed step counter
speedStep = speedStep + 1
if speedStep == 5 then
speedStep = -1
end

-- blit board
screen:blit(0, 0, board, 0, 0, board:width(), board:height(), false)

-- blit current player animation image
screen:blit((playerX - 1) * 16 - 4, (playerY - 1) * 16 - 4, figure, 1 + 25 * animation, 1, 24, 24)

-- calculate next animation image
animationSlowDown = animationSlowDown + 1
if animationSlowDown == 3 then
animationSlowDown = 0
animation = animation + animationDirection
if animation == 4 then
animationDirection = -1
elseif animation == 0 then
animationDirection = 1
end
end

-- print score
screenrint(10, 260, "BY HEDZX, SCORE:" .. score, white)
-- wait for vertical sync and show new screen
screen.waitVblankStart()
screen:flip()
end
while true do

-- Clear Screen
screen:clear()

-- Show Background
showbackground()

-- Menu
if onmenu == 1 then
screen:blit(165,80, menu)
mainmenuscreen()
screenrint(198, 100, "Start", white)

pad2 = Controls.read()

if pad2:up() then
if menutime == 0 then
if menuy > 100 then
menuy = menuy - 10
end
menutime = 1
end
end

if pad2:down() then
if menutime == 0 then
if menuy < 120 then
menuy = menuy + 10
end
menutime = 1
end
end

if pad2:cross() then
if menuy == 100 then
onmenu = 0
screen:clear()
showbackground()
level1()
screen:flip()
screen.waitVblankStart(18 0) -- Wait 3 seconds
screen:clear()
end
if menuy == 110 then
onmenu = 3
screen.waitVblankStart(15 )
end
if menuy == 120 then
onmenu = 2
screen.waitVblankStart(15 )
end
end

-- Timer for Menu Selecting
if menutime >= 1 then
menutime = menutime + 1
end
if menutime == 5 then
menutime = 0
end
screenrint(180, menuy, "->", white)
end
end
-- Read Controls pressed and change cursor location
pad = Controls.read()
taken from console shooter...... and get this error:
Quote:
error:untl.lua:240: 'endexpected (to close 'function' at line 19) near '<eof>'
Error: No script file found.
Press start to restart
__________________
Hedzx is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 04:48 AM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us