1. The Start Of A Physics Engine For Euphoria
- Posted by Andy May 09, 2009
- 1347 views
- Last edited May 10, 2009
Hello All,
I was wondering if anyone was interested in helping develop a physic library for Euphoria. I'd figure this would be great for game developers as well as being useful for other things in programming. My plans for the physics libray to have collision detection, velocity, friction, car physics, have support for various geomertric types(ie box, sphere, triangle, etc). Rigid body and rag-doll physics. So is anyone interested in this? I think this will be a really cool project, and it could help Euphoria get out there, even more.
2. Re: The Start Of A Physics Engine For Euphoria
- Posted by DerekParnell (admin) May 09, 2009
- 1263 views
- Last edited May 10, 2009
Hello All,
I was wondering if anyone was interested in helping develop a physic library for Euphoria. I'd figure this would be great for game developers as well as being useful for other things in programming. My plans for the physics libray to have collision detection, velocity, friction, car physics, have support for various geomertric types(ie box, sphere, triangle, etc). Rigid body and rag-doll physics. So is anyone interested in this? I think this will be a really cool project, and it could help Euphoria get out there, even more.
oh yeah, that's right. I'll dig out my stuff and make it available for you. I started it as an exercise to showcase the v4 Euphoria capabilities.
3. Re: The Start Of A Physics Engine For Euphoria
- Posted by Andy May 10, 2009
- 1297 views
Thanks, I think this project would be really useful.
4. Re: The Start Of A Physics Engine For Euphoria
- Posted by vmars May 15, 2009
- 1253 views
Sounds great ! I would like to see a 'Wind Tunnel' simulation pgm. Put an 'object shape' into the Tunnel and see how things flow. Thanks!
5. Re: The Start Of A Physics Engine For Euphoria
- Posted by achury May 20, 2009
- 1223 views
Great!
I like hidraulics and fluid physics...
How to begin?
6. Re: The Start Of A Physics Engine For Euphoria
- Posted by Andy May 20, 2009
- 1236 views
Not entirley sure
Derek said he would release what he had, but he hasn't yet. I'm sure eventually it will be relased, and we can go from there.
7. Re: The Start Of A Physics Engine For Euphoria
- Posted by DerekParnell (admin) May 20, 2009
- 1289 views
Great!
I like hidraulics and fluid physics...
How to begin?
I've started a project called "physiceul" on the "assembla" open source development site.
https://www.assembla.com/spaces/physiceul/team
You will need to register yourself at Assembla and let me know if you want to be on the team etc ... its free of course.
I have some code files to kickstart the project.
8. Re: The Start Of A Physics Engine For Euphoria
- Posted by achury May 23, 2009
- 1223 views
assembla.com is slower than sourceforge, googlecode and any other.. Near impossible work with this system with my slow conection.
9. Re: The Start Of A Physics Engine For Euphoria
- Posted by Andy May 23, 2009
- 1198 views
I do have to admit, assembla is a bit confusing to use. I made an account, but how come I can't see any of the files, only the folders?
10. Re The Start Of A Physics Engine For Euphoria
- Posted by DerekParnell (admin) May 23, 2009
- 1219 views
sorry been very busy this week. i have some time this weekend. shall i start it up on sourceforge instead
11. Re: The Start Of A Physics Engine For Euphoria
- Posted by euphoric (admin) May 23, 2009
- 1179 views
assembla.com is slower than sourceforge, googlecode and any other.. Near impossible work with this system with my slow conection.
My experience is different. Assembla is a cheetah for me. Sourceforge is a sloth.
12. Re: The Start Of A Physics Engine For Euphoria
- Posted by Andy May 23, 2009
- 1234 views
Sourceforge would be fine for me.
13. Re: The Start Of A Physics Engine For Euphoria
- Posted by ne1uno May 24, 2009
- 1140 views
I do have to admit, assembla is a bit confusing to use. I made an account, but how come I can't see any of the files, only the folders?
its web is slower than sourceforge for me, but svn was ok. except, all the directories were empty.
maybe permissions were not set of the original files or directories?
I see 2 commit messages from the svn web page, but no file list.
14. Re: The Start Of A Physics Engine For Euphoria
- Posted by DerekParnell (admin) May 24, 2009
- 1157 views
I see 2 commit messages from the svn web page, but no file list.
I haven't uploaded the files yet. I'll be doing this in the next few hours - I'm just adding some documentation and tidying them up right now.
15. Re: The Start Of A Physics Engine For Euphoria
- Posted by DerekParnell (admin) May 24, 2009
- 1157 views
I've uploaded some files now, just so you get a flavor of the stuff I've done.
16. Re: The Start Of A Physics Engine For Euphoria
- Posted by mattlewis (admin) May 24, 2009
- 1132 views
I've uploaded some files now, just so you get a flavor of the stuff I've done.
You've got a documentation error in point3d.e:
-- point3d -- Implements 3-dimensional points namespace p3d include std/error.e public include typehelp.e --**** -- == point3D == -- The default namespace for this file is "p2d".
Matt
17. Re: The Start Of A Physics Engine For Euphoria
- Posted by achury May 24, 2009
- 1174 views
You have a made a very complex definition for point. And we are not sure will be final. Some other funcions are specific for so definition, if change in the future all will become useless. Many of those functions fit better as geometrics.e, more than physics.
I propose a more Euphoria-like aproach, for example:
Calculate distance between 2 points with
function distance(sequence a, sequence b)
a and b may be {x}, {x,y}, {x,y,z}, {x,y,z,t} (4D space-time) but allways the sequences must to have the same length
If you define a point with a complex structure you can pass to the function with something like:
print(1, distance(PointA[1..3], PointB[1..3]))
The distance of the X proyections:
print(1, distance(PointA[1], PointB[1]))
The distance for Y proyections:
print(1, distance(PointA[2], PointB[2]))
18. Re: The Start Of A Physics Engine For Euphoria
- Posted by DerekParnell (admin) May 24, 2009
- 1264 views
You've got a documentation error in point3d.e:
OMG! That's it, I'm pulling the whole system til we get a fix for this. It might take a while. Sorry about that chief.
19. Re: The Start Of A Physics Engine For Euphoria
- Posted by DerekParnell (admin) May 24, 2009
- 1197 views
Rather than messing up the EuForum, can we take these discussions over to the project site in future?
You have a made a very complex definition for point. And we are not sure will be final.
In what way is it complex? Is it the provision for OOP access that concerns you? This is optional - you can choose to use an OOP style or Procedural style of coding.
Any complexity is embedded in the library and not the way a person uses it - that is still very simple.
point2D A = p2d:new(X, Y) -- Define a point in 2d space
The v3 style would have been more like ...
sequence A = new_p2d(X, Y) -- Define a point in 2d space
which is not a whole lot different.
Some other funcions are specific for so definition, if change in the future all will become useless.
Change what? The internal definition of a point? In fact, the way I've organised things is so that we are free to change the internals as needed without having to change the API and thus force coders to update their programs.
Many of those functions fit better as geometrics.e, more than physics.
Small include files are better than large one, so rather than have one huge "geometrics.e" I thought it better to break them into component pieces - points, lines, planes, triangle, rectangle, circle, sphere, etc ...
Yes, I know that the files there relate to geometry rather than physics, but they will be needed anyway. There will also be modules dealing with vectors and matrix math as well as energy, momentum, velocity, acceleration, friction, etc ...
These are building blocks to be used as required. Large library files were almost required for v3 Euphoria but v4 frees us from many of the restrictions so we can better organize libraries now.
I propose a more Euphoria-like aproach, for example:
Calculate distance between 2 points with
function distance(sequence a, sequence b)
a and b may be {x}, {x,y}, {x,y,z}, {x,y,z,t} (4D space-time) but allways the sequences must to have the same length
If you define a point with a complex structure you can pass to the function with something like:
print(1, distance(PointA[1..3], PointB[1..3]))
The distance of the X proyections:
print(1, distance(PointA[1], PointB[1]))
The distance for Y proyections:
print(1, distance(PointA[2], PointB[2]))
Instead of ...
function p2d:distance(point2D a, point2D b)
print(1, p2d:distance(PointA, PointB)) print(1, p2d:distanceX(PointA, PointB)) print(1, p2d:distanceY(PointA, PointB))
The current setup is safer to use because it is harder to pass the wrong data to a function and is more self-documenting. If we have a single 'distance' function, errors such as
print(1, distance(PointA[1], PointB[2]))
can occur.
And by the way, using the sequence method you described above, how can the library distinguish between a point in 3D space and a 2D point with a time element?
{x,y,z} vs {x,y,t}