anyone interrested in LL - Printable Version +- Qbasicnews.com (http://qbasicnews.com/newforum) +-- Forum: Qbasic "like" compilers/interpreters (http://qbasicnews.com/newforum/forum-5.html) +--- Forum: FB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-15.html) +---- Forum: FB Projects (http://qbasicnews.com/newforum/forum-16.html) +---- Thread: anyone interrested in LL (/thread-8998.html) |
anyone interrested in LL - NecrosIhsan - 03-12-2006 cha0s: handling both is relatively easy. Here's how I handled it in Phantasm: -The game is configured for one of three methods: keyboard, analog gamepad, or POV gamepad. This configuration is set with an external config app. -The program itself has a special function designed to abstract input. This function handles input for whichever device is configured to be used (gamepad or keyboard) and returns a standard control code. It's hard for me to explain at almost 1 in the morning, but basically this function returns a value based on the state of your configured keys or your gamepad, and does so in a standard way...say you have it configured for keyboard and the Up key was pressed...it would return a CTRL_UP constant value...but having the gamepad configured, pressing Up on the analog stick or the POV (depending on which config is used) would also return a CTRL_UP, so the whole process would be abstracted by the function. -Your other functions simply call this abstraction function and operate based on its result. Since no other function has to care which input method you're using, your code works the same no matter what it's being controlled with. This was a bit tricky to pull off but when it was finished, it was an extremely cool thing to have working. Sorry if I'm not explaining it very clear but as I said, it's almost 1 in the morning. I could test it here, I have a POV gamepad, so no sweat. EDIT: Here's the abstraction function I used for Phantasm. It's not the best function (it needs recoding) but I think it gets the point across: Code: Function GetInput(Byval BlockingType As Byte = 0) As Byte anyone interrested in LL - anarky - 03-13-2006 Yes, it works here now. Although it's not fullscreen? I've found a bug. Although it's not a big deal, but if I was to yank out the tree before reaching the bushes, I cannot rip the bushes, hence leaving me stuck. Suggestions, other than going to the bushes each time first? anyone interrested in LL - Anonymous - 03-13-2006 @nek that's basically what i'm doing now, everything is at a very high level of abstraction. i have recoded overnight a configuration proggy, and hopefully fixed the bug that was plaguing me. @anarky: full screen can be gotten by hitting the icon in the upper right of the window (next to the x) or by hitting "alt-enter" http://prdownloads.sourceforge.net/lynn/ll_win32b.zip?download http://prdownloads.sourceforge.net/lynn/ll_win32b.rar?download http://prdownloads.sourceforge.net/lynn/ll_win32_nosoundb.zip?download http://prdownloads.sourceforge.net/lynn/ll_win32_nosoundb.rar?download heres a piece of the control setup in the beginning of ll, to show how easy it would be to plug in more values. this uses a function i also coded last night, which allows you to access the data in an xml through a certain notation, that is "tag->tag2->tag3" to get the value out of tag3, which would be in tag2, which would be in tag1 ;p pretty simple with recursion. anyways: Code: llg( atk_key ) = init_bin_obj( Val( xml_TagValue( last_controls, "key_map->attack" ) ), @atk_key_in_sub , @atk_key_out_sub ) the function pointers( thats what the opinters are ) point to functions that get called when the key is pressed. its a nice little system i came up with. i call them binary objects, for lack of a better term. anyone interrested in LL - anarky - 03-13-2006 Funny, it wasn't active before... anyone interrested in LL - TheDarkJay - 03-15-2006 wow...I just finished the demo...and wow.... That was amazing... I WANT MORE!!! anyone interrested in LL - Anonymous - 03-15-2006 thanks, you'll get more, don't worry... ;p *does magic spells to create more game* anyone interrested in LL - SSC - 03-16-2006 Well it didnt crash in the first area with my home computer and all was going fine but when I was in the area 1 down and one left from the first area I attacked an enemy and the game froze =( anyone interrested in LL - Josiah Tobin - 03-16-2006 Quote:Well it didnt crash in the first area with my home computer and all was going fine but when I was in the area 1 down and one left from the first area I attacked an enemy and the game froze =(Again, the goblins wearing hardhats are not enemies... XD But nah. I think cha0s knows about that one. anyone interrested in LL - Anonymous - 03-16-2006 the latest version doesnt even have the enemies there with the yellow hats. please get the latest version.. anyone interrested in LL - Jocke The Beast - 03-17-2006 Loved the first demo and I still love LL 8) Well done guys! I'll continue to play all of your demos until LL has reached version 1.0 The only thing that irritates me is that the game ends if you press esc...it's frustrating if you press esc by misstake and doesn't get a chance to undo...perhaps use the key Q or have a little box pup up with "are you sure you wanna quit?"...just a suggestion... |