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 Discussion / Character Move - Diablo Style

Author
Message
Underworld 1020
21
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 22nd Oct 2004 21:18
I was working on some simple scrolling stuff last night. I made one program where you could scroll around by moving the mouse and then I made it better by only scrolling when the mouse touched the edge of the screen. Then I made a function to test if a object was selected with the mouse. My goal was to make something like the Diablo style character move and scroll. I just can't figure out how to make the character move the way I want. I got it so that you can move the character with the mouse, but only by a set speed. I want to be able to click a spot on the screen and have the character move there, the scrolling and object select is already done.

Any ideas?
BealziBob
20
Years of Service
User Offline
Joined: 9th Jul 2004
Location: The Grim North (UK)
Posted: 22nd Oct 2004 23:28
Are you using 2d or 3d?

If you're using 2d, it should be fairly easy. Simply find the difference between the x & y position of your character (centre of screen) and the point clicked (mouse x & y), then scroll your map buy that amount.

Underworld 1020
21
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 23rd Oct 2004 00:50
I want 3d, but now that I think about it, is Diablo 3d or 2d?

I thought it was in 3d, but I'm not sure. Wait its got to be 3d because I think you can rotate the camera or something like that.

So, I need to be able to move the 3d character to a certain coordinate be using the mouse.
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 23rd Oct 2004 06:17
The only way I've been able to do that is like this:

It needs perfecting but it should help. Better still; buy pro.

Realms Of Tutopia: Rise Of Evil
http://www.freewebs.com/elbsoftware/index.htm
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 23rd Oct 2004 06:47


i know, im awsome, i have code with that has collision and everything, scrapped that project until i finish this otherone


<[jimmy]> daaaaaaaaaaaaang that KK is cute
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 23rd Oct 2004 06:51 Edited at: 23rd Oct 2004 06:52
Quote: "I thought it was in 3d,"


technically, i believe diablo2 is 2d, but it can use D3D or Ddraw, you can choose

shoot, i meant to edit that in, sorry


<[jimmy]> daaaaaaaaaaaaang that KK is cute
Turoid
21
Years of Service
User Offline
Joined: 1st Nov 2003
Location: The Netherlands
Posted: 23rd Oct 2004 07:51
diablo 2 is 2d..yes, it use sprites that look 3d.

Do you need a complete FPS,3rdPS engine ?? Or a collision command libary?? well here it is:
http://forum.thegamecreators.com/?m=forum_view&t=38869&b=6&p=0
Eric T
22
Years of Service
User Offline
Joined: 7th Apr 2003
Location: My location is where I am at this time.
Posted: 23rd Oct 2004 07:51
Underworld 1020
21
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 23rd Oct 2004 09:15
Thanks, I'll try to write something similar at home because I can't run the code here. So, I just place a mouse object under the real mouse and have the character move under the mouse object's position when you click the mouse button. Thats simple I'll try it out.

I never thought the Diablo games were in 2d ; Thats a lot of work.
Nic
20
Years of Service
User Offline
Joined: 26th Jun 2004
Location:
Posted: 27th Oct 2004 19:35
diablo is a 2d isometric
Underworld 1020
21
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 28th Oct 2004 07:57
I finally got it to work, I used a car model, but the code still works and its kind of cool because I drew a simple cursor and textured it on to a 3d plain and it looks cool because the cursor changes sizes because of the camera. Plus, the camera is set on an angle, so it looks even better.

Thanks!

Login to post a reply

Server time is: 2025-05-24 13:03:27
Your offset time is: 2025-05-24 13:03:27