Lua Edu Tools beta version

Discuss Celestia's features, adaptations and Addons for use in educational environments
rthorvald
Posts: 1223
Joined: 20.10.2003
With us: 21 years 1 month
Location: Norway

Post #121by rthorvald » 19.05.2007, 21:05

ElChristou wrote:why not video about the object previously selectioned without the distraction of the whole UI

Hm... Just to muddle the waters here, an inline frame where one can run any celx script associated with the current object...

- rthorvald
Image

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #122by Vincent » 20.05.2007, 13:44

rthorvald wrote:Hm... Just to muddle the waters here, an inline frame where one can run any celx script associated with the current object...
Runar,

That could definitely be a great feature :) .
Active links to scripts that are associated with the current selection could be displayed along with the info+ text.

Scripts filenames could be defined in an infoScript.lua file, as images already are in the infoImage.lua file.
Here's what an infoScript.lua file could look like:
infoScript =
{

-- Scripts filenames for Sol:
Sol1 = "scripts/solarsystemtour_v1.1.celx";
Sol2 = "scripts/nineplanets_v1.0.celx";

-- Scripts filenames for Earth:
Earth1 = "scripts/EarthTour.celx";

-- Scripts filenames for Mars:
Mars1 = "scripts/MarsFlightSlow.celx";
Mars2 = "scripts/MarsTour.celx";

-- Add your own infoScript filenames here :
-------------------------------------------------------------------------------------
-- Name_of_object_followed_by_script_index = "script_filename";
-------------------------------------------------------------------------------------

}


Does it sound like what you had in mind ?
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Avatar
Adirondack M
Posts: 528
Joined: 01.03.2004
With us: 20 years 8 months

Post #123by Adirondack » 20.05.2007, 21:37

Vincent,

did you notice that the planetarium mode doesn't work properly again after the info+ feature is embedded?

Adirondack
We all live under the same sky, but we do not have the same horizon. (K. Adenauer)
The horizon of some people is a circle with the radius zero - and they call it their point of view. (A. Einstein)

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #124by Vincent » 20.05.2007, 21:50

Adirondack wrote:did you notice that the planetarium mode doesn't work properly again after the info+ feature is embedded?
Ulrich,

The planetarium mode now uses the new setaltazimuthmode/getaltazimuthmode commands that I've added very recently to CVS. So your problem may disappear after you have updated your source from CVS. Here's what I wrote in a previous post:
Vincent wrote:I've checked in a change that adds the setaltazimuthmode / getaltazimuthmode commands to Lua/celx scripting.
(see: http://celestiaproject.net/forum/viewtopic.php?p=87720) If you don't compile your own version of Celestia, you need to wait for the 1.5pre3 release (coming very soon).

So, setting alt_azimuth_mode to true in config.lua will force the Lua Tools to automatically switch to Celestia Alt-Azimuth Mode. Please note that in that case, it won't be possible to disable Alt-Azimuth Mode with CTRL+F while the Lua Tools are running (forced mode).
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

rthorvald
Posts: 1223
Joined: 20.10.2003
With us: 21 years 1 month
Location: Norway

Post #125by rthorvald » 20.05.2007, 22:25

Vincent wrote:Does it sound like what you had in mind ?

Actually, i haven??t fleshed the idea out: ElChristous comment about video just gave me the thought that it would be more natural (and economical) to feature a relevant event via a script than via a movie. But, yes, something like that...

Of course, movies are cool, too :-)

- rthorvald
Image

Andy74 M
Posts: 114
Joined: 21.07.2004
Age: 50
With us: 20 years 4 months
Location: Regensburg, Germany

Post #126by Andy74 » 21.05.2007, 07:03

Vincent wrote:
rra wrote:Too bad this option isn't available for changing in LUA or CELX scripts. I guess this is something Chris has to change in order to makes it possible. I also guess this won't be on the top-10 list of actions Chris is working on.
Ren?©,

I've checked in a change that adds the setaltazimuthmode / getaltazimuthmode commands to Lua/celx scripting.
(see: http://celestiaproject.net/forum/viewtopic.php?p=87720) If you don't compile your own version of Celestia, you need to wait for the 1.5pre3 release (coming very soon).

So, setting alt_azimuth_mode to true in config.lua will force the Lua Tools to automatically switch to Celestia Alt-Azimuth Mode. Please note that in that case, it won't be possible to disable Alt-Azimuth Mode with CTRL+F while the Lua Tools are running (forced mode).


That's great, Vincent! Thank you very much.

Andy

steffens
Posts: 162
Joined: 06.11.2003
With us: 21 years
Location: RP Germany

Post #127by steffens » 21.05.2007, 08:54

I played around with the Lua Edu Tools this weekend and think they are just amazing! Thank you for spending so much time on this project!
Some small remarks:
I had to change the language setting from "system_default" to "en", otherwise Celestia would hang on loading the luahookinit script. I can't remember the exact error message, but it was a nil dereference problem with variable n1 (?). My system language is set to German (de).
Another problem I had was using the AmbientLight slider. No matter how carefully I moved my mouse, I was not able to set the ambient light to a value < 0.06, it always jumped back to 0.10

steffens

Avatar
Adirondack M
Posts: 528
Joined: 01.03.2004
With us: 20 years 8 months

Post #128by Adirondack » 21.05.2007, 10:32

Vincent wrote: ...So your problem may disappear after you have updated your source from CVS...
Yep. Thanks.
We all live under the same sky, but we do not have the same horizon. (K. Adenauer)

The horizon of some people is a circle with the radius zero - and they call it their point of view. (A. Einstein)

Avatar
Adirondack M
Posts: 528
Joined: 01.03.2004
With us: 20 years 8 months

Post #129by Adirondack » 21.05.2007, 10:35

steffens wrote:I had to change the language setting from "system_default" to "en", otherwise Celestia would hang on loading the luahookinit script.

"system default" works fine on my WIN32-machine. What OS do you use?

Adirondack
We all live under the same sky, but we do not have the same horizon. (K. Adenauer)

The horizon of some people is a circle with the radius zero - and they call it their point of view. (A. Einstein)

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #130by Vincent » 21.05.2007, 10:40

Andy74 wrote:That's great, Vincent! Thank you very much.
Adirondack wrote:Yep. Thanks.
steffens wrote:I played around with the Lua Edu Tools this weekend and think they are just amazing! Thank you for spending so much time on this project!
Andreas, Ulrich, Steffens, you're welcome !

steffens wrote:Some small remarks:
I had to change the language setting from "system_default" to "en", otherwise Celestia would hang on loading the luahookinit script. I can't remember the exact error message, but it was a nil dereference problem with variable n1 (?). My system language is set to German (de).
I recently fixed a similar bug that only happened on Mac. What is your OS ? Have you downloaded the latest version of the Lua Edu Tools(updated on 20/05) ? It includes a German localization. If you're not a Mac user, your system locale (= German) should be automatically detected.

steffens wrote:Another problem I had was using the AmbientLight slider. No matter how carefully I moved my mouse, I was not able to set the ambient light to a value < 0.06, it always jumped back to 0.10

That sounds really strange. What is your screen resolution ? Have you noticed a similar issue with the FOV slider ? I mean, do you get a correct maximum FOV value of 120?°00'00'' when the slider is completely left ?
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

steffens
Posts: 162
Joined: 06.11.2003
With us: 21 years
Location: RP Germany

Post #131by steffens » 21.05.2007, 11:00

Vincent wrote:
steffens wrote:Some small remarks:
I had to change the language setting from "system_default" to "en", otherwise Celestia would hang on loading the luahookinit script. I can't remember the exact error message, but it was a nil dereference problem with variable n1 (?). My system language is set to German (de).
I recently fixed a similar bug that only happened on Mac. What is your OS ? Have you downloaded the latest version of the Lua Edu Tools(updated on 20/05) ? It includes a German localization. If you're not a Mac user, your system locale (= German) should be automatically detected.
The version I tested did not include german localization yet. My OS is Debian Linux 4.0 (Etch).

Vincent wrote:
steffens wrote:Another problem I had was using the AmbientLight slider. No matter how carefully I moved my mouse, I was not able to set the ambient light to a value < 0.06, it always jumped back to 0.10
That sounds really strange. What is your screen resolution ? Have you noticed a similar issue with the FOV slider ? I mean, do you get a correct maximum FOV value of 120?°00'00'' when the slider is completely left ?

My screen resolution is 1280 x 1024. I'll download the latest version of the Edu Tools as soon as I find some time and check the FOV slider as well.

steffens

Sui Ota
Posts: 75
Joined: 05.10.2005
With us: 19 years 1 month
Location: Saitama, Japan

Post #132by Sui Ota » 27.05.2007, 03:10

Playing with the Lua Edu Tools, I found a bug:

When I go to surface of an object, then I enabled compass, the display of the Tools behave strangely. :(
This occurs only just after launching Celestia; Going to surface after enabling compass has no problem.
-Suι

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #133by Vincent » 27.05.2007, 17:18

Sui Ota wrote:Playing with the Lua Edu Tools, I found a bug:

When I go to surface of an object, then I enabled compass, the display of the Tools behave strangely. :(
This occurs only just after launching Celestia; Going to surface after enabling compass has no problem.
Sui,

You're propably reporting the the same problem as Adirondack:
Vincent wrote:
Adirondack wrote:did you notice that the planetarium mode doesn't work properly again after the info+ feature is embedded?
Ulrich,

The planetarium mode now uses the new setaltazimuthmode/getaltazimuthmode commands that I've added very recently to CVS. So your problem may disappear after you have updated your source from CVS.


The bug should disappear after you have updated Celestia to 1.5pre3.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Sui Ota
Posts: 75
Joined: 05.10.2005
With us: 19 years 1 month
Location: Saitama, Japan

Post #134by Sui Ota » 28.05.2007, 13:58

Vincent wrote:The bug should disappear after you have updated Celestia to 1.5pre3.

I just tested latest CVS and latest Tools, but this bug still exists...
with Mac OS X 10.4.9, OS X version of Celestia (Lua 5.1 implemented)
-Suι

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #135by Vincent » 28.05.2007, 15:11

Sui Ota wrote:
Vincent wrote:The bug should disappear after you have updated Celestia to 1.5pre3.
I just tested latest CVS and latest Tools, but this bug still exists...
with Mac OS X 10.4.9, OS X version of Celestia (Lua 5.1 implemented)
Sui,

You were right, there was indeed a bug, and it should be fixed now.
The link to the latest update is in my signature.

steffens wrote:I had to change the language setting from "system_default" to "en", otherwise Celestia would hang on loading the luahookinit script.

Then, Steffens just confirmed me via PM that the system locale is now correctly detected on Linux too. So, I think that we're very close to v1.0 now... Besides, it's time to start a fresh new thread... :wink:
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #136by Vincent » 30.05.2007, 13:00

Hi,

I've completed the toolBox with a Magnitude limit/AutoMag at 45?° slider.
The slider automatically detects whether AutoMag is enabled or disabled, and switches to the corresponding min-max values (1-15 when AutoMag is off and 6-12 when AutoMag is on). This way, the whole slider frame width is still available.

- with AutoMag Off:
Image

- with AutoMag On:
Image

Do you think that we should better remove the automag renderflags from the rendering options and replace it with an automag active button under the magnitude slider ?

Finally, editing the Lua Tools is now getting quite easy: it only took me about 30 minutes to code such a slider, since only the Min/Max values were needed. All the rest was already coded within the slider class...
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Avatar
Adirondack M
Posts: 528
Joined: 01.03.2004
With us: 20 years 8 months

Post #137by Adirondack » 01.06.2007, 09:43

Vincent wrote: Do you think that we should better remove the automag renderflags from the rendering options and replace it with an automag active button under the magnitude slider ?
If you want my 2 cents: No!
We should keep the panel as clear as possible (not too much buttons). The panel is made to be used by beginners and pupils.

Adirondack
We all live under the same sky, but we do not have the same horizon. (K. Adenauer)

The horizon of some people is a circle with the radius zero - and they call it their point of view. (A. Einstein)

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #138by Vincent » 01.06.2007, 10:40

Adirondack wrote:
Vincent wrote: Do you think that we should better remove the automag renderflags from the rendering options and replace it with an automag active button under the magnitude slider ?
If you want my 2 cents: No!
We should keep the panel as clear as possible (not too much buttons). The panel is made to be used by beginners and pupils.

Adirondack


Yes, that's also my philosophy. Let's keep the toolBox as simple as possible.

So, ready for v1.0 ?
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Avatar
dirkpitt
Developer
Posts: 674
Joined: 24.10.2004
With us: 20 years

Post #139by dirkpitt » 03.06.2007, 15:14

Mouse clicks are behaving strangely with latest Edu tools installed and Celestia 1.5.0pre3 (also happens with current CVS). Window size is small enough such that Lua tools is disabled at startup. Celestia is a default setup apart from the Edu tools being installed.

Steps to reproduce issue:
1. Start Celestia.
2. After Celestia goes to Earth, type Moon into the console, and use 'g' to goto the Moon.
3. The moon will be selected and visible, but mouse drags do not work any more. Clicking outside the moon does not deselect like usual.

This only seems to happen with Edu tools installed. I can reproduce it on both Windows and Mac OS X.

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #140by Vincent » 03.06.2007, 17:09

dirkpitt wrote:Mouse clicks are behaving strangely with latest Edu tools installed and Celestia 1.5.0pre3 (also happens with current CVS). Window size is small enough such that Lua tools is disabled at startup. Celestia is a default setup apart from the Edu tools being installed.

Steps to reproduce issue:
1. Start Celestia.
2. After Celestia goes to Earth, type Moon into the console, and use 'g' to goto the Moon.
3. The moon will be selected and visible, but mouse drags do not work any more. Clicking outside the moon does not deselect like usual.

This only seems to happen with Edu tools installed. I can reproduce it on both Windows and Mac OS X.

DW,

Thanks for reporting this bug. I can indeed reproduce it when I set show_lua_edu_tools to false in the config.lua file or as you mentioned, when the Lua Tools are disabled at startup because the size of the Celestia-window is too small.

This began to happen when I added a "clickable" option to the Lua boxes, and because the Lua Tools need at least one tick to update the bounds of the main Lua Window (screenBox).

The bug should be fixed now:
http://vincent.gian.club.fr/celestia/Lua_Edu_Tools.zip

Please let me know if everything is OK on your system(s) now.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3


Return to “Celestia in Education”