»jabjabjab Posted September 14, 2011 Author Report Posted September 14, 2011 I figured the rectangle part, and drake i absolutely do not understand a single statement you said. I can grab the center x and y coordinates from any rectangle (be it the ship's collision box, or the tile, at any given point of time. The problem is im using a list-for loop for asking if the rectangle intersects the collisionbox and going from there on absolute value'd distances from the ship to the tile. Quote
Drake7707 Posted September 15, 2011 Report Posted September 15, 2011 Path-rect collision of tilehttp://i.imgur.com/zpemY.png Rectangle tree (using spatial subdivision algorithm) for multiple rect-rect collision of tile (Although what I drew is not an octree, this article on Octrees shows how spatial subdivision works)http://i.imgur.com/3qWvy.png The path has the advantage of being able to calculating the normal for semi accurate bouncing. Using bezier curves or splines for the path rather than line segments by interpolating the normal between 2 points of an line segment would yield an even better bounce vector. Edit: oh heyo, http://help.eclipse..../PointList.html has an intersect method for exactly that. Quote
»jabjabjab Posted September 16, 2011 Author Report Posted September 16, 2011 Here's the thing: I have collision DETECTION working fine. The problem is how to determine which speed to flip, such as X and Y speed going up down Lefr Right When you bump a tile you obviously dont go down if you hit it's left side, unless you were already going down to begin with. Im using X, Y, momX, and momY variables for the ship to run. Quote
»jabjabjab Posted September 16, 2011 Author Report Posted September 16, 2011 Well I have collision reactions mostly done; it is still buggy but does basically almost all of what it needs to do as far as bouncing. I am working on weapon bounce detection etc. Quote
»Maverick Posted September 16, 2011 Report Posted September 16, 2011 jabjabjab, do you need some webspace to publish your client?I can give you webspace under *.sshq.net or *.ss-network.net. I'm interested in helping programming your client. Can you publish your source files in a source code repository? Idea; publish the source files in a subversion repository in your own webspace (under sshq.net or ss-network.net). Quote
»jabjabjab Posted September 16, 2011 Author Report Posted September 16, 2011 I would love to get as much help on my client as possible, and Yes I do need webspace. To be honest here I have never done repositories before, so please help me out here i lack in teamwork-development. Also, I will keep a steady focus on this client, because when it came to observing discretion's progress, the idea of helping out and teamwork seems lacking, and I will not rely on people to get this client done, however I will remain open to those who wish to contribute to it. My Skype: TheMcJabbarMy MSN: JoshuaEdwards911@msn.com Quote
»doc flabby Posted September 17, 2011 Report Posted September 17, 2011 (edited) Funny thing this is exactly where I got stuck with my subspace2 client. Collision Outcomes (what happens when a collision is detected) Detecting collisions is easy...its working out what happens afterwards is whats hard...Network Latency (taking into account ping times etc for collision detection) If anyone can crack either of these (and its defiantly possible...because it happens in ss, its just hard to find decent information anywhere about how to do these well (like in subspace) Its a bit like a secret no one wants to tell Edited September 17, 2011 by doc flabby Quote
»jabjabjab Posted September 17, 2011 Author Report Posted September 17, 2011 (edited) Well I do have it making decisions now, it's just sometimes the player gets stuck into the side of it, or sometimes goes through (but very rarely). I almost have that down. You know what I just thought... Okay guys if you remember the warptile bug (the extra tile found back in 2005 by Overburn, Hoblin Goblin's brother), that when touched with another tile on a certain axis, the check was made before the collision for warping, and then the axis side of that tile was sortof mutated with that warp. I think this explains very well that in the collision process, the player is brought back just enough to not have a multiple collision issue Im having. yay! An example of this bug is in ?go WarpBug in TW. Edited September 17, 2011 by jabjabjab Quote
Drake7707 Posted September 17, 2011 Report Posted September 17, 2011 Well I do have it making decisions now, it's just sometimes the player gets stuck into the side of it, or sometimes goes through (but very rarely). I almost have that down. That's because the ship was already overlapping with the wall, inverting the velocity without moving the position to touch the wall would yield a collision each loop, making the velocity vector oscillate and thus getting stuck in the wall. You have to account for the difference between touching the wall and the amount of overlap, say delta x (dx) then invert the velocity of x, then add that dx * velocity x to the current position. That would give the correct position of the ship Quote
JoWie Posted September 17, 2011 Report Posted September 17, 2011 (edited) Well I do have it making decisions now, it's just sometimes the player gets stuck into the side of it, or sometimes goes through (but very rarely). I almost have that down. That's because the ship was already overlapping with the wall, inverting the velocity without moving the position to touch the wall would yield a collision each loop, making the velocity vector oscillate and thus getting stuck in the wall. You have to account for the difference between touching the wall and the amount of overlap, say delta x (dx) then invert the velocity of x, then add that dx * velocity x to the current position. That would give the correct position of the ship I showed this, but it had a typo:http://www.subspace.co/topic/25999-subspace-java-client/page__view__findpost__p__278325 Edited September 17, 2011 by JoWie Quote
Cheese Posted September 17, 2011 Report Posted September 17, 2011 make sure you have a bonk noise ~BONK~ Quote
JoWie Posted September 17, 2011 Report Posted September 17, 2011 And jitter when you hit a wall Quote
»jabjabjab Posted September 17, 2011 Author Report Posted September 17, 2011 Besides some tidtying up on the tiles position to the player (collision basically works), Im worried now a little much so about the background. I need to find an effective way to work with this. From what I've observed, something in the map gives a seed for the background to render the way it does with things in place. How would I go about doing this? random for-loops take too long. Quote
JoWie Posted September 18, 2011 Report Posted September 18, 2011 Are you talking about the random stars and planets in the background? You would probably need a random number generator with low-discrepancy (quasi-random).Preferably you would want one that does not require you to keep a state, only a seed and an index. Like halton, van der Corput, etc. This way you do not have to store stars for the entire map Quote
Avast Posted September 20, 2011 Report Posted September 20, 2011 Aphelion - Astronomy . The point in the orbit of a planet or a comet at which it is farthest from the sun. Definition might have helped people like the name more. Explains why the title was dark too. But still not in favor of Aphelion, my proposal was Javaspace, something simple and direct. lol Maybe need some type of more Arcade name, or adventurous name, and a title that provokes fun, rather than the next Event Horizon movie. Quote
»Lynx Posted September 20, 2011 Report Posted September 20, 2011 The name will come eventually, I don't see why it matters. Everybody will just call it Subspace anyway. :-P Quote
»jabjabjab Posted September 20, 2011 Author Report Posted September 20, 2011 Right now I'm just focused on getting entities made, then fixing them to do what they do... (sleepytime) Quote
»jabjabjab Posted September 21, 2011 Author Report Posted September 21, 2011 http://i.imgur.com/kYVYK.png that is all... Quote
VanHelsing Posted September 21, 2011 Report Posted September 21, 2011 The devil is in the details, man. Quote
»jabjabjab Posted September 22, 2011 Author Report Posted September 22, 2011 Organizing the code, Doccing and commenting it, trying to fix the jvm crash issue i've had for a while (when not running in eclipse's debug mode) and then trying to throw something out there for people to play with and spot stupid things. Quote
»jabjabjab Posted September 25, 2011 Author Report Posted September 25, 2011 Taking a short break. Quote
Drake7707 Posted September 25, 2011 Report Posted September 25, 2011 A break; ? better jump right back in that loop or you'll terminate. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.