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 / start of very basic rts

Author
Message
Neofish
21
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 15th Apr 2004 00:02
what do u think of this for just camera movement and basic matrix?

PS. could someone test this in BDPro so i know if i dunt have to change it when i upgrade?

thanks

Peter H
21
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 15th Apr 2004 00:14
yes it works in DBPro...but for camera movement i would make the camera move when the mouse get's to the edge of the screen (not really sure how to do this though )


Formerly known as "DarkWing Duck"
Emperor Baal
21
Years of Service
User Offline
Joined: 1st Dec 2003
Location: The Netherlands - Oudenbosch
Posted: 15th Apr 2004 00:40 Edited at: 15th Apr 2004 00:41
@magellan



Quote: "
UPDATED

Amd 2800+ 1024mb pc3200 A7N8X - Deluxe Ati Radeon 9800PRO 256mb
"
Neofish
21
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 15th Apr 2004 00:54
@mag
thats what is was going to do, didnt know how either, but i can have both!

@Baal
thanks

by the way, how do u make a little arrow point to cyber north (just a letter saying N or S or NNE or WWS etc will do..

thanks

Code Ninja
21
Years of Service
User Offline
Joined: 17th Dec 2003
Location: AZ, U.S.
Posted: 15th Apr 2004 01:08
Quote: "thats what is was going to do, didnt know how either, but i can have both!
"

cool, just like AoE 1+2 and Mythology

Dragael Software
Current Project: 2D RPG Editor (DragnEdit 2D)
Neofish
21
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 15th Apr 2004 01:23
yep, however it doesnt work!, i changed it a liitle cos it wouldnt compile:

Quote: "
"


to this:



it loaded that time but nothing extra happened

in addition, something easy: how do i change the mouse pointer?

thanks

comando 300
21
Years of Service
User Offline
Joined: 23rd Nov 2003
Location:
Posted: 15th Apr 2004 01:31 Edited at: 15th Apr 2004 01:31
you have to load the image u want to be the cursor.

make sprite of it.

sprite [sprite no.],mousex(),mousey(),image
hide sprite [sprite no.]

use the code for move the camera to call it

if mousex() < 5 then position camera camera position x()-5,camera : show sprite [sprite no.]

position y(),camera position z()


Hope it helps

CURRENT PROJECT: RETRO PAC-MAN
Peter H
21
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 15th Apr 2004 01:32 Edited at: 15th Apr 2004 01:33
Quote: "in addition, something easy: how do i change the mouse pointer?"

use the
command
and then load your own(sprite, bitmap...ect) and position it at "mousex()" and "mousey()"

[edit] aww man you beat me to it
[edit2] haha! you forgot hide mouse


Formerly known as "DarkWing Duck"
comando 300
21
Years of Service
User Offline
Joined: 23rd Nov 2003
Location:
Posted: 15th Apr 2004 01:32 Edited at: 15th Apr 2004 01:35
I forgot the hide mouse command

[edit] put hide mouse command next to the show sprite command

CURRENT PROJECT: RETRO PAC-MAN
Neofish
21
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 15th Apr 2004 01:49
this sprite only need 1 image rite (as its not animated) and the background has to be black rite?

Peter H
21
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 15th Apr 2004 01:55
i think so...


Formerly known as "DarkWing Duck"
Neofish
21
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 15th Apr 2004 02:03
thats a point, is it 10x10 or 20x20 pixels

comando 300
21
Years of Service
User Offline
Joined: 23rd Nov 2003
Location:
Posted: 15th Apr 2004 02:05 Edited at: 15th Apr 2004 02:07
well u have to do some images


one for up,down,etc...

if the cursor is on then top of the screen then you have to say to the program to change the image to the one with up arrows, to do that make a cursor variable.



CURRENT PROJECT: RETRO PAC-MAN
Neofish
21
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 15th Apr 2004 02:09
i see what u mean but i dunt NEED it

anyway, another prob, how do i set collision for the matrix?

thanks

Peter H
21
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 15th Apr 2004 02:12 Edited at: 15th Apr 2004 02:16
you can use the command...
Quote: "GET GROUND HEIGHT
This command will calculate and return the Y coordinate within the matrix given the X and Z coordinates.
This command can be used to allows 3D objects to traverse the contours of any matrix landscape with
ease. The matrix number should be an integer value. The coordinates should be real numbers.

SYNTAX
Return Float=GET GROUND HEIGHT(Matrix Number, X, Z)
"


[edit] so you can give the position of a object(or whatever) and get the height of the matrix there and do whatever you want to do...such as..if you wanted you could position the object at the height of the matrix(but be careful to add to this like this...

so that way instead of the middle of the object you have the bottom of the object at the matrix height.


Formerly known as "DarkWing Duck"
Neofish
21
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 15th Apr 2004 16:45 Edited at: 15th Apr 2004 16:49
k thanks, im not i get that, but i'll look at it for a while
[edit]ah i do get that but how do i do it for the camera? swap the position objects for position camera?

and whats the height of the camera?


BTW ive got camera restrictions and a workoing compass now, oo oo and my mouse works

Peter H
21
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 15th Apr 2004 18:03
Quote: "and whats the height of the camera?"

ummm...(i hope this is what you're talking about... )...
?


Formerly known as "DarkWing Duck"
Neofish
21
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 15th Apr 2004 20:19
in the code u sent earlier, it says from the middle to the bottomt of the object, i want to know what that is for the camera

thanks

Peter H
21
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 15th Apr 2004 20:28 Edited at: 15th Apr 2004 20:29
well the camera is really small(don't know the real size...here's a better example of the ground height command...

so pretty much just put in whatever height you need to with the camera(just preferably not negative ) and with objects just guess until it looks like they aren't sinking through the ground


Formerly known as "DarkWing Duck"
Neofish
21
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 15th Apr 2004 21:00
thanks, i get that, hey do u have MSN so i can debug things quickly with u, i'll b on broadband soon, so i can do lots of stuff v quickly,

anyway, i dont understand matrixes very well, so cud some1 tell me the co-ordinates for each edge of the matrix i've made, or atleast tell me how, so i can make a collision thing for the edge of the map

thanks

Neofish
21
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 15th Apr 2004 22:24 Edited at: 15th Apr 2004 22:26
Ideas for Splat Engine:

I've been thinking about the future for my RTS and i realised i would soon have to make a system that splats models and draws blood. I'm just going to write down my reasoning for thsi etc and then see if it would work.

Ok if the distance from the blast (thing getting hit=O) is d and the x co-ord is x and the y, y. Then d=square root of(y squared + x squared). This gives the diagonal distance away. You can then use tghe strength (s) of the blast times the distance away to work out the distance and direction the parts fly. Then you have a for next statement that tells the parts to go up and out early on depending on f (force=d times s). Then it's make them come down and bounce.

Blood is similar, f will define how far the blood will splat and in which direction.

Is this theory right so i can test it on a v simple app?

Neofish
21
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 16th Apr 2004 04:41
sorry about the bump

the collision doesnt now, i changed it slightly to see if it would work but still no avail

Peter H
21
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 16th Apr 2004 20:33 Edited at: 16th Apr 2004 20:34
in theory your "splat engine" seems like it will work but i don't know if it will work,...i've never done anything like that before

and no i don't have MSN


Formerly known as "DarkWing Duck"
Neofish
21
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 17th Apr 2004 02:38
y dunt you get it, its free, unless u got low bandwidth

anyway, im working on making a nicer matrix, cos that'll work

Neofish
21
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 17th Apr 2004 05:43 Edited at: 17th Apr 2004 21:54
sorry bout the bump

ive got some more stuff on the splat engine, its only really theory but it shows that it SHOULD work



EDIT: the code in the source thing went wierd
EDIT2: this new code shoudlvery basically do what is needed using big blocks
hpwever, theres a few bugs (i havent tested it)

Peter H
21
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 18th Apr 2004 03:49
Quote: "y dunt you get it, its free"

not my computer...

you probably already fixed this but i got a "command out of place at line 114" (the command there was "next t"


Formerly known as "DarkWing Duck"
Neofish
21
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 18th Apr 2004 04:27
yeah i got that but didnt have time to fix it, i tried moving it around

any ideas?

Login to post a reply

Server time is: 2025-05-23 16:17:02
Your offset time is: 2025-05-23 16:17:02