Page 1 of 1

What language is the ES collision engine written in?

Posted: Thu Feb 25, 2010 10:45 pm
by Zunedude123
What language was the Elysian Shadows collision engine written in? I know that many different languages are used in ES, but what was the collision engine made from?

Re: What language is the ES collision engine written in?

Posted: Thu Feb 25, 2010 11:07 pm
by Lord Pingas
I'm pretty sure that most of the engine is written in C++ and a lot of it is written in lua.

Collision detection most likely written in C++.

Re: What language is the ES collision engine written in?

Posted: Fri Feb 26, 2010 1:20 am
by Live-Dimension
While gyro can confirm it, LUA is hellish slow. I highly doubt that he'd write assembler for 3 different platforms, though it wouldnt surprise me. That is assuming you can even write assembler on DC/PSP. So that leaves c++. Lua would ask c++ to do collision checking with some kind of function. The core checking though would be done in pure c++ - lua is just too slow. c++ is more then fast enough for anything ES team can throw out when optimised for said platform.

Re: What language is the ES collision engine written in?

Posted: Fri Feb 26, 2010 6:49 am
by avansc
^

actually, depending on how many rigid bodies are simulated lua SHOULD be plenty fast enough to do something like that.

writing the entire collision in asm would be so marginally benificial most likely that it be better to write the core in C, and helper functions in asm. for the most part compilers are smart enough to make very good asm. i think he using bresenham in some of his calcs, and that would be a prime candidate to make in asm, its ver simple short, and there are plently little things you can do to make it faster.

Re: What language is the ES collision engine written in?

Posted: Fri Feb 26, 2010 7:06 am
by Trask
avansc wrote:^

actually, depending on how many rigid bodies are simulated lua SHOULD be plenty fast enough to do something like that.

writing the entire collision in asm would be so marginally benificial most likely that it be better to write the core in C, and helper functions in asm. for the most part compilers are smart enough to make very good asm. i think he using bresenham in some of his calcs, and that would be a prime candidate to make in asm, its ver simple short, and there are plently little things you can do to make it faster.

Ow... Avansc's posts are too smart for me to read first thing in the morning.... UGH.

I do believe that everything related to that actual game engine is NOT written in lua in ES, I believe lua is simply calling functions from the engine, so the collision itself is still in the engine. Probably in C++ as I know Gyro wanted to optimize everything using C++, but as avansc said, there are benefits with writing it in pure C.

Re: What language is the ES collision engine written in?

Posted: Fri Feb 26, 2010 8:11 am
by hurstshifter
Zunedude123 wrote:I know that many different languages are used in ES
I'm fairly certain that the entire engine is written in C/++ while the game content is accomplished via Lua. So, the answer to your question will be C/++. I'll wait for an official response from Falco though.

Re: What language is the ES collision engine written in?

Posted: Fri Feb 26, 2010 8:54 am
by Falco Girgis
avansc wrote:^

actually, depending on how many rigid bodies are simulated lua SHOULD be plenty fast enough to do something like that.
Absolutely not. An interpreted language running on a 200mhz SH4 and 330mhz PSP? No.

At the moment, it's pretty ugly/optimized C. Lots of helper functions (as avansc said) are going to wind up being assembly on certain platforms. Collision in ES (well, Rigid Body collision) is NOT cheap at all. Not only does every entity have to be checked against every entity (until we get broad-phase implemented later), but lots of these entities are not axis aligned, and have to get thrown into the separating axis collision algorithm, then have their points of contact calculated, THEN have the physics engine calculate resolution values to be applied to each body.

Ontop of that, we're going to be doing some freaky shit to check Rigid Bodies against tile collisions. It's going to be relying heavily on Bresenham raycasting to determine potentially colliding tiles to be sent to the collision detector.

Re: What language is the ES collision engine written in?

Posted: Fri Feb 26, 2010 8:56 am
by avansc
GyroVorbis wrote:
avansc wrote:^

actually, depending on how many rigid bodies are simulated lua SHOULD be plenty fast enough to do something like that.
Absolutely not. An interpreted language running on a 200mhz SH4 and 330mhz PSP? No.

At the moment, it's pretty ugly/optimized C. Lots of helper functions (as avansc said) are going to wind up being assembly on certain platforms.
yeah in that case no, but i was thinking more along the lines of a PC, i keep forgetting this is actually a DC project at heart.