Probably pretty silly asking me here, and everyone will just tell me to "google" it, but:
Where can somebody with little knowledge of geometry ( only taken a first year high school class ) get kind of an.. "ultimate" guide to 3d collision detection. I would like to know what math I need to know etc. I know the basis of how the collision detection works, but every guide tells me the same thing:
check if the plane is intercepting another plane by using [I]insert random equation with no explanation at all here[/I]
It's just a bit confusing and is seriously holding me back and discouraging me with moving on with 3d game development which I am trying to get better at. I have looked up ways of finding planes that are intersecting but I just keep finding examples but no explanations. There has got to be a book around somewhere that I can use.
[QUOTE=Duskling;39233045]Probably pretty silly asking me here, and everyone will just tell me to "google" it, but:
Where can somebody with little knowledge of geometry ( only taken a first year high school class ) get kind of an.. "ultimate" guide to 3d collision detection. I would like to know what math I need to know etc. I know the basis of how the collision detection works, but every guide tells me the same thing:
check if the plane is intercepting another plane by using [I]insert random equation with no explanation at all here[/I]
It's just a bit confusing and is seriously holding me back and discouraging me with moving on with 3d game development which I am trying to get better at. I have looked up ways of finding planes that are intersecting but I just keep finding examples but no explanations. There has got to be a book around somewhere that I can use.[/QUOTE]
you're going to have to learn to derive code from equations; it takes a while but I had to struggle through this hurdle too. if you just want an explanation, post the equation.
If I start learning C++ but already have experience with java, which areas in particularly do I need to focus on? I looked over the first few chapters of a tutorial and the only thing that seemed new to me was the header files and some of the data types.
[QUOTE=LaughingStock;39235177]If I start learning C++ but already have experience with java, which areas in particularly do I need to focus on? I looked over the first few chapters of a tutorial and the only thing that seemed new to me was the header files and some of the data types.[/QUOTE]
[B]Pointers[/B], generics are now called templates, and using them is different syntactically (also in other regards as mentioned below). Look up header guards.
[code] while (true)
new ServerThread(serverSocket.accept()).start();
[/code]
I was working with an assignment from school when I noticed that line in the pre-written code.
Is that really a good way to ensure multiple client support?
I mean I know that my program will never be used by more than like 5 clients, why the heck would I do that, is that normal?
I looked it up and saw that the Socket tutorial example does that too.
[URL]http://docs.oracle.com/javase/tutorial/networking/sockets/examples/KKMultiServer.java[/URL]
Changed that part unless there's any better reason.
[QUOTE=Swebonny;39235543][code] while (true)
new ServerThread(serverSocket.accept()).start();
[/code]
I was working with an assignment from school when I noticed that line in the pre-written code.
Is that really a good way to ensure multiple client support?
I mean I know that my program will never be used by more than like 5 clients, why the heck would I do that, is that normal?
I looked it up and saw that the Socket tutorial example does that too.
[URL]http://docs.oracle.com/javase/tutorial/networking/sockets/examples/KKMultiServer.java[/URL]
Changed that part unless there's any better reason.[/QUOTE]
I guess if ServerThread.start blocks until a connection is made then it's fine.
Finished the basic collision detection in my game but right now, when you collide with something, it puts you back at your position last frame. This works, but it locks the player there unless the player moves backwards. I would like to be able to slide along the wall like in most fps games. Here is the function for the detecting:
[CODE]
public void handleCollision(){
for (Wall w : SubZero.wall){
if(position.z - w.position.z > -(w.hitBoxSize/2) && position.z - w.position.z < (w.hitBoxSize/2) && position.x - w.position.x > -(w.hitBoxSize/2) && position.x - w.position.x < (w.hitBoxSize/2)){
position.x = lastPosition.x;
position.z = lastPosition.z;
}
}
}
[/CODE]
And the full source is here if you want to take a look:
[url]https://github.com/Dooskington/DungeonCrawler[/url]
player class:
[url]https://github.com/Dooskington/DungeonCrawler/blob/master/Sub%20Zero/src/subzero/entity/Player.java[/url]
[QUOTE=Topgamer7;39235389]generics are now called templates, and using them is different syntactically[/QUOTE]
It's actually different in so many ways it doesn't really make much sense to compare them directly
[img]http://i.imgur.com/ouIvt.png[/img]
Why is this happening to my window title?
SFML 2.0
[QUOTE=Asgard;39241064][img]http://i.imgur.com/ouIvt.png[/img]
Why is this happening to my window title?
SFML 2.0[/QUOTE]
Wrong character set?
[editline]16th January 2013[/editline]
Try switching stuff around.
[img]http://cold.netburst.co.uk/file/2013-01-16_16-42-19.png[/img]
[editline]16th January 2013[/editline]
[img]http://cold.netburst.co.uk/file/2013-01-16_16-50-36.png[/img]
[QUOTE=OldFusion;39241220]Wrong character set?
[editline]16th January 2013[/editline]
Try switching stuff around.
[img]http://cold.netburst.co.uk/file/2013-01-16_16-42-19.png[/img]
[editline]16th January 2013[/editline]
[img]http://cold.netburst.co.uk/file/2013-01-16_16-50-36.png[/img][/QUOTE]
You sir, are lovely. What exactly did you google search for?
[QUOTE=Asgard;39241348]You sir, are lovely. What exactly did you google search for?[/QUOTE]
The question is pretty simple: SFML window junk
[QUOTE=Leystryku;39243649]The question is pretty simple: SFML window junk[/QUOTE]
I agree it is a simple question! However that doesn't mean that is what he searched for. That is simply the title of the post on that forum.
I am thinking of how to do something similar to this post, [url]http://box2d.org/forum/viewtopic.php?f=3&t=4367[/url]
IE rotate the world, nowas the post mentiones you basically have to rotate the view and then adjust the physics.
But say I want to rotate it 90 degrees meaning the gravity ends up from 0,-1 to 1,0.
Now if im progressivelly rotating the screen and set the gravity sudenly things would fall straight away, I guess what im asking is what formula should I use to translate the 0 - x - 90 degrees into 0,-1 - X,X - 1,0, so for example if the screen is rotated at 15 degrees the gravity would be soething like 0.09,-0.8 or something like that
I think its basically calculating the direction from the angle but im not sure.
[QUOTE=Richy19;39243870]I am thinking of how to do something similar to this post, [url]http://box2d.org/forum/viewtopic.php?f=3&t=4367[/url]
IE rotate the world, nowas the post mentiones you basically have to rotate the view and then adjust the physics.
But say I want to rotate it 90 degrees meaning the gravity ends up from 0,-1 to 1,0.
Now if im progressivelly rotating the screen and set the gravity sudenly things would fall straight away, I guess what im asking is what formula should I use to translate the 0 - x - 90 degrees into 0,-1 - X,X - 1,0, so for example if the screen is rotated at 15 degrees the gravity would be soething like 0.09,-0.8 or something like that
I think its basically calculating the direction from the angle but im not sure.[/QUOTE]
I [I]think[/I] you want gravity(cos(angle), sin(angle)) but I'm not sure what you're asking for, really.
I'd say just linearly interpolate the gravity.
[cpp]gx = x0 + time * (x1 - x0);
gy = y0 + time * (y1 - y0);[/cpp]
(gx,gy) goes from (x0,y0) to (x1,y1) as time goes from 0 to 1.
This way, flipping gravity from (0,1) to (0,-1) means things won't get accelerated sideways, and there'll be a brief moment of zero gravity
[editline]16th January 2013[/editline]
But I don't know what you're asking either.
If I need a global list, for game entities for example, should I add the entity to the list via the constructor or write a special spawn function for it like Entity.create<Class>(Args...)?
Constructor seems like a more convenient choice
[QUOTE=Asgard;39241348]You sir, are lovely. What exactly did you google search for?[/QUOTE]
"SFML window title"
its a link in the 4th result.
[QUOTE=Duskling;39240334]Finished the basic collision detection in my game but right now, when you collide with something, it puts you back at your position last frame. This works, but it locks the player there unless the player moves backwards. I would like to be able to slide along the wall like in most fps games. Here is the function for the detecting:
[CODE]
public void handleCollision(){
for (Wall w : SubZero.wall){
if(position.z - w.position.z > -(w.hitBoxSize/2) && position.z - w.position.z < (w.hitBoxSize/2) && position.x - w.position.x > -(w.hitBoxSize/2) && position.x - w.position.x < (w.hitBoxSize/2)){
position.x = lastPosition.x;
position.z = lastPosition.z;
}
}
}
[/CODE][/QUOTE]
You should check x and z seperately, and repositioning both seperately.
Now if you have a wall like this, with a player (o) moving to the top right:
[code]
-------------------
o
[/code]
And it hits the wall, your code checks both x and z, so if you are allowed to move along the X side, but not Z, he'll stop anyway. This is for the player walking oblique though. If the player isn't allowed to move sideways either, this may be caused by the z position he's being reset to. It might still be outside the bounds.
[QUOTE=Chris220;39244321]I [I]think[/I] you want gravity(cos(angle), sin(angle)) but I'm not sure what you're asking for, really.[/QUOTE]
[QUOTE=ThePuska;39244877]I'd say just linearly interpolate the gravity.
[cpp]gx = x0 + time * (x1 - x0);
gy = y0 + time * (y1 - y0);[/cpp]
(gx,gy) goes from (x0,y0) to (x1,y1) as time goes from 0 to 1.
This way, flipping gravity from (0,1) to (0,-1) means things won't get accelerated sideways, and there'll be a brief moment of zero gravity
[editline]16th January 2013[/editline]
But I don't know what you're asking either.[/QUOTE]
Basically the way they decribe it in that post is, you rotate the view 90 degrees, and then change the gravity to match.
But what I would want to do is rotate the view slowly and have the gravity always consistently towards the bottom of the window.
[url]http://www.youtube.com/watch?v=JewxFD-zp3E[/url]
notice how when the guy rotates his phone, the gravity doesnt just jump from one orientation to the other, it changes according to the phones rotation
entity.velocity -= player.up*10*frameTime
[QUOTE=WeltEnSTurm;39246760]entity.velocity -= player.up*10*frameTime[/QUOTE]
But how would you calculate player.up in a rotating world
[QUOTE=Richy19;39252690]But how would you calculate player.up in a rotating world[/QUOTE]
x = math.cos(world.angle) * speed * frameTime
y = math.sin(world.angle) * speed * frameTime
I'm not sure how to phrase this so I'm just gonna say it. I've had this idea for a game in my head for some years now and I've always thought it would be cool to have but I never thought I had the tools to do it but recently I found UDK and I think I can actually make it now. What I need though is the 3 Day Cycle/Time/Schedule system used in Majoras Mask figured out. I've been puzzling over it (since I got UDK) for I think a couple weeks now and my puzzlers sore. I've been looking into how to make a figure follow an exact path at an exact time in 3D space smoothly and not robotic like. Do note that this will be my first time programming in 3D but not in programming. From what I've been researching into, it seems that bezier curves are what I ended up needing but I'm having trouble fixing problems that I'm foreseeing. Oh and a note, I haven't actually written or done anything on it yet I'm trying to see if its possible/iron out kinks before I start. And as such I'm looking more for the logic and how it works than actual code though I won't turn it away. I'm trying to understand it so I can do it myself ultimately.
Here's what I've been puzzling:
1) How do I create the path? 2) Do I create specific lengths, say 10 ft segments, with a variable rate of speed? But that wouldn't work if I need quick changes in direction. I would also need to figure out every individual time speed up or slow down while they work through it. 3) Do I create specific lengths of time, say 10 seconds, with a variable rate of distance? This seems to work but then, if for example I had some guy have a 15 second path he would have one 10 second path and one 5 second path. For the 5 second path he would finish it then just stand there till time was up wouldn't he? Or maybe take twice as long to finish it? How do i solve for that? And it still has the quick direction change issue though not as much. 4) Another issue I have is if I build them around following a path how would I get them to turn with it? If I go with what I've got I foresee them doing something akin to T-posing facing one direction and not rotating but still following the path. 5) If bezier curves are not the way to go, what is?
I'm learning everything as I'm going along and in a piecemeal fashion so I'm probably (definitely) missing some things but I want to work through them and figure this out. It's something I would really like to accomplish. So, how would I do this or in what direction should I be pointed to figure this out?
[QUOTE=Balistics_Dummy;39259187]I'm not sure how to phrase this so I'm just gonna say it. I've had this idea for a game in my head for some years now and I've always thought it would be cool to have but I never thought I had the tools to do it but recently I found UDK and I think I can actually make it now. What I need though is the 3 Day Cycle/Time/Schedule system used in Majoras Mask figured out. I've been puzzling over it (since I got UDK) for I think a couple weeks now and my puzzlers sore. I've been looking into how to make a figure follow an exact path at an exact time in 3D space smoothly and not robotic like. Do note that this will be my first time programming in 3D but not in programming. From what I've been researching into, it seems that bezier curves are what I ended up needing but I'm having trouble fixing problems that I'm foreseeing. Oh and a note, I haven't actually written or done anything on it yet I'm trying to see if its possible/iron out kinks before I start. And as such I'm looking more for the logic and how it works than actual code though I won't turn it away. I'm trying to understand it so I can do it myself ultimately.
Here's what I've been puzzling:
1) How do I create the path? 2) Do I create specific lengths, say 10 ft segments, with a variable rate of speed? But that wouldn't work if I need quick changes in direction. I would also need to figure out every individual time speed up or slow down while they work through it. 3) Do I create specific lengths of time, say 10 seconds, with a variable rate of distance? This seems to work but then, if for example I had some guy have a 15 second path he would have one 10 second path and one 5 second path. For the 5 second path he would finish it then just stand there till time was up wouldn't he? Or maybe take twice as long to finish it? How do i solve for that? And it still has the quick direction change issue though not as much. 4) Another issue I have is if I build them around following a path how would I get them to turn with it? If I go with what I've got I foresee them doing something akin to T-posing facing one direction and not rotating but still following the path. 5) If bezier curves are not the way to go, what is?
I'm learning everything as I'm going along and in a piecemeal fashion so I'm probably (definitely) missing some things but I want to work through them and figure this out. It's something I would really like to accomplish. So, how would I do this or in what direction should I be pointed to figure this out?[/QUOTE]
First time programming in 3d, I would go with Unity engine honestly. It's very good and very easy to learn, and much much faster and easier to develop then in Unreal. Also, UnrealScript is being dropped in the next release of Unreal Engine and UDK, so kind of a waste of time learning it.
Anyway, you could create the path with a series of 3d points and then lerp the position between them smoothly.
I'm having some issues with my Visual Basic Hitman Absolution disguise replacer. It's crashing for everybody with an error, but it doesn't crash for me or one of my friends. I've had 2 or 3 people testing the program as I was making it, and the older versions has worked for them up until this latest one. The thing is, I have absolutely no idea what has changed about it that is crashing for everybody except me and my friend.
Here's the .exe. I downloaded it myself and it works fine, but it produces an error immediately on launch for others. [url]http://filesmelt.com/dl/Hitman_Absolution_Disguise_Replacer.zip[/url]
I don't like asking to fix it, but I just have absolutely no idea what's causing it or where to start. The program works by asking you for your Hitman: Absolution folder, you pick it, then it finds out where the disguise files are and backs them up, then you can replace disguises from two lists. Here's the very sloppy source: [url]http://pastebin.com/ePbS6LVc[/url]
This is the error someone reported. I can't replicate it.
[quote]Description:
Stopped working
Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: R2YSTZHANATYT4GAUVIG4TSWMRGOAOUU
Problem Signature 02: 1.0.0.0
Problem Signature 03: 50f74ba6
Problem Signature 04: Hitman Absolution Disguise Replacer
Problem Signature 05: 1.0.0.0
Problem Signature 06: 50f74ba6
Problem Signature 07: f
Problem Signature 08: c6
Problem Signature 09: System.InvalidOperationException
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1033 [/quote]
I need a Lua C refresher here:
Does lua_insert(L,n) shift the stack up [b]including[/b] the element at n? Because the Lua reference manual says "shifting up the elements above this index" but I'm not 100% sure that the element at n is also shifted up or is pushed behind.
I assume it is also shifted up but I just need to make sure.
[QUOTE=ief014;39262445]I need a Lua C refresher here:
Does lua_insert(L,n) shift the stack up [b]including[/b] the element at n? Because the Lua reference manual says "shifting up the elements above this index" but I'm not 100% sure that the element at n is also shifted up or is pushed behind.
I assume it is also shifted up but I just need to make sure.[/QUOTE]
[code]matthew@Matthew-Ubuntu:~/Documents/C++$ g++ -o lua_test lua_insert.cpp -llua5.1
matthew@Matthew-Ubuntu:~/Documents/C++$ ./lua_test
`stack top'
2.5
true
10
lua_insert(-3)
2.5
true
`stack top'
10
[/code]
lua_insert shifts the stack up including the element at n.
Is there any site where I can get nice, free tilesets to use in my games?
[QUOTE=A big fat ass;39261952]I'm having some issues with my Visual Basic Hitman Absolution disguise replacer. It's crashing for everybody with an error, but it doesn't crash for me or one of my friends. I've had 2 or 3 people testing the program as I was making it, and the older versions has worked for them up until this latest one. The thing is, I have absolutely no idea what has changed about it that is crashing for everybody except me and my friend.
Here's the .exe. I downloaded it myself and it works fine, but it produces an error immediately on launch for others. [url]http://filesmelt.com/dl/Hitman_Absolution_Disguise_Replacer.zip[/url]
I don't like asking to fix it, but I just have absolutely no idea what's causing it or where to start. The program works by asking you for your Hitman: Absolution folder, you pick it, then it finds out where the disguise files are and backs them up, then you can replace disguises from two lists. Here's the very sloppy source: [url]http://pastebin.com/ePbS6LVc[/url]
This is the error someone reported. I can't replicate it.[/QUOTE]
Put Try Catch expressions around areas of code which might cause problems (file handling is a good place to look), give meaningful errors so you can try and narrow down the problem.
Sorry, you need to Log In to post a reply to this thread.