Jump to content

clock for credits to play logic & code


Alberto Alves
 Share

Recommended Posts

Hello everyone, first post. Hope it will be helpful...

 

I'm a new developer and managing to make my first visual novel. My framework was built on top of phaser and I'll expand it with some ready to use other phaser games framework. I wanna use a thing that many have seen in f2p games: a clock system that does not allow players to play once they have used all their credits and gives them credits for playing as time goes by. Clueless about how to implement it.

I'm not sure if I'm in the right session but I think I am because I'm up to use some javascript code for it (if it works) but better with phaser I guess...

 

Thank you all and sorry if I've made something wrong or my bad english

Link to comment
Share on other sites

If you trust the client won't hack things, you could have something as simple as a timer that counts up and applies credits to a total on a regular basis, and a total that decreases as the currency is spent in game - depending how you want to implement it.

If you don't trust the client you would want to look at a server that keeps track of those same things, and then work out how you wanted to deliver only the content that was available based on their purchases or progression etc.

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...