Author
|
Topic: My Game So Far (Read 22281 times)
|
|
Dean
Guest
|
Well, I WAS registered, then promptly forgot my password. Does that make you feel better?
Seriously, this is INCREDIBLE work. Once you whack it on PlanetSourceCode.com and SourceForge.net I can assure you that the tips, suggestions, praise and marriage proposals will come flooding in .
- Dean
|
|
|
Logged
|
|
|
|
TiLT
*Smell* controller
Offline
Gender:
Posts: 260
To boldly go where no Spathi has dared go before
|
I'm eagerly reading this thread every day. I'm just the kind of poster who almost never posts. I'm sure there are plenty others like me.
|
|
|
Logged
|
|
|
|
harth1026
*Many bubbles*
Offline
Gender:
Posts: 142
|
I too am working on an SC style game. And I eagerly await the day that I can present cool stuff like you did. Keep up the good work.
|
|
|
Logged
|
|
|
|
Deus Siddis
Enlightened
Offline
Gender:
Posts: 1387
|
"I'm eagerly reading this thread every day. I'm just the kind of poster who almost never posts. I'm sure there are plenty others like me."
Yes, like me.
I've been watching this thread, but have not posted on it because I'm on a posting diet. My profile says I post an average of 3 times a day, which is like 10 times more than the other profiles. This would seem to indicate that I have no life, so in order to get one I must lower my average. The problem is that by analyzing the post counts of profiles I have again given a boost to the theory that I am lifeless.
So you see, I think your game looks interesting, but I'm just really busy fighting for my life.
|
|
|
Logged
|
|
|
|
|
|
meep-eep
Forum Admin
Enlightened
Offline
Posts: 2847
|
About hardware acceleration (both graphics and physics), a plane in 3D will be 2D, and as such there may be some opportunities to make use of 3D acceleration. Just set the z coordinate to 0. Now the question is how much you'll actually win by that, as there will be extra calculations on the z coordinate which are unnecessary.
I’m pretty sure the bulk of the physics processor will be dedicated to matrix math, since most of the 3D engines I have run across have relied heavily on matrixes. My game does not have a single matrix in it so accelerating matrix math is a moot point. By going down to 2D physics I eliminate a lot of operations. For Addition and Subtraction operations the cost is 2/3 of 3D. With dot product the cost is 3/8 of 3D. So in the end a 3D engine does a lot more calculations then a 2D one. It may involve more operations, but dedicated hardware would do this much faster, and it could possibly do multiple operations in parallel. I didn't expect you to use matrices, as it is more managable without them then it would be in 3D, but it would still have its advantages conceptually.
Though I like speed and all I’m writing this game not to be blazing fast but to be understandable. In my game’s source code you will rarely see variables like c1 or FL2d. It ends up making some rather long lines of code but you will be able to know what its doing without having to look up the variables. Short variable names aren't going to make a compiled program run more slowly. It may give the programmer a bit more speed, but that benefit will be lost if someone has to read the code lateron. Though overly long names aren't going to help readability either (using "arrayIndexIterator" instead of "i" for instance).
|
|
|
Logged
|
“When Juffo-Wup is complete when at last there is no Void, no Non when the Creators return then we can finally rest.”
|
|
|
Arne
Enlightened
Offline
Gender:
Posts: 520
Yak!
|
It's looking promising. I'm a big fan of SodaPlay so joints and little colliding stuff is very appealing to me. I have an SC project aswell, but it's on ice for the moment cuz I'm busy with other stuff. Links: (1|2|3)
|
|
|
Logged
|
|
|
|
|
JonoPorter
Enlightened
Offline
Gender:
Posts: 656
Don't mess with the US.
|
Hi guys it’s been I while since I posted and thought you would like to know what progress I’ve made. I’ve completely rewritten the collision detection and reaction again. This is because of some problems I was having, were impossible to fix with the old version. The more recent version is actually a lot faster as a result and the code is a lot cleaner, since I put a lot more thought into it. Tomorrow I plan on finish up the resting forces then start working on a tunneling algorithm.
Basically tunneling is when an object is going to fast that in a single time step it passes though another object with no collision being detected.
The way SC2 seams to solve this problem is having a max velocity (I’ve not actually looked at the code). The problem is that I don’t want to put in a max velocity like SC2. A typical way, I have found, to fix this is find all the object that are moving to fast and run multiple time steps on them so no collision can be missed. There are other ways but they all assume that the object the high velocity object will collide with is not also going at a high velocity. The reason for this seems to be that most engines and games assume gravity will always be a constant acceleration in pointing down towards a floor that will stop an object’s motion. They also assume that there will always be a frictional force causing an object to decelerate. As a result they seem not to worry about 2 high velocity objects running into each other. I do, because in space there is no floor to run into and next to no friction. So you can have 2 spaceships going at extremely high velocities fly right through each other.
If you managed to understand what I’m talking about maybe you can help me figure out an algorithm that will work or tell me where I can find one.
I would be really grateful for any help.
|
|
« Last Edit: September 28, 2005, 08:34:20 am by BioSlayer »
|
Logged
|
|
|
|
|
harth1026
*Many bubbles*
Offline
Gender:
Posts: 142
|
The only thing I can think of is probably very ineffiencient, but might not be too bad if you only have two ships to worry about.
For each frame... if ship velocity or angle have changed Calculate the current path for each ship. Find the coordinates where the paths intersect. Determine from the path information if they will be at that point at the same time. if the time they intersect is equal to or less than the current time Collision!!!
Something like that... If I took the time to try programming it I could probably figure out if this'll work or not.
|
|
|
Logged
|
|
|
|
JonoPorter
Enlightened
Offline
Gender:
Posts: 656
Don't mess with the US.
|
I finally Finished up The Contact/Resting Forces and started messing around with gravity. I finally realized that with the new semi working forces I can try out some new things. So here is a screenshot of the newest test I wrote:
BTW if you were wondering what type of physics implementation I am doing its the one from this paper:
http://www.cs.ubc.ca/~rbridson/docs/rigid_bodies.pdf
|
|
|
Logged
|
|
|
|
|
|