Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Start of a D&D type game....
Index -> Programming, Turing -> Turing Submissions
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
MiX-MaztA-M8riX




PostPosted: Sat Oct 23, 2004 11:58 am   Post subject: Start of a D&D type game....

I hope this is original lol

heres the starting of it...



D&D.T
 Description:
first attempt to make a game

Download
 Filename:  D&D.T
 Filesize:  1.74 KB
 Downloaded:  264 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Delos




PostPosted: 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




PostPosted: 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




PostPosted: Sat Oct 23, 2004 5:32 pm   Post subject: (No subject)

Procedures Functions Processes by tony
Modules by Delos

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




PostPosted: Sat Oct 23, 2004 5:36 pm   Post subject: (No subject)

wow, it pops out 2 different ways Neutral

but yea, thx
MiX-MaztA-M8riX




PostPosted: 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 Razz


Dungeons & Dragons.t
 Description:

Download
 Filename:  Dungeons & Dragons.t
 Filesize:  2 KB
 Downloaded:  211 Time(s)

Paul




PostPosted: 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




PostPosted: Sun Oct 24, 2004 12:51 am   Post subject: here is something a little better

hey here is something a little bitt better

hope you like it



Dungeons & Dragons.t
 Description:

Download
 Filename:  Dungeons & Dragons.t
 Filesize:  2.17 KB
 Downloaded:  169 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
How U Doin




PostPosted: Tue Oct 26, 2004 8:57 am   Post subject: (No subject)

Much better, but still it looks a little old school Razz

Not that I could do any better....
MiX-MaztA-M8riX




PostPosted: Tue Oct 26, 2004 10:59 am   Post subject: (No subject)

sorry about that... I just forgot ok? I got tired lol
I know what your talking about, I did an example of the Input.KeyDown in class one day....

look...

code:

setscreen ("position:center;center")
var a : int := 1
var b : int := 50
var keys : array char of boolean


loop

Draw.FillOval (a,b,12,12,255)
Input.KeyDown (keys)

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




PostPosted: 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




PostPosted: 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.


Dungeons & Dragons.t
 Description:

Download
 Filename:  Dungeons & Dragons.t
 Filesize:  3.38 KB
 Downloaded:  146 Time(s)

gigaman




PostPosted: Wed Oct 27, 2004 2:37 pm   Post subject: (No subject)

Love this program. it has a battle phase and everything. tell me what you think. Very Happy


Dungeons & Dragons.t
 Description:

Download
 Filename:  Dungeons & Dragons.t
 Filesize:  4.58 KB
 Downloaded:  223 Time(s)

gigaman




PostPosted: Wed Oct 27, 2004 6:55 pm   Post subject: (No subject)

As far as i can tell there are no glaring errors
Imm0rtal




PostPosted: Thu Oct 28, 2004 6:23 pm   Post subject: (No subject)

Starting to look good.. Keep it up Razz
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 28 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: