Jump to content
SubSpace Forum Network

Recommended Posts

Posted

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.

  • Replies 391
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Posted

Path-rect collision of tile

http://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.

Posted

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.

Posted
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.
Posted

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).

Posted

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: TheMcJabbar

My MSN: JoshuaEdwards911@msn.com

Posted (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 by doc flabby
Posted (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 by jabjabjab
Posted

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

Posted (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 by JoWie
Posted

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.

Posted

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

Posted

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.

Posted
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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...