Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Hypothetical situation

Author
Message
Rye
23
Years of Service
User Offline
Joined: 30th May 2003
Location: United Kingdom, Blackrod
Posted: 30th Aug 2003 20:52
Suppose some guy, lets say me, wanted to create a similar method of casting spells as is used in Black and White. How would one go about this, and lets also say the game is a FPS.

I would really appreciate any ideas, no matter how comlex they are.

Thanx
UberTuba
23
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 30th Aug 2003 21:03
function castspell(a$,enemynum)

if a$ = "ice" then enemystate(enemynum,1) = 4
if a$ = "fire" then enemystate(enemynum,1) = 4
endfunction

Iknow exactly how much that helps you but you reallly should be more specific

the artist formally known as darkfluff
ReD_eYe
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 30th Aug 2003 21:18
by moving your mouse to activate a spell? haven't got a clue, think of a more original idea!!!


Mentor
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 30th Aug 2003 21:22
he means by motion, like you draw a symbol and the magic event happens, you record the mouse movements in (for example) four variables and then check for say more than five units consecutive right followed by more than five down followed by more than five left, so if you draw a big reverse C shape you set a variable to let the code run the magic function, remember the mouse will not go in a perfect line so you have to ignore small values of y when you check for the x axis lines and ignore small values of x when you are in the y axis, as you get these sequences of motion in big enough quantitys to be more than just slight hand motions or normal operation movements, you can save the results of the large movements into a buffer and then check if they match any "magic" move sequences, personaly I thought the "magic" in B&W was klunky, a row of icons would be better IMO.

Mentor.
Rye
23
Years of Service
User Offline
Joined: 30th May 2003
Location: United Kingdom, Blackrod
Posted: 30th Aug 2003 21:58
Thanx people. Im gonna have a go at a method my mate suggested which is having a 3x3 grid on the screen and each square has a number. If the sequence of numbers matches then the spell will be cast.

And red eye, i would like u to point out a new idea that has been used in darkbasic. Go on, I bet u cant. A lot of games are remakes of classics, or variations on an already existing idea.

I want you to think up of a idea that isn't a variation or a remake, but something brand new that is possible to do in DBP, and its also got to be a good idea.
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 30th Aug 2003 23:18
3x3 doesn't give you much definition ... but my suggestion would be to take the mouse screen coordinates every say loop and then check the points against a b/w bitmap - if the given major points are the same then you cast the spell.

would do it to a 16x16 grid myself, it allows for a good ammount of definition.

Mentor
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 30th Aug 2003 23:44
thats a good idea (mutters...why didn`t I think of that?)

Mentor.
Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 31st Aug 2003 00:00
That be the essense of OCR my friends!

Insiiiiiiiiiiiiiiiiiiiiiiiide!

Login to post a reply

Server time is: 2026-07-25 03:42:45
Your offset time is: 2026-07-25 03:42:45