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 / ELITE on DBPRO!?!?!?!?!?!?!?!?!??!?!?

Author
Message
TriTon
23
Years of Service
User Offline
Joined: 24th Apr 2003
Location: Moldova
Posted: 21st May 2003 10:28
And how to make management of the ship from a mouse, as in FREELANCER and StarWraith???
TriTon
23
Years of Service
User Offline
Joined: 24th Apr 2003
Location: Moldova
Posted: 21st May 2003 10:48
To: Zed


You may give me that part of a code which is responsible for management of the ship (camera)???
Zed
23
Years of Service
User Offline
Joined: 20th Sep 2002
Location:
Posted: 22nd May 2003 10:01
Mikko, I'll have a go at turning it into a function others can use this weekend. It you want to understand how it all works I'd suggest taking a look and Ian Bells web pages (it's where I got the info from).

TriTon
23
Years of Service
User Offline
Joined: 24th Apr 2003
Location: Moldova
Posted: 22nd May 2003 10:51
Prompt, where my mistake???


set display mode 800,600,16
sync on : sync rate 30
set text font "Times New Romain" : set text size 16
autocam off
make camera 1
backdrop on
color backdrop 1,0
make object sphere 2,10000,50,50
color object 2,rgb(200,100,100)
set object cull 2,0
set object light 2,1
position camera 1,200,0,0
set camera range 1,10,15000
for i=100 to 500
make object sphere i,10
set object cull i,0
set object light i,0
position object i,(rnd(5000)+2500),(rnd(5000)+2500),(rnd(5000)+2500)
next i

x#=5000
z#=5000
y#=5000
position object 2,x#,y#,z#
position camera 1,x#,y#,z#
sync
do
`move mouse and camera
disx#=mousex()
disy#=mousey()
mmx#=(disx#-400)/100
mmy#=(disy#-300)/100
oldcamangley#=cameraangley#
oldcamanglex#=cameraanglex#
cameraangley#=wrapvalue(cameraangley#+Mmx#)
cameraanglex#=wrapvalue(cameraanglex#+mmy#)
if upkey()=1
xtest#=newxvalue(x#,cameraangley#,3)
ztest#=newzvalue(z#,cameraangley#,3)
ytest#=newzvalue(y#,cameraangley#,3)
if xtest#>0 and xtest#<10000 and ztest#>0 and ztest#<10000 and ytest#>0 and ytest#<10000
x#=xtest#
z#=ztest#
y#=ytest#
endif
endif

if downkey()=1
xtest#=newxvalue(x#,wrapvalue(cameraangley#-180),10)
ztest#=newzvalue(z#,wrapvalue(cameraangley#-180),10)
ytest#=newzvalue(y#,wrapvalue(cameraangley#-180),10)
if xtest#>0 and xtest#<10000 and ztest#>0 and ztest#<10000 and ytest#>0 and ytest#<10000
x#=xtest#
z#=ztest#
z#=ztest#
endif
endif
yrotate camera 1,curveangle(cameraangley#,oldcamangley#,24)
xrotate camera 1,curveangle(cameraanglex#,oldcamanglex#,24)
position camera 1,x#,y#,z#

set cursor 10,10
print "MMX# ";mmx#
set cursor 10,40
print "MMY# ";mmy#
set cursor 10,70
print "X# ";x#
set cursor 10,100
print "Y# ";y#
set cursor 10,130
print "Z# ";z#
sync
loop
Glennyboy
23
Years of Service
User Offline
Joined: 26th Feb 2003
Location: United Kingdom
Posted: 22nd May 2003 19:05
Quote: "about the only decent elite clone i've seen well ever has been within the DBpro community the past few months with a game called "Space at War" by Glennyboy.
i'd suggest you keep a good eye on that if you want to see a true clone arrive "


Wow, cool, I have a (meagre, admittedly) reputation! Just popped in to say that it's actually "Galaxy At War", but I appreciate the mention

Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 22nd May 2003 19:44
lol... high praise from me, just think how much more rare that is

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
Mikko
23
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 23rd May 2003 01:57
OK Zed ! Looking forward for your functions and trying to solve it too

And Triton, looking good . Continue .
Mikko
Scorpyo
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 23rd May 2003 02:06
Interviewer:
"What's next for Frontier Developments?

David Braben:
The previous question pre-empts the obvious. Yes, we are working on the next Elite game! We also have Wallace and Gromit coming out this year, so this is an exciting year for us!"

http://www.frontier.co.uk/

Can't wait.....
TriTon
23
Years of Service
User Offline
Joined: 24th Apr 2003
Location: Moldova
Posted: 23rd May 2003 11:29
And to help with a code though somebody may???
TriTon
23
Years of Service
User Offline
Joined: 24th Apr 2003
Location: Moldova
Posted: 27th May 2003 10:23
How to operate object using its axes of symmetry, instead of to global coordinates???
Zed
23
Years of Service
User Offline
Joined: 20th Sep 2002
Location:
Posted: 27th May 2003 10:45 Edited at: 27th May 2003 10:47
Ok, this is ripped straight from my game code. If had time I'd comment it better or create the function you asked for, but I don't have time.

TriTon
23
Years of Service
User Offline
Joined: 24th Apr 2003
Location: Moldova
Posted: 27th May 2003 13:27
Prompt, that at me it is not correct...


set display mode 640,480,16
sync on : sync rate 0
autocam on
for star=1 to 1000
ink (rnd(30000)+45000),0
dot (rnd(64)*10),(rnd(48)*10)
next star
get image 2,0,0,640,480
cls
make camera 1
set camera range 1,1,15000
backdrop on
color backdrop 1,0
make object sphere 2,10000
texture object 2,2
SCALE OBJECT TEXTURE 2,5,5
set object cull 2,0
set object light 2,0
position camera 1,200,0,0
point camera 1,0,0,0
for s=200 to 800
make object sphere s,50
position object s,(rnd(5000)+2500),(rnd(5000)+2500),(rnd(5000)+2500)
set object s,1,1,0,1,0,0,0
next s
do
if leftkey()=1 then roll camera left 1,1
if rightkey()=1 then roll camera right 1,1
if upkey()=1 then pitch camera up 1,1
if downkey()=1 then pitch camera down 1,1
if shiftkey()=1 then speed#=speed#+1
if controlkey()=1 then speed#=speed#-1
if speed#<1 then speed#=1
if speed#>50 then speed#=50
sp#=speed#/5
move camera 1,sp#
set cursor 10,10
print screen fps()
sync
loop
wait key
Mikko
23
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 27th May 2003 21:31
Thanks Zed !
I'll try to figure out the functions for everybody.
Mikko

TriTon
23
Years of Service
User Offline
Joined: 24th Apr 2003
Location: Moldova
Posted: 28th May 2003 12:57
âñå ðàâíî áûëè íàðóøåíèÿ óïðàâëåíèÿ...

ÿ òàê ñ÷èòàþ, ÷òî îí áåðåò óïðàâëåíèå êàìåðîé îòíîñèòåëüíî ãëîáàëüíûõ
êîîðäèíàò, è ïîýòîìó ïðè íåêîòîðûõ ñìåùåíèÿõ ãëîáàëüíûå êîîðäèíàòû
ñòàíîâÿòñÿ â äðóãèõ íàïðàâëåíèÿõ îòíîñèòåëüíî êàìåðû...

íî ïðè âðàùåíèè êàìåðû îòíîñèòåëüíî ñâîåé îñè à íå îòíîñèòåëüíî
ãëîáàëüíûõ êîîðäèíàò, ýôôåêò ïîëåòà êîðîáëÿ áîëåå ðåàëüíûé ÷åì ïðè
ïîâîðîòå êîðîáëÿ â ñòîðîíó...

ÿ õî÷ó èñïîëüçîâàòü òîò æå ýôôåêò âèäà èç êàáèíû ÷òî èñïîëüçóåòñÿ â
àâèàñèìàõ, íîò âîò ðåàëèçîâàòü åãî îêàçûâàåòñÿ íàìíîãî ñëîæíåå ÷åì
êàçàëîñü (à ìîæåò ýòî î÷åðåäíûå ãëþêè êîìàíä äàðêà è â ñëåäóþùèõ ïàò÷àõ
áóäóò èñïðàâëåíû...)

ïî èäåå ïðè èñïîëüçîâàíèè êîìàíä roll è turn êàìåðà äîëæíà ïðîèçâîäèòü
ñìåùåíèÿ è ïîâîðîòû îòíîñèòåëüíî ñâîèõ îñåé ñèììåòðèè, à íà ñàìîì æå
äåëå ïîëó÷àåòüñÿ ÷òî âñå äåéñòâèÿ ïðîèçâîäÿòüñÿ îòíîñèòåëüíî
ãëîáàëüíûõ êîîðäèíàò.
TriTon
23
Years of Service
User Offline
Joined: 24th Apr 2003
Location: Moldova
Posted: 13th Jun 2003 09:59
So, whether there were at whom that decisions of the given problem???
=C=
23
Years of Service
User Offline
Joined: 8th May 2003
Location: United Kingdom
Posted: 22nd Aug 2003 14:05
I have analysed the radar and the way it works in elite.

In elite the ship is static and the whole universe moves and changes...

The Planet for example is just a circle right? It moves around you as you roll and pitch and yaw... This mirrors in a microsystem centered on the scanners graphic. The little squares plot around it, the line is added to show the deviation of the target. This is the lollipop scanner system you see in Elite.

I made a different one in DBPro, something that works (and is so generic that will work on your code) But trust me, The satisfaction of making it yourself is superb, so I will help but wont give it away.

I tell you, it is a matter of pointing to the target! Only few lines of code too...

I dont want to be a tease, honestly, you will thank me later!

Ask me specifics and I will answer!

Have a great time coding guys! Love the new site too!

-------------------------------
Pointy birds, Oh pointy pointy
Anoint my head, Anointy 'nointy
Dave J
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 22nd Aug 2003 14:09
Excellent, and only 2 and a half months late =D

"Computers are useless they can only give you answers."
=C=
23
Years of Service
User Offline
Joined: 8th May 2003
Location: United Kingdom
Posted: 22nd Aug 2003 19:54
I see now!
Yup, a bit late to reply...

Still the offer is there, or here!

Man I am having trouble moving my code from DBC to DBPro... I tell ya! My brain hurts most of the times!

Of to design a logo or an avatar or something I am bored with the ones I have at the mo...

-------------------------------
Pointy birds, Oh pointy pointy
Anoint my head, Anointy 'nointy
Zed
23
Years of Service
User Offline
Joined: 20th Sep 2002
Location:
Posted: 25th Aug 2003 17:42
=C=, that will work for the radar but is not so good when you try to do some AI. Pointing will give you the vector you require for radar but you don't know the orientation using that method. If you just want the radar then it's fine!

Login to post a reply

Server time is: 2026-07-23 01:51:06
Your offset time is: 2026-07-23 01:51:06