How to add custom donations to your game using DynamicDonations

@NinjaFurfante07 So everything works but the system is mighty slow!


Any way to make this faster? nad to change the name of the product
image

The speed of the server depends on the bandwidth you have access to on render. Also consider that the system makes the following requests:
game → DynamicDonations server → Roblox API to create product → DynamicDonations server → Roblox API to get product ID → DynamicDonations server → game

You need to edit line 105 of DynamicDonationsRender/src/routers/api/v1/index.ts

i see so i need to purchase bandwith

This tutorial was made so that everyone could run the DynamicDonations server which means using free services and finally that means minimum resources. Keep in mind that even if you speed up your server by purchasing more bandwidth, Roblox APIs’ latency will always impact the speed of the general system.

With more bandwidth you’d just speed up traffic between the game and the DynamicDonations server and the sending/receiving from Roblox’s APIs but the time they take to process requests will not be affected.

1 Like

Ok Ill keep this in Mind, I have a few questions

Whats the Latency on Roblox APIs

And is there no way to speed it up?

1 Like

It’s hard to say as it depends on how far your Render server is from Roblox’s servers so you would have to measure it by implementing additional code.

No there’s no way to speed it up, but before contacting Roblox’s APIs, DynamicDonations queries the MySQL database to check if a product of the same price was already created which (if it was) saves up 2 requests and therefore speeds up the response.

Ok thanks for your help! beautiful code and excellent response time best of the best!

2 Likes

@NinjaFurfante07 So I’ve been using this for a while now however I’m not sure why it suddenly stopped working I got a email from railway saying my credits are finished any way to bypass the railway thing?

It stopped because railway paused your database. They recently updated their free plan. You will need to find another MySQL database provider.

will this work with existing code?

The MySQL language is the same across all MySQL databases, hence as long as you configure a connection string that connects to a MySQL database, it will work.

can you make a tutorial on how to setup planet?