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.

Code Snippets / Mouse picking (finally!) [dbc][memblocks]

Author
Message
Arkheii
20
Years of Service
User Offline
Joined: 15th Jun 2003
Location: QC, Philippines
Posted: 5th Apr 2004 18:36
Yay! A working polygon perfect mouse picking snippet, without the 2d distance cheats! Of course, this is unoptimized code because I only had the morning to code this, but it shows a method to do it.

Credits go to Yin Nadie for his collision tutorial at http://www.ilogicgames.com which could amazingly be applied for programs like this.


"Story in a game is like story in a porn movie. It's expected to be there, but it's not that important." - John Carmack
Arkheii
20
Years of Service
User Offline
Joined: 15th Jun 2003
Location: QC, Philippines
Posted: 5th Apr 2004 18:38 Edited at: 15th Apr 2004 15:55
EDIT: The code above kinda got screwed up. Not my fault

http://darkbasic.thegamecreators.com/?m=codebase_view&i=b7b862b225560e467386d9b9922b3ee8


"Story in a game is like story in a porn movie. It's expected to be there, but it's not that important." - John Carmack
Tim Ballisto
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Right behind you.
Posted: 6th Apr 2004 02:27
or get it from the code base (good job by the way.)


Programs for programmers.
DARKGuy
20
Years of Service
User Offline
Joined: 28th Nov 2003
Location:
Posted: 13th Apr 2004 07:12
NICE CODE! I see it a bit complicated for use it now in my RTS (perhaps because all the variables and I screw up) but I'll surely have it stored for when I'll need it, it's a good code indeed good work, it's like the Pick Object of DBP...

:: Pentium 300 Mhz, old 8Mb video card, 64Mb RAM, 5 gb & 1.6 gb HD's, W98 SE, Sound Blaster AWE 32 ::
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 15th Apr 2004 02:22
nice code

it didn't cut your code it put it in the "source" button at the bottom of your post


Formerly known as "DarkWing Duck"
sadsack
20
Years of Service
User Offline
Joined: 27th Nov 2003
Location: here
Posted: 15th Apr 2004 06:34
r_kabouter ,
I could not get it to compile. I get (could not close nest at line 162) that is the last line of the code. seeing I am some what new to this, only thing I know to do was to put a endif statement but it did not work. may be you can let me know what I am doing wrong.
here the code I downloaded
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 15th Apr 2004 12:38
Looks like you got the truncated code Sadsack, check the latest posts for a new download location.


Van-B


The nature of Monkey was irrepressible!.
darkdomy
21
Years of Service
User Offline
Joined: 6th Apr 2003
Location: Italy
Posted: 15th Apr 2004 16:40
HELP!!!

NOT START SAMPLES HELP!!!

ERROR LINE 162 HELP!!!!

DBPRO 5.2

HELP!!!
HELLO TANKS
Snaz
20
Years of Service
User Offline
Joined: 12th Apr 2004
Location: Romania, Galatz
Posted: 19th Apr 2004 20:46
I've got a question for you. I need your code for my rpg game..of course, i've downloaded it but in my db editor, the memblock command doesn't exist. But, when I delete the lines which are using this command, mouse picking doesn't work. Any sugestions??

phonfnd
Arkheii
20
Years of Service
User Offline
Joined: 15th Jun 2003
Location: QC, Philippines
Posted: 21st Apr 2004 08:06
@Phoenixon:

Get DarkMatter and install the patch. Unless you can read model vertex data and their positions on the spot using some complex maths, you have to stick with make memblock from mesh to read the vertex coordinates in real space. It doesn't work because you deleted the commands that make it work, duh. Forget about making an RPG then if you can't figure it out.


"Story in a game is like story in a porn movie. It's expected to be there, but it's not that important." - John Carmack
M00NSHiNE
20
Years of Service
User Offline
Joined: 4th Aug 2003
Location: England, UK
Posted: 21st Apr 2004 22:42
Thats very cool that...very accurate. Any idea how it holds up speed-wise in a proper game environment?

Snaz
20
Years of Service
User Offline
Joined: 12th Apr 2004
Location: Romania, Galatz
Posted: 22nd Apr 2004 20:36
It works..i've just downloaded the upgrade. No darkmatter

phonfnd

Login to post a reply

Server time is: 2024-05-13 20:14:01
Your offset time is: 2024-05-13 20:14:01