Sobeirannovaocc's Recent Posts

Hi, following this:

And since I had some spare time, I attempted to create a new formula for the decay. 3 considerations:
  • I wanted something that would decay faster with higher numbers, and slower for lower amounts. Something exponential with the excess amount.
  • Of course, "high" number is relative. So the formula shouldn't take as argument the absolute resources stored, but rather the excess ratio = amount you have/amount you can store (eg if you have 9M over 1M storage, you have an excess of 9).
  • Finally, our formula can't decay according to time. We can't just have something looking like Ae^(-Bt), because we don't have time memory of the previous amount.

Here is what I came up with:

v(n+1)=v(n)*exp(-v(n)/90000), v(n+1)=amount after one iteration of decay

Of course, since this tends towards zero, you need to cap it so it doesn't go below 1.

This is what your resource curve will look like if it doesn't do anything other than decay, and if you have an excess ratio of 9 (9M over 1M storage).
The decay will stop after 44 minutes.

Excess ratio of 1.5, decay in 15 minutes.

44 minutes may still be too much, you just have to play with the C=90000 constant.
Click to expand section.

import matplotlib.pyplot as plt
import math
import numpy as np

def v(u):
return u*math.exp(-u/90000)

points = 1800*30
x = np.linspace(0, points+1, points)
y = []
y.append(1.5) # we have 10 units over 1 unit storage (unit=million/billion/trillion)
found_y = False
for k in range(1, len(x)):
if y[k]<1:
y[k] = 1
if not found_y:
found_y = k

print('Last value', y[-1], 'reached after', round(found_y/30/60,1), 'minutes')
plt.plot(x, y)
plt.xlabel('ticks (30 per second) (0h30 here)')
Which you can execute here

(yes, I had fun making this)
Yes, it's the same guy sry DGUE=dfv123.
Just to clarify there was 2 issues in 1, and I don't know if they are related :
- re-assigning an already used charter
- not having an assigned location
So the already used charter, only dfv123 had it and for the My Colony servers it's not a problem but I have to delete the old entry on Coloniae
And the location problem is not specific to dfv123 and it seems to work for him now so let's hope it's fixed.
Ofc I'm ok with it !
Looking forward to the new features.
I should also update the world pages on Coloniae there is a lot to be improved...
Hey @bastecklein , another colony of DGUE got an already used charter :
I deleted the entry for the old colony on Coloniae (the guy only played 1 day) but the colony still has 0,0 coordinates and therefore can't be fetched by Coloniae :
The exact definition is :

Credits to DGUE

Here is the Coloniae endpoint for stats collection :

Put this url inside the Statistics window of your world :

and you will soon get listed on Coloniae ! See the Worlds Index here with all worlds using the service.

Note that it only works for server owners. If you play on someone else's server, ask them to add the endpoint. If you are playing on your own save, this means you have an "embedded server" so you can add it yourself.

As of 6 May 2022 this is still in the very early stages !
Here is a sample code in Python/Flask, and how to avoid CORS problems :

@api_blueprint.route('/mc2report', methods=['POST', 'OPTIONS'])
def mc2report():
if request.method == 'OPTIONS':
resp = make_response('this is the response to OPTIONS call.')
resp.headers['Access-Control-Allow-Origin'] = '*'
resp.headers["Access-Control-Allow-Headers"] = "Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With"
return resp
event = request.json['event']
sid = request.json['sid']
ses = request.json['ses']
cli = request.json['cli']
gid = request.json['gid']
aun = request.json['aun']
except KeyError:
data = request.json['data']
except KeyError:
data = {}
# do what you want
resp = make_response(jsonify({'success': True}))
resp.headers['Access-Control-Allow-Origin'] = '*'
return resp

Maybe @bastecklein you can link your post for php as well as this post in the first post above for reference
I see. @bastecklein , do you confirm that the IDs (session id, server id, game id, and all game object IDs) will always be 36 chars in length ? it looks like 16 bytes in hex representation (=>32 chars) + 4 "-", but will this remain the same ?

edit : just to know if I can put char(36) in my db, or maybe there is a better way, how did you define it yourself ?
Good idea and nice way to do it. I don't really think the size of the app would matter, or perhaps you could not include the .vpp models in the .apk, and instead require a download of all these files on first startup.

As for the slight delay after construction, just load the model when the construction starts, not when it ends, and if it's too quick to build then account for the model loading in the building time... Like have a lower limit on the time it takes to build a building, limit which is actually the average model loading time with margin. Or maybe extract a silhouette from the .vpp model to include in the building data, silhouette which would be way lighter.
Ooh ok I understand. This makes sense of course.
I have a question, I don't quite get what the "Server ID" section of the menu is for if it's sent in the stat report anyway...
Hey Bast, all of this sounds nice. I'll play around with it a bit more in the coming week.

To continue the discussion we had here, I would suggest that when creating a server, you can define a "default" or even "mandatory" endpoint for players joining the world.

For example I can create my Node.js sandalone server, and I want to monitor the activity of the players on my server. I define a default endpoint which leads to my server for example, and then all players entering my world will have this endpoint in their stats window by default. The endpoint can either be optional or mandatory to keep.

Look at this beautiful art :

(o-) is supposed to be a toggle switch

As for personal worlds (not sandalone but with other players able to connect), maybe the endpoints of the creator of the server can be put in the "default server" endpoints section but as an opt-in option
Awesome features coming up !!
if you are wanting to build a large and inclusive Universe, you can post the information publicly on the forum or elsewhere coming sooooon
Ok, I deleted the entry for HWPx9Xrt on Coloniae but also @bastecklein , DGUE will need to get a proper location and get listed on the sectors API. That's what prevents it from being listed. Also there might be other colonies in the same situation.
bastecklein said: I am guessing that charter was used by a prior colony which was deleted for inactivity, but is still listed in the coloniae database.
that's right.

I talked with DGUE and the best option is probably to delete the record in the Coloniae DB, bc with the other way he will loose his ADU data (or rather, it won't be tied to the new charter). Also, the guy we are (I am) deleting only played for 1 day so it's not a big deal.

I want to ask though how is it possible in the first place that a charter was re-assigned ? Did we reach the 1 of 218 thousand billion chance of a collision ? or is there a obscure way for the client to get the charter it wants ?
To be exact , Coloniae sync is called ADU in Coloniae and it works : (although the name is wrong, it's the name of the other colony because it's fetched from but account is correct)
Being listed on Coloniae has nothing to do with this parameter that you activate in game, it happens if you are listed on the sectors api : which is not the case for HWPx9Xrt.
In fact if you look at , it is listed as location 0,0 sector 0,0 which is a bug. This is not the first time it has happened, but it is the first time that the charter was used before by someone else
It is possible to go online from an offline game, by going into the statistics I believe
will enable the creation of a separate dedicated server application, which will allow 24/7 cloud based My Colony 2 servers in the (hopefully not too distant) future.

Nice !! Also I like the auto saving saves to cloud
Hi @bastecklein , could you please make it so that it returns if yes or no this player exists. Even returning [] is fine as long as it returns "invalid user" if the user doesnt exists (current behaviour is to return [] even if user doesn't exist)
Mmh, we should have a bug reports section


Premium Member
Member Since
September 20th, 2017
Ape Apps, LLC is an independent software development company founded in 2010 by Brandon Stecklein. Over the years, Ape Apps has published over 400 apps and games across various platforms. You can get in touch with Brandon on Twitter or by leaving a post on his wall @bastecklein
App of the Day