Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script table logic instead of using C++ #5

Open
moleculext opened this issue Aug 13, 2017 · 11 comments
Open

Script table logic instead of using C++ #5

moleculext opened this issue Aug 13, 2017 · 11 comments

Comments

@moleculext
Copy link

Hello,

after reading this comment from @sergiomb2, I agreed that it's not convenient to have to rebuild pinball to add new tables.
Despite tables are dynamic libs, this means that it must be compiled for each platform.

So I would like to be able to avoid the C++ part of table creation. I propose to replace it by a scripting language like LUA.

I've started to prototype this idea on my repo. You can checkout the branch lua_tables: I've cloned the Tux table to a TuxLua table and reimplement the logic in LUA for the proof of concept.
At this time it works, you can play the TuxLua table. The LUA version is 5.3.

The code needs some refactoring and some methods not used in Tux table have to be registered for LUA. Once it's done I can pull request the feature if you're interested.

Feebacks are welcome 😃
Thanks

@moleculext
Copy link
Author

2 month after, no update?
Maybe this is not the official repo?

What about the pull requests I've opened on the pinball-pinedit repo?
abandonware/pinedit#2
abandonware/pinedit#3

Thanks

@sergiomb2
Copy link
Owner

sergiomb2 commented Oct 31, 2017

hello @moleculext please reply to abandonware/pinedit#1 , basically have you tested it ? if yes where ? how ? , I'm just trying keep project alive and organize the lastest sources that pop up on internet .
Your contribution is more than welcome , tell me what to do , pinball-pinedit is in the middle of one migration from qt3 to qt4 ...
Sorry for the delays ,
Thanks

@sergiomb2
Copy link
Owner

sergiomb2 commented Oct 31, 2017

You haven't pull request master...moleculext:lua_tables ?
what is the relationship with pinball-pinedit ? , should we merge pinball-pinedit to this project too ?

@moleculext
Copy link
Author

Hi @sergiomb2,

I haven't pull request the branch because it's not ready: I've just wrapped the minimal number of method to re-implement the Tux table with logic in a lua script instead of a C++ files.

This issue is just to emphasize and propose a system to create new tables more easily. Using script without need of compiling C++ should let more people to create new tables.

What do you think?

@sergiomb2
Copy link
Owner

sergiomb2 commented Nov 1, 2017

Hi @moleculext , in reply of first comment , hopefully computer does not complain about too many work , so the question if we must recompile all every time that we change one comma , I don't care . I'm not going waste my time, to avoid recompilation of all source , the question in my comment was about the license of the tables , if they have to be spitted , because they have different licenses, but rzr haven't reply so I think we don't have any license problem so we may have all source in same repo .
About your approx with lua , "to re-implement the Tux table" what do you mean ?
I haven't finish the merge of all code of the tables because I hadn't time , but if you propose do all tables again with lua , it is welcome . we may do a branch .
What do you propose ?

I merged all pr that you send to me,
big Thanks

@moleculext
Copy link
Author

@sergiomb2
About "to re-implement the Tux table" I meant that I've cloned the original Tux table and I've moved the c++ logic to a LUA script: data/tux/ModuleTux.cpp became data/tuxlua/tux.lua

I think we can keep the two systems (c++ logic and lua logic) in order to keep legacy tables, and then add new tables with lua scripting.
I don't see the point to do all tables again with lua. I rather propose to develop new tables with lua scripting, hoping that other people would find this more easy than to recompile the whole software.

I haven't finish the merge of all code of the tables because I hadn't time

Where are these tables? In rzr repo?

@sergiomb2
Copy link
Owner

All tables are in https://github.com/sergiomb2/pinball/tree/master/data but I have not finish the organization , many things are dispersed I still got #1 to finish ...

@sergiomb2
Copy link
Owner

Where are these tables? In rzr repo?

rzr repos have 2 branches or something like at least have 2 packages https://github.com/sergiomb2/pinball/tree/pinball-data-extra , I merged all in master .

@sergiomb2 sergiomb2 reopened this Nov 9, 2017
@rzr
Copy link

rzr commented Dec 3, 2019

I am fully supportive on this, it would help for
adoptware#4

@jgengelhardt
Copy link

jgengelhardt commented Aug 7, 2022

Packaging new tables separately makes it easier to test and share new tables, which is attractive for designers more interested in game design and contributing new tables than maintaining and improving the underlying engine.

@rzr
Copy link

rzr commented Sep 13, 2022

Any preference on scripting engine ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants