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.

Newcomers DBPro Corner / diablo style menu system

Author
Message
matt rochon
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Canada
Posted: 17th Mar 2003 00:37
ok so i dunno if anyone cares but i need some ideas on how to implement the menu system like in diablo 2
(not the equipped items just the storage boxes)

at first i was gonna create a 2d array of sprites(?) as boxes and then every time i clicked on a box with whatever needed to be dropped there, i was gonna run a check through the whole array to see which was the closest box.... i dunno if thats gonna work though...it will probably slow down every time i click on something...

i had a better idea but couldnt figure out how to implement it
i wasthinking of the same idea with the arrays except instead of running a check, have it determine how many boxes over and down the item was when i click (or the nearest one) then i could manipulate it using the numbers correspondint to those specific boxes insterad of running a lengthy check on a 2d array. The only problem with that is how to tell if thos spaces are already filled up...

i dunno i need some better ideas i think... any one got any?
matt rochon
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Canada
Posted: 17th Mar 2003 04:27
so i tried just making the 36 sprites it needs but i run out of memory wickid fast when im just hiding/showing them...
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 17th Mar 2003 04:34
ill let you work out the rest but this example will help u make some assessment of moving multiple sprites.



matt rochon
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Canada
Posted: 17th Mar 2003 04:58
k thx man
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 17th Mar 2003 05:11
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 17th Mar 2003 05:12
naturally to save time u might want to explore functions so u can reuse the same bit of code that might crop up in multiple uses in an example like thi.

matt rochon
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Canada
Posted: 17th Mar 2003 14:04
yes
im actuallly having a problem with everything slowing down when i put the menu up because its a 12x4 grid of small squares

but your code works for the dropping of objects on it

Login to post a reply

Server time is: 2024-11-24 06:13:54
Your offset time is: 2024-11-24 06:13:54