10-26-2005, 05:27 AM
everyones welcome!!!!^^ then again im not the starter of this thread dont sk me.
-yah
Anyone interested in making a text adventure as a group?
|
10-26-2005, 05:27 AM
everyones welcome!!!!^^ then again im not the starter of this thread dont sk me.
-yah
10-26-2005, 05:34 AM
good luck guys. making a game is a ton of work.
10-26-2005, 06:18 AM
Quote:everyones welcome!!!!^^ then again im not the starter of this thread dont sk me. Doesn't matter to me how many people work on this, as long as it gets done.
Not yet Snake! It's not over yet!
10-26-2005, 06:56 AM
ok! so what can i do! were do we stand?
10-26-2005, 06:07 PM
Yes, speedlemon, for the last time, I KNOW IT'S NOT A CHOOSE YOUR OWN ADVENTURE. I was just planning on writing a main story and we can build from there.
10-26-2005, 11:11 PM
i've been really busy with school, but i managed a few minutes of coding
here's some code (FreeBASIC .14): [syntax="qbasic"]' ' Text Adventure game...thing...Oz style ![]() ' ENUM Boolean True = -1, False = 0 END ENUM TYPE World fname as string lumps as integer END TYPE TYPE Scene offset as integer length as integer END TYPE TYPE Object ' Where are we loading this from? fname as string name as string num_c as integer ' How many associated commands? assoc_c as any ptr ' Associated command function reference assoc_f as function() as any ' This will be determined by assoc_c[#] ' We could add attributes such as weight here if we want to... END TYPE TYPE ObjCommands name as string ' Main name of the command ex: "Kick" aliases as string ptr ' Aliases of the main name, ex: "Take"->"Get", "Steal" assoc_f as function() as any ' The function (from pointers) END TYPE DECLARE FUNCTION Valid_Command(command_ as any ptr) as integer ' Returns index of the command DECLARE FUNCTION Valid_Obj_Command(this as Object, command as any ptr) as integer ' Returns -1 if the command is not accepted, otherwise it returns the command index ' Our actions to objects DECLARE FUNCTION Take(this as Object) as Boolean DECLARE FUNCTION Break(this as Object) as Boolean DECLARE FUNCTION Push(this as Object) as Boolean ' This controls our world DECLARE FUNCTION Move(direction as string) as Boolean ' Here are our initializers DECLARE SUB Init_Commands() ' *** ' Lets make some variables ' *** REDIM SHARED cmdlst(0) as ObjCommands Init_Commands() ' *** ' Our code for the main game goes here ' *** ' These are just some tests and examples dim i as integer i = Valid_Command(cptr(any ptr, @cmdlst(0).assoc_f)) ' @Take ![]() print i sleep end ' *** ' Initializes commands (to make code less messy) ' *** SUB Init_Commands() ' We have 3 commands: ' Take(), Break(), Push() REDIM cmdlst(0 to 2) as ObjCommands cmdlst(0).name = "take" cmdlst(0).aliases = Callocate(2) ' The number of aliases...right now we have 2 (0, 1) cmdlst(0).aliases[0] = "grab" cmdlst(0).aliases[1] = "steal" cmdlst(0).assoc_f = @Take cmdlst(1).name = "break" cmdlst(1).aliases = Callocate(2) ' The number of aliases...right now we have 2 (0, 1) cmdlst(1).aliases[0] = "smash" cmdlst(1).aliases[1] = "destroy" cmdlst(1).assoc_f = @Break cmdlst(2).name = "push" cmdlst(2).aliases = Callocate(0) ' The number of aliases...right now, we have 0 (i couldn't think of any) cmdlst(2).assoc_f = @Push END SUB FUNCTION Valid_Command(command_ as any ptr) as integer dim cmdi as integer ' command index for cmdi = lbound(cmdlst) to ubound(cmdlst) if(command_ = @cmdlst(cmdi).assoc_f) then return 1 end if next return 0 END FUNCTION FUNCTION Take(this as Object) as Boolean return False END FUNCTION FUNCTION Break(this as Object) as Boolean return False END FUNCTION FUNCTION Push(this as Object) as Boolean return False END FUNCTION[/syntax] Oz~ :: Edit :: I should explain the World and Scene types If you've ever looked at quake code, you'd see how they save and load levels....through "lumps" basically, a lump is a chunk of data....it has a starting point, and it has a length here's a good example: Code: mynick$ = "Ozwald Smooth" It's jsut a quicker way of organizing multiple forms of data in one file Here's how it would work in a file format (each line is a pseudo line in the file): Quote:num_lumps% So, in one file, we could have multiple rooms, with multiple mini-lumps inside, if we wanted i hope that helps explain how it could work if there are any other thoughts, please contribute...you can completely trash that base code if you have another idea... if you don't feel like coding it, i probably can if i have a better idea of what I'm doing Oz~
10-27-2005, 01:05 AM
Because I'm new to FB, I am clueless to what you just did.(Been using QB too long)
Not yet Snake! It's not over yet!
10-27-2005, 04:40 AM
The only thing non QB that he did is use pointers. With CAllocate, he allocated memory on the free store. Then, using pointer arithmetic, gave them a value. It's difficult to understand at first. You should read rdc's Introduction to Pointers. Here is the link: http://www.freebasic.net/wiki/wikka.php?...utPointers
quote="Deleter"]judging gameplay, you can adaquately compare quake 4 with pong[/quote]
10-27-2005, 04:53 AM
gottabej2krei: chill out ok? ill stop asking you. but i thought there would at least be a couple big quests in the game and theres a couple different stories that are possible that you have to play the game a couple times to get to see.
oz: that lump idea sounds cool. |
« Next Oldest | Next Newest »
|