How to store massive amounts of data on HS


#1

I am creating this topic to find the best way to store lots of data through variables and creating virtual lists. I’ll take all the help I can get. I don’t have a project yet but we could get a collab account for this


#2

Imma tag @pomtl on this


#3

You don’t have to tag pomtl in a reply. You can just do it on the first post. And if you could store large amounts of data on Hopscotch, that would be groundbreaking! Sadly, I have no idea how to do this.


#4

I have a far-fetched idea:

  1. Have an object variable called x-array or whatever you like
  2. This object will have however many clones as you want values.
  3. Each one will store its value under the self variable
  4. Have another variable called Call_Clone or something of that matter (Clone Trigger won’t work since it will cause the project to be stuck in the filter)
  5. An object that needs a specific clone’s value will set Call_Clone to the Clone it needs.
  6. Each clone has a when Original Object {Call_Clone} = Self {Clone Index} set original object {Call_Clone} to zero and whatever action you need.

Hope that makes sense


#5

That could be pretty good. It seems quite simple, in fact. I’ll try putting something together.


#6

I got something. But no more than one object can call a clone at a time. @Mindcool24 @Awesome_E


#7

It looks like it works fairly well… I like the idea and it would work but the more data you have the more laggy it would get


#8

But if they were just invisible text not showing numbers and just holding a value, it shouldn’t get that laggy, right?


#9

Here’s a test. There are 4090 objects holding a number. I optimized it a little so it would run faster and it only dropped around 5 frames! @Mindcool24


#10

This is a pretty interesting concept. I have no idea how I would do it though.


#11

I haven’t looked in the code yet, but I wonder if it would be possible to use only numbers with a certain amount of digits, for example 4. (For coordinates.) Then you could store them all in a really long number. Does anyone know if there’s a maximum limit for numbers like that in hopscotch? Then, if you have just three variables, that’s the maximum number of digits in a number divided by 8, then that number multiplied by three total points you can store in a single clone.


#12

Ya it looks nice and works smoothly… Now we should find a good way to use it…
Possibly a redraw function for an art pad?


#13

I tried but I think I messed up somewhere… Will you review my code? @Hopscotcher


#14

Is there a way to assign a variable to a object


#15

Yes. Self variables.


#16

The problem is the trailing zeros don’t show up like: 0049 is just 49.


#17

I meant by multiplying by powers of ten then adding.

See here:


When I made this, I found there is a maximum of four 4 digit numbers in a row in a single variable, and took advantage of this.

You should be able to follow the math, it’s very simple.


#18

Wow! That’s really cool! I can hasn’t math.


#19

The math works on the basic fact that multiplying by a power of ten adds the same number of digits as the power the ten was raised to, so 10000 (10^4) adds four digits, and 10000000000 (10^10) adds ten digits. :slight_smile:


#20

I decided to make my own. That would still fix the bugs, right? Anyway, you can only draw one continuous line so far. @Mindcool24


Hopscotcher’s General Topic