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

TypeScript conversion #8

Open
Quasic opened this issue Jul 29, 2024 · 0 comments
Open

TypeScript conversion #8

Quasic opened this issue Jul 29, 2024 · 0 comments

Comments

@Quasic
Copy link
Owner

Quasic commented Jul 29, 2024

The ts branch has the TypeScript conversion until it produces a working game, at which time this issue can be closed. I started converting in one file (server1.ts) because it was easier for me in the beginning. Feel free to put classes in their own files. I don't know file structures for TypeScript source, yet. I put stub types at the top, which won't be needed once it connects to the client. I may make separate issues for conversion tasks that need completion, but here's a summary:

[ ] I am currently working on tileset and map conversion, which includes static and dynamic items and tokens. (Each space now uses Inv objects to hold items, just like player inventory, so some Inv errors may be part of this.) Edit: I think I finished token conversion, now. Just the Static classes to go and fixing type issues...
[ ] player.inven conversion to Inv (I am fixing a few of these as I go, too, but it's pretty straightforward)
[ ] I would like to do something with items() like I did with statics() and players()
[ ] other type errors, like string to MapCoord conversion need resolving (many just need a check to see that any out-of-bounds conditions are resolved before adding an as... if necessary)
[ ] more letters of form[letter] could possibly be filtered at the start of the serve method of the Server class
[ ] converting old syntax, such as var to let and substr calls to substring equivalents

The original server1.js was an injection hack to hijack the multi-player server request of the DB client. It would be nice if the TypeScript version could be used for single or multi-player.

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

1 participant