<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[What is the proper way to implement an &quot;Energy&quot; system for a casual mobile game?]]></title><description><![CDATA[<p dir="auto">Most mobile games have a energy system that limits a user from being able to play constantly, so as to limit progress. This resource can usually be bought as well up to a certain number of times per day, but otherwise replenishes on a time-loop when a user doesn't have max energy.</p>
<p dir="auto">I know some ways I <em>could</em> implement this, but I'm curious what braincloud suggests as the optimal way to do this (to minimize usage) since this is a relatively common scenario? Other BaaS recognize this as such a common scenario that they have built-in functionality for this (ie lootlocker) - so assuming this is a popular use-case.</p>
<p dir="auto">Any advice? Thanks!</p>
]]></description><link>https://forums.getbraincloud.com/topic/195/what-is-the-proper-way-to-implement-an-energy-system-for-a-casual-mobile-game</link><generator>RSS for Node</generator><lastBuildDate>Sun, 15 Mar 2026 18:00:41 GMT</lastBuildDate><atom:link href="https://forums.getbraincloud.com/topic/195.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 18 Dec 2023 14:57:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to What is the proper way to implement an &quot;Energy&quot; system for a casual mobile game? on Sat, 30 Dec 2023 09:13:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forums.getbraincloud.com/uid/341">@kuabs</a> Exactly. Always use braincloud server time for features that rely on time passed. Also, if you want to modify your recharge rate during gameplay, you might want to consider keeping it in a global entity instead so every user will be affected by it.</p>
]]></description><link>https://forums.getbraincloud.com/post/588</link><guid isPermaLink="true">https://forums.getbraincloud.com/post/588</guid><dc:creator><![CDATA[Panagiotis Milios]]></dc:creator><pubDate>Sat, 30 Dec 2023 09:13:14 GMT</pubDate></item><item><title><![CDATA[Reply to What is the proper way to implement an &quot;Energy&quot; system for a casual mobile game? on Mon, 25 Dec 2023 02:57:54 GMT]]></title><description><![CDATA[<p dir="auto">Ah thanks-- and I assume the cloud Date().getTime() would be based on braincloud's servers and not the user's phone right? To prevent time-abuse. Appreciate the feedback!</p>
]]></description><link>https://forums.getbraincloud.com/post/586</link><guid isPermaLink="true">https://forums.getbraincloud.com/post/586</guid><dc:creator><![CDATA[kuabs]]></dc:creator><pubDate>Mon, 25 Dec 2023 02:57:54 GMT</pubDate></item><item><title><![CDATA[Reply to What is the proper way to implement an &quot;Energy&quot; system for a casual mobile game? on Sat, 23 Dec 2023 09:11:58 GMT]]></title><description><![CDATA[<p dir="auto">Save a (current millis) timestamp, the recharge rate and the energy available in a user entity. Everytime the player makes an action, create a method that checks if he has the available energy, consume it &amp; re-calculate the energy based on time passed from last timestamp to current. You can get the timestamp on the cloud using new Date().getTime(). Sync this process to the client for the player to see his energy.</p>
<p dir="auto">(Total API Consumption = Read + write user entity in a cloud script = 1 API call)</p>
<p dir="auto">If you want to have microtransactions upon the energy, create a virtual currency that the player can use it to buy energy. Since the energy is directly related to gameplay, i would want to keep it separately from my virtual currency.</p>
]]></description><link>https://forums.getbraincloud.com/post/585</link><guid isPermaLink="true">https://forums.getbraincloud.com/post/585</guid><dc:creator><![CDATA[Panagiotis Milios]]></dc:creator><pubDate>Sat, 23 Dec 2023 09:11:58 GMT</pubDate></item></channel></rss>