Hi all.
As a fan of Elite on the c64 (yes, showing my age) and the kind of buggy Frontier on the Amiga 500, I was quite pleased to discover Oolite, and then went out of my mind with joy when I found Pioneer. So let me say first, congratulations on a wonderful game. Quite the achievement for a volunteer effort. As I was saying to nozmajner (who made feel quite welcome on IRC) it feels like quite a polished game.
I now have the source and managed to compile it quite nicely on VS Community 2017. Given I haven't coded in years, that has taken me to the limits of my knowledge for now. However I do want to start modding as there are some aspects of the game I want to experiment with. I am taking a bit of inspiration from the game "Objects in Space" from Flat Earth (saw it at PAX Australia last year). Which brings me to my plea for assistance....
I want to make a hardware flight console that will have displays and controls with some Arduino microcontrollers behind it. It uses serial comms through a USB. I would like to simply add a C++ class (and I have done) to handle the comms, but I don't know how to access those functions via the LUA scripting (which is something I've never seen before). Is there some documentation on how LUA works with the C++ code in Pioneer? Phase one is getting the heading value on the centre reticule to display on a 4 digit 7 segment LED. I have found the correct spot in game.lua, and messed with it a little, but I don't have any idea how to call the Serial C++ functions from there.
In return for all the wisdom I hope I get, I'm quite happy to start bringing the Wiki up to date. I have built v1.85 from github and I am quite happy to wade through the lua scripts and document how things like hyperdrive breakdowns work, or other things on request. I noticed the tutorial could use some work. :-) Given that I could use one myself, I'm happy to make one everyone can use. We'll see how much time I get to spare.
Anyway, thought I would say hi. I'm live on the east coast of Australia (GMT+10) so I probably won't bump into many of you on IRC, but the forum will work too.
Cheers, Ken.
Small amounts of introducing myself, pleading for advice, and offering assistance
Re: Small amounts of introducing myself, pleading for advice, and offering assistance
Hi again!
Seems like there's a bit of lull around here right now. Most of us hung up on other projects I guess. But don't get discouraged. Development is glacial, but glaciers carve the largest fjords.
Seems like there's a bit of lull around here right now. Most of us hung up on other projects I guess. But don't get discouraged. Development is glacial, but glaciers carve the largest fjords.
Re: Small amounts of introducing myself, pleading for advice, and offering assistance
Yeah, welcome!
IRC is usually active, except during European night.
IRC is usually active, except during European night.
Re: Small amounts of introducing myself, pleading for advice, and offering assistance
Very poetic, nozmajner.
Thanks for the welcome. I'm just nosing through the lua and c++ code bases. I'll work it out eventually, and anything from the forums would be a bonus. The ability to communicate from lua via serial ports will be a useful addition to the game.
I do have a wiki question through. I need to standardise on a version of pioneer so I can be consistent with descriptions and screenshots. I understand there is quite a bit of ui change going on. When will it be relatively stable?. I will need to base it on the downloadable exe I guess.
Thanks for the welcome. I'm just nosing through the lua and c++ code bases. I'll work it out eventually, and anything from the forums would be a bonus. The ability to communicate from lua via serial ports will be a useful addition to the game.
I do have a wiki question through. I need to standardise on a version of pioneer so I can be consistent with descriptions and screenshots. I understand there is quite a bit of ui change going on. When will it be relatively stable?. I will need to base it on the downloadable exe I guess.
-
- Posts: 1343
- Joined: Tue Jul 02, 2013 1:49 pm
- Location: Beeston, Nottinghamshire, GB
- Contact:
Re: Small amounts of introducing myself, pleading for advice, and offering assistance
Hi Ken,
Ok so the Lua <> C++ code question, I think your best hope is to try looking at something already ingame so I'll use "LuaComms.cpp" as the example.
You have a couple of functions that do stuff and a register function. The functions are exposed by mapping them to a name, this is then exposed to Lua using the "LuaObjectBase::CreateObject", or elsewhere using "LuaObjectBase::CreateClass" methods.
You can then use the named functions from Lua scripts and they will call into the C++ code you've implemented.
If you do a search for "Comms.ImportantMessage" in the /data/modules/*.lua files you'll find some examples of the exposed "ImportantMessage" function being called with 1 or 2 arguments.
No doubt Laarmen or Impaktor can explain things better and give reasons for doing things a particular way but this should at least get you started I hope :)
Andy
Ok so the Lua <> C++ code question, I think your best hope is to try looking at something already ingame so I'll use "LuaComms.cpp" as the example.
You have a couple of functions that do stuff and a register function. The functions are exposed by mapping them to a name, this is then exposed to Lua using the "LuaObjectBase::CreateObject", or elsewhere using "LuaObjectBase::CreateClass" methods.
You can then use the named functions from Lua scripts and they will call into the C++ code you've implemented.
If you do a search for "Comms.ImportantMessage" in the /data/modules/*.lua files you'll find some examples of the exposed "ImportantMessage" function being called with 1 or 2 arguments.
No doubt Laarmen or Impaktor can explain things better and give reasons for doing things a particular way but this should at least get you started I hope :)
Andy
Re: Small amounts of introducing myself, pleading for advice, and offering assistance
Thanks Andy. I'm following the trail from Serializer.cpp to LuaSerializer.cpp to luamanager etc. I've already worked out the Lua scripting, though the lack of an Engine.lua is a bit puzzling. What exactly happens when you import "Engine". One of the mysteries of the Pioneer universe.
The tricky thing is that I should only have one instance of the serial comms object at runtime, otherwise I will get mixed up gibberish to the arduino. It's going to take me a while to get it right, but it will be worth it. Eventually I will get something working and post a YouTube vid for you lot. We'll see what happens.
Ken
The tricky thing is that I should only have one instance of the serial comms object at runtime, otherwise I will get mixed up gibberish to the arduino. It's going to take me a while to get it right, but it will be worth it. Eventually I will get something working and post a YouTube vid for you lot. We'll see what happens.
Ken
Re: Small amounts of introducing myself, pleading for advice, and offering assistance
Pioneer is never "stable", and (hopefully) always in development.I do have a wiki question through. I need to standardise on a version of pioneer so I can be consistent with descriptions and screenshots. I understand there is quite a bit of ui change going on. When will it be relatively stable?.
But I don't think this should interfere with your work, it's just that more/better stuff is added, and UI is refined. As to when UI is "done", that's a question for ecraven, but I'm guessing +1 year, given the current speed, but UI isn't just moved to the new system, but so much more is added and improved.
EDIT: if there is any special part that needs to be "frozen", then check with ecraven on IRC, and perhaps he'll bump it up his to-do list.
Re: Small amounts of introducing myself, pleading for advice, and offering assistance
I'm not looking for frozen, but the pre-built UI looks quite different from the version built from the current source, notably the reticule with the delta-v indicators, and the placement of icons. I had the notion that the tutorial ought to match the pre-built exe as that is what most people would start playing (and thus need a tutorial).
So I'll ask a different question....what is the schedule (or the trigger) to update the pre-built exe?
My intention is to write a tutorial that matches the source code and release it when the pre-built exe is next released. It just makes more sense to me that way. I did note that the Flight UI manual on the wiki is already built for the "upcoming" version. Why put out a tutorial for features that are not available? It has been over three months, so I guess the schedule is not regular.
So I'll ask a different question....what is the schedule (or the trigger) to update the pre-built exe?
My intention is to write a tutorial that matches the source code and release it when the pre-built exe is next released. It just makes more sense to me that way. I did note that the Flight UI manual on the wiki is already built for the "upcoming" version. Why put out a tutorial for features that are not available? It has been over three months, so I guess the schedule is not regular.
Re: Small amounts of introducing myself, pleading for advice, and offering assistance
This is a project with basically 2-3 people doing what they can, when they can and have energy for it.
nozmajner has written tutorial and documentation when he and ecraven have discussed the features just added. The new features described are not linked yet on the wiki I think.
Personally, I really don't think it's good time management to have our most talented artist (nozmajer) and our best programmers ecraven/fluffyfreak spend time working on the wiki, which basically any English speaking player can work on, but it doesn't seem like they will. So the state of the wiki reflects what the players in this community driven project deserve, if you forgive me for sounding bitter.
Wiki aught to be worked on by those who like pioneer, but lack programming and artist knowledge.
(I myself am firmly parked on the sideline and mostly just watch others work).
There is no release schedule for the binary build, for years it's been "when robn sees there's been some commits merged, he makes a build". Fluffy want's a build at the end of each month, but I don't think that happens unless by chance, or explicitly poking robn.
And yes, the current difference between master and build, is the result of the hard efforts of ecraven and nozmajner to improve the HUD, that was started in august 2016. By that, one can extrapolate when the rest of the UI will be done.
nozmajner has written tutorial and documentation when he and ecraven have discussed the features just added. The new features described are not linked yet on the wiki I think.
Personally, I really don't think it's good time management to have our most talented artist (nozmajer) and our best programmers ecraven/fluffyfreak spend time working on the wiki, which basically any English speaking player can work on, but it doesn't seem like they will. So the state of the wiki reflects what the players in this community driven project deserve, if you forgive me for sounding bitter.
Wiki aught to be worked on by those who like pioneer, but lack programming and artist knowledge.
(I myself am firmly parked on the sideline and mostly just watch others work).
There is no release schedule for the binary build, for years it's been "when robn sees there's been some commits merged, he makes a build". Fluffy want's a build at the end of each month, but I don't think that happens unless by chance, or explicitly poking robn.
And yes, the current difference between master and build, is the result of the hard efforts of ecraven and nozmajner to improve the HUD, that was started in august 2016. By that, one can extrapolate when the rest of the UI will be done.
Re: Small amounts of introducing myself, pleading for advice, and offering assistance
That's fair enough. I'm not judging, just asking how things work around here. (Venting is good for the soul anyway).
I have been in commercial software development (business, not games) for 25 years, so I am used to a certain way of doing things. Haven't coded for a while...a long, long while (i'm an architect now), but it seems to me that an ex-developer would be the best placed to read the code, thus know how the game behaves and so put the most accurate wiki pages together. It appears I am the latest volunteer, so happy to have a crack at it, just seeing if I need to coordinate with the pioneer gods. Hopefully if I can get enough of the wiki together, then it might prompt an official build, and we'll be all good.
Toodles. :-)
I have been in commercial software development (business, not games) for 25 years, so I am used to a certain way of doing things. Haven't coded for a while...a long, long while (i'm an architect now), but it seems to me that an ex-developer would be the best placed to read the code, thus know how the game behaves and so put the most accurate wiki pages together. It appears I am the latest volunteer, so happy to have a crack at it, just seeing if I need to coordinate with the pioneer gods. Hopefully if I can get enough of the wiki together, then it might prompt an official build, and we'll be all good.
Toodles. :-)