-
Notifications
You must be signed in to change notification settings - Fork 7
migrate-examples #16
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
base: master
Are you sure you want to change the base?
migrate-examples #16
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
del me
712214f
to
13b6ff7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issues on the coin-pickup-game
static description = "A game where users can walk over coins to collect them." | ||
|
||
/** Current number of coins collected */ | ||
score = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The autospawn functionality does not work. More specifically:
serverTick is not documented and it does not seem to work. Tried also server_tick_enabled
onTimer() is not documented and it is never invoked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- When
serverTick
is set totrue
in theregisterComponent
method, it will call theonServerTick()
method every 30 seconds (we do need to document this) onTimer
is not an internal method, it seems to be called right here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah you are right on the onTimer :)
Regarding serverTick I read about it here https://developer.vatom.com/plugins/api/objects/ (search for server_tick_enabled) The thing is neither works, I tried with serverTick: true
and with server_tick_enabled: true
. I enabled the functionality in the settings but it didn't work. I am probably doing some silly mistake.
static description = "A game where users can walk over coins to collect them." | ||
|
||
/** Current number of coins collected */ | ||
score = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spawned coins are just objects and they don't have the coin component attached. This functionaly is not documented. The relevant code seems to be:
['component:' + this.plugin.id + ':coin:' + 'pickup-sound']: this.getField('pickup-sound') || this.paths.absolute('collect.wav'),
['component:' + this.plugin.id + ':coin:' + 'score']: this.getField('score') || '',
components: [
{ id: this.plugin.id + ':coin' }
]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes you are right, we need to document that structure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would be happy to document it; the only thing is that it does not work. The spawned coins are just objects and they don't have the coin component attached. Probably something changed in the API?
This PR migrates 9 of the 15 examples menionted here: https://developer.vatom.com/plugins/examples/ The two absences are Pickups and Webpack.
Although the plugin are installed, there are some issues with some of them, they have code that either is not documented in the api and/or code that does not work. I have put comments on each of them.