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

Code cleanup #6

Open
jezek opened this issue May 17, 2020 · 5 comments
Open

Code cleanup #6

jezek opened this issue May 17, 2020 · 5 comments

Comments

@jezek
Copy link
Contributor

jezek commented May 17, 2020

Hello.

I'm going though the code and see many files in the codebase which are outdated. I'm talking about collection of main-xxx.c files, non compilable console in console/ dir, some duplicate z-term files, etc.

There should be some cleanup done. From documentation I've got he impression, that only x11, win and mac platforms are supported. That means that all other main-xxx files can be deleted.

The non working console can be deleted too, or is anybody using it?

I think, that every unused file should be deleted. Github is used here, so the old codes will not vanish.

What are your thoughts about this?

@Andres6936
Copy link

In my opinion you can make great progress against the cleaning and refactoring of the code using C++, obviously we must be agree with those involved in the code, if you give an endorsement, I can rewrite the modules with C++ instead of C. I know that my proposal is annoying, and I am willing to accept the resolution of the maintainers.

@jezek
Copy link
Contributor Author

jezek commented May 23, 2020

@Andres6936 I understand, that rewriting the code to other language can result in cleaner code. But It should be done as last resort, when currently used language lacks something that would be essential in near future. I think for now C is enough and rewriting to C++ would be overkill. Though, if sometimes there will be consensus to change a language, I would vote for some higher/safer multiplatform language than C++. Something like Golang, or Rust.

For start it would be great to make cleanup on file level. This means to:

  1. identify and name apps, that have to be buildable (server, client, updater, console, character editor, ...)
  2. identify and name platforms on which the above apps can be compiled (mac, win, linux, ...)
  3. identify and remove all files not needed for compilation & running.

After these steps second phase of cleanup (remove everything unused on code level) can start.
And then we can discuss language change.

That's my opinion.

@igroglaz
Copy link

Folks, you should look at modern V ( https://github.com/angband/angband ). TomeNET is based at old (3.x) version of V. So basically what could be done (better then rewrite the whole game) - is to port the game to modern version of V. It's made for PowerWyrmMAngband ( https://github.com/draconisPW/PWMAngband/
by @draconisPW ), which is up-to-date to modern V. You could look at it and try to port some stuff from there. And of course there is MAngband ( https://github.com/mangband by @flambard )... which was the original game from which TomeNET derived. It's moved towards in certain aspects, eg Android port (already working!), new networking, etc. PWMA will port modern MAng features one day too.

Ideally will be to work at ONE game engine, as @flambard said in his manifesto ( http://angband.oook.cz/forum/showthread.php?t=9826&highlight=manifesto ). Then everything will be much more effective. Eg I could take care of uni-tileset which will support all MAng variants (TomeNET included). Example, how the game look with tileset: https://tangaria.com/wp-content/uploads/2020/05/The-Sandworm-Lair.png / https://tangaria.com/wp-content/uploads/2020/05/dungeon.png . So every person will have it's circle of responsibility, which will drive us (and our variants) forward.

I mean - we all (people) and our (variants) have it's own unique features and 'strong' sides. We need to unite in our work. Basically ALL multiplayer variants are working on the same platform which got differences, of course, but basically it's the same. We need to unite.

@CBlueGH @airawan @mhirki

@Andres6936
Copy link

I support your point of view, and I have an opinion on what we should do, I propose to have the roadmap, as follows:

  • Identify components common to all forks (Tileset, Network, etc ...).
  • Separate components and convert them into modules (To avoid repeated code)
  • Integrate modules by replacing components (Using Package Manager)

The status quo of things does not allow me to carry out my plans, because we must first agree on several aspects. One of them is the use of a more favorable language, (personally I like C++, although this is a point with a strong debate, see @jezek's comment [Here]), the tools that we will use to integrate those modules once they exist (this Script came out recently: CPM, it's simple, it's elegant and easy to use).

@igroglaz
Copy link

igroglaz commented Sep 27, 2020

This is pretty good algorithm suggested by @Andres6936: ID whats common, whats should/could be moduled and make some crude prototype... Is there a tool which could help to organize this work? Lets at least start something and will see where it will go 🐻

@flambard-took @draconisPW @CBlueGH @airawan @mhirki

There is SDL2 Android client which already works - https://github.com/mangband/mangband-builds-android
(demo vid: https://www.youtube.com/watch?v=EMxx-WxtG5c ). I suppose all dev teams are interested in porting their game to Android... players will be really grateful for it. It could be a common denominator for this project.

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

3 participants