[QUOTE=Dj-J3;25792000]I've been thinking about how i should get the distance between two points.
Would this be a good way? (and most importantly, would it work?)
[img_thumb]http://i52.tinypic.com/33eq2cz.png[/img_thumb]
Haven't done math in a while. :v:
[editline]1st November 2010[/editline]
Or, this?
c² = a² + b² (found on google)[/QUOTE]
A really quick way to get distance is the square root of the dot product of the first point minus the second point, where dot is also the first X times the second X plus the first Y times the second Y plus the first Z times the second Z.
In C++, where dX, dY, and dZ are the 3 parts, [url]http://pastebin.com/Eit75NTN[/url]
In case you can't tell, I'm not very good at explaining things.
[QUOTE=Whitewater;25792559]A really quick way to get distance is the square root of the dot product of the first point minus the second point, where dot is also the first X times the second X plus the first Y times the second Y plus the first Z times the second Z.
In C++, where dX, dY, and dZ are the 3 parts, [url]http://pastebin.com/Eit75NTN[/url]
In case you can't tell, I'm not very good at explaining things.[/QUOTE]
:brainfart:
[editline]1st November 2010[/editline]
I can tell. :v:
[QUOTE=layla;25792514]lightmaps :)
[img_thumb]http://dl.dropbox.com/u/99765/2348132d.png[/img_thumb][/QUOTE]
Yes very good now release fortblox.
[QUOTE=layla;25792514]lightmaps :)[/QUOTE]
Hmm, are BSPs hard to parse, or can you discard most of the lumps and get the vertex data in a straightforward way?
[QUOTE=Overv;25792931]Hmm, are BSPs hard to parse, or can you discard most of the lumps and get the vertex data in a straightforward way?[/QUOTE]
They are very easy to parse, you only need to use a few of the lumps to draw the level geometry.
Here's all the references Ive used so far:
Unofficial Quake 3 Map Specs: [url]http://www.mralligator.com/q3/[/url]
Rendering Quake 3 Maps: [url]http://graphics.cs.brown.edu/games/quake/quake3.html[/url]
Loading and Rendering Quake 3 Arena Maps: [url]http://www.vicampus.com/index.php?action=showtutorial&id=8[/url]
Lightmaps in Quake 3 Arena: [url]http://www.vicampus.com/index.php?action=showtutorial&id=9[/url]
Late.
-snip wrong thread-
[QUOTE=Dj-J3;25792000]I've been thinking about how i should get the distance between two points.
Would this be a good way? (and most importantly, would it work?)
[img_thumb]http://i52.tinypic.com/33eq2cz.png[/img_thumb]
Haven't done math in a while. :v:
[editline]1st November 2010[/editline]
Or, this?
c² = a² + b² (found on google)[/QUOTE]
[code]
float Distance(Vec3 Vector1, Vec3 Vector2){
return (float) sqrt ( (Vector2.x - Vector1.x) * (Vector2.x - Vector1.x) +
(Vector2.y - Vector1.y) * (Vector2.y - Vector1.y) +
(Vector2.z - Vector1.z) * (Vector2.z - Vector1.z) );
}
[/code]
[QUOTE=Jallen;25792759]Yes very good now release fortblox.[/QUOTE]
I think it would be wrong to release it now. I want it to be something people keep coming back to play, not just a 5 minute tech demo.
[QUOTE=Darwin226;25789938]Actually, it's rotion. And the guy who was making it posted right before you XD[/QUOTE]
Heh. I thought his avatar looked familiar.
I overload my vector operations
I much prefer writing (vector2 - vector1).Length
[QUOTE=arienh4;25789328][url=http://stackexchange.com/]StackExchange[/url] is Creative Commons.[/QUOTE]
Well I meant with an API. And not really those kinds of questions. Just simple questions that you would have in like a textbook.
[QUOTE=Dj-J3;25796085]It works :buddy:
Thanks![/QUOTE]
Np :) Just for you my little swede
[QUOTE=Dj-J3;25796085]It works :buddy:
Thanks![/QUOTE]
Also, if you are doing things like distance comparisons, it is better to compare the DistanceSquared to the Radius^2, like
[code]bool Vector3::IsInSphere( const Vector3& rhs, double dRadius ) const
{
return( DistanceSquared( rhs ) <= std::pow( dRadius, 2 ) );
}
double Vector3::Distance( const Vector3& rhs ) const
{
return std::sqrt( DistanceSquared( rhs ) );
}
double Vector3::DistanceSquared( const Vector3& rhs ) const
{
return( ( *this - rhs ).Dot( *this - rhs ) );
}
double Vector3::Dot( const Vector3& rhs ) const
{
return( dX * rhs.dX + dY * rhs.dY + dZ * rhs.dZ );
}[/code]
Or at least I think thats the way you're supposed to do it.
Why Notch why
for (int i1 = 0; i1 < 9; i1++) {
if (Keyboard.getEventKey() != 2 + i1)
continue;
this.g.e.d = i1;
}
That is how it checks for the 0-9 key.
[QUOTE=Loli;25791630]Releasing over XBLIG isn't the best way to go. I've found that even the most successful games haven't made that much money.[/QUOTE]
To quote mdominick (unsuccessful vtw productions open game project), it's better than psn:
[quote]
Regarding PSN, I spoke to a SONY [psn][/psn] rep today and was informed very politely that no such capability exists to small/indie devs and to consider the Xbox [IMG]http://media.vtwproductions.com/forum/Smileys/classic/shocked.gif[/IMG] Strange, but it does confirm what I've heard, which I have reproduced in dialog here:
SMALL DEV: Hey, Sony I'd really like develop games for you systems and have them distributed on the PSN. What do you say, buddy?
SONY: Got $10K?
SMALL DEV: No... but --
SONY: Pfft come back when you matter.
[/quote]
[QUOTE=high;25798076]Why Notch why
for (int i1 = 0; i1 < 9; i1++) {
if (Keyboard.getEventKey() != 2 + i1)
continue;
this.g.e.d = i1;
}
That is how it checks for the 0-9 key.[/QUOTE]
How do you know this?
-snip-
fuck page king, meet the content:
[img]http://ahb.me/Pd7[/img]
Rewrote the way the start menu opens applications and added window controls (currently the Close and Minimize buttons are the only working buttons).
Actually working on this piece winforms of shit again.
[editline]1st November 2010[/editline]
my automerge ;-;
I'm currently shopping around for a preprocessor language.
I mentioned before that whenever a `script identifier was found, you could embed another language within your source, and effectively perform some compile-time magic (sort of like Haskell's Monads, but without actually being monads).
Now while the obvious choice might be Lua, I'm actually finding myself leaning towards Tcl. But there's a reason. Tcl is more command oriented, and actually feels like a preprocessor (even looks like it too. Case in point below here), and I would actually place it into the genre of a DSL (domain specific language). Now I've not decided for sure, but I feel that if someone were to see
[code]
set sum [expr 1 + 2 + 3 + 4 + 5]
puts "The sum of the numbers 1..5 is $sum."
[/code]
That they would be able to pick it up quicker (and try not to do something foolish), rather than if they were to use Lua.
Plus, there's a really small implementation of Tcl called [url=http://jim.berlios.de/]Jim's Tcl[/url], and I think it would work out pretty well as a macro/preprocessor language :)
(but nothing is set in stone :D)
[QUOTE=Chandler;25798613]I'm currently shopping around for a preprocessor language.
I mentioned before that whenever a `script identifier was found, you could embed another language within your source, and effectively perform some compile-time magic (sort of like Haskell's Monads, but without actually being monads).
Now while the obvious choice might be Lua, I'm actually finding myself leaning towards Tcl. But there's a reason. Tcl is more command oriented, and actually feels like a preprocessor (even looks like it too. Case in point below here), and I would actually place it into the genre of a DSL (domain specific language). Now I've not decided for sure, but I feel that if someone were to see
[code]
set sum [expr 1 + 2 + 3 + 4 + 5]
puts "The sum of the numbers 1..5 is $sum."
[/code]
That they would be able to pick it up quicker (and try not to do something foolish), rather than if they were to use Lua.
Plus, there's a really small implementation of Tcl called [url=http://jim.berlios.de/]Jim's Tcl[/url], and I think it would work out pretty well as a macro/preprocessor language :)
(but nothing is set in stone :D)[/QUOTE]
$
hhhhhnnnngggg php
[QUOTE=i300;25798852]$
hhhhhnnnngggg php[/QUOTE]
Technically perl used $ for variables, and Tcl before that :v:
[QUOTE=high;25797128]Well I meant with an API. And not really those kinds of questions. Just simple questions that you would have in like a textbook.[/QUOTE]
Stack Exchange has an API, and you could probably use tags to find suitable questions.
[editline]2nd November 2010[/editline]
[QUOTE=arienh4;25801392]You can do ASCII art programs in most languages though.[/QUOTE]
Except there is not a single alphanumeric character there.
[QUOTE=high;25798076]Why Notch why
for (int i1 = 0; i1 < 9; i1++) {
if (Keyboard.getEventKey() != 2 + i1)
continue;
this.g.e.d = i1;
}
That is how it checks for the 0-9 key.[/QUOTE]
Oh well, it works, it appears that he's having no problems extending or maintaining it and it runs fine.