Posted: Sat Oct 23, 2004 3:21 pm Post subject: (No subject)
[sigh]
Buggy source...did you even test this before posting?
I hope you know where you're going with this, because as it stands it's not all that much.
I would make a few suggestions:
- start procedurizing your programme now. Don't wait. A game (or any other programme for that matter) that claims to have the scope that yours does cannot be written linearly and be effective.
- either look into Error Trapping your programme (try to press Ctrl + Z at any of your input prompts), or switch to a different form of input.
On that note, you have not used Input.KeyDown() all that well...you have to understand that it is an instantaneous function, returning the status of the keyboard at an instant. So, for it to actually be able to return any useful values, you need it in a loop.
- setscreen ("nobuttonbar")
Now go! Refine and rethink! You have features (bugs) to update (fix)!
MiX-MaztA-M8riX
Posted: Sat Oct 23, 2004 3:37 pm Post subject: (No subject)
sory about that, I debugged it after I posted... and about those procedures.... I've never actually created them personally.. so I have no clue what the syntax are or anything... but i'll try to look it up.. I've seen in other games that only the procedures are looped at the end... hmm would that be something like this/
code:
loop
roll_phase
move_phase
atk_phase
end loop
or something like that. Except all those would be broken down into previously declared procedures... am I right?
**EDIT**
culd you please give me an example of a simple 'procedure' maybe you have an old program lying around or sumthin
Delos
Posted: Sat Oct 23, 2004 5:32 pm Post subject: (No subject)
Read those, they'll explain everything. But because I have a minute, I'll post this as well:
code:
procedure makeABox (x1, y1, x2, y2 : int)
% Declare the start to the procedure.
% The parameters are the variables/numbers to be entered when the procedure is called.
drawbox (x1, y1, x2, y2, 7)
drawbox (x1 + 20, y1 + 20, x2 + 20, y2 + 20, 7)
drawline (x1, y1, x1 + 20, y1 + 20, 7)
drawline (x2, y2, x2 + 20, y2 + 20, 7)
drawline (x1, y2, x1 + 20, y2 + 20, 7)
drawline (x2, y1, x2 + 20, y1 + 20, 7)
%Draw some stuff. Note that none of the variables are currently knonw, they'll be specified when the procedure is called.
end makeABox
% Now, at some point:
makeABox (100, 100, 150, 150)
Cool eh?
MiX-MaztA-M8riX
Posted: Sat Oct 23, 2004 5:36 pm Post subject: (No subject)
wow, it pops out 2 different ways
but yea, thx
MiX-MaztA-M8riX
Posted: Sat Oct 23, 2004 6:55 pm Post subject: (No subject)
ok, I've gone through, and re wrote it for the most part, but I cant get the movement right.. can you plz help me out?? you guys seem to have all the answers
Posted: Sat Oct 23, 2004 8:30 pm Post subject: (No subject)
um... you seem to have ur if structure messed up, I mean its like
if left then
move left
if right then
move right
if down then
move down
if up then
move up
end if end if end if end if
this means, if you don't move "left" then you can't move right or up or down, and even if YOU DO move left, you get into the whole up down right structure, but there's no possible way "left" or "LEFT" can be "right" or "RIGHT"
you get what I mean?
the way you need to set this up is
if left then
move left
elsif right then
move right
elsif down then
move down
elsif up then
move up
end if
bah, someone else can give you a better explanation, this is straight out of my train of thought.
Unreal_Origin
Posted: Sun Oct 24, 2004 12:51 am Post subject: here is something a little better
if keys (KEY_RIGHT_ARROW)
then a += 1
delay (10)
cls
elsif keys (KEY_LEFT_ARROW)
then a -= 1
delay (10)
cls
elsif keys (KEY_UP_ARROW)
then b += 1
delay (10)
cls
elsif keys (KEY_DOWN_ARROW)
then b -= 1
delay (10)
cls
elsif keys (KEY_CTRL)
then for x : b .. 500
Draw.Oval (x,200,2,2,79)
delay (10)
cls
end for
end if
end loop
gigaman
Posted: Wed Oct 27, 2004 12:09 pm Post subject: (No subject)
I can't play around with the code now but when i get a chance i'll do some stuff. um one thing is that you need to set boundries for the player because you can just leave the board and the screen
gigaman
Posted: Wed Oct 27, 2004 12:43 pm Post subject: (No subject)
i did a couple of the changes now. i might work more on it during compsci class. you can't leave the game board now and you can choose other races. the new variables are for attack, defense and lockpicking points for when enemies and chests are added. you can choose other races which have different points.