3D in Hopscotch!?



Hi Hopscotchers!
Currently, i'm working on displaying 3D in Hopscotch. I know what i've got to do, but the only problem is that there are to few "individual values" in Hopscotch. Does anyone know any way to get around this?


I think it could be very, very great!
Nice idea


What do you mean by too few individual values?


Do you mean too few clone dependent values like speed, angle, x and y pos, etc?


@BuildASnowman, yep!

When using clones, they have a couple of values of which they have a completely individual value of. These are X Pos, Y Pos, Speed, Rotation, Size and Invisibility percent. Since I want a relatively high resolution and relatively high FPS, i've chosen to use clones to simulate a couple of pixels each. To do this, I want to simulate that they move away from the player and then see if they hit anything. To do this, I would need at least (very very least) one individual value for the clone to remember which pixel(s) they are simulating/drawing, and a couple to calculate a "pixels" movement away from the cameras position. Sorry if this was completely impossible to understand :sweat_smile:


So, one solution to your problem would be the ability to store multiple values in one of those clone variables, right?


I understand.


Yup. Only problem with that would be the delay caused by the need to separate the two or more different numbers...


I think I get it... Would the new math blocks help at all?


Yup, they would :D
Now that you mention it, I think they would be really useful!


Yeah. I've tried to work through this problem before - not only does there seem to be no formula to collapse n arbitrary integers into 1 integer, even the algorithms that can are greedy and slow, which wouldn't work. Have you made any progress so far? I've never found a solution for this type of problem before...

Also, can I hear a bit more about this project? How are clones of a certain object representing multiple pixels? I've always been really interested in 3d in Hopscotch, but haven't really gotten anywhere before.


I've not made any project yet, i've just been thinking about and planning it. What I am planning to do is to have an object create some clones (just to increase the speed of the rendering, if hopscotch would have the ability to make your own blocks and have them processed "instantly" I could have one object rendering the whole screen with a higher resolution) which represents a few pixels each (just to be able to have a higher resolution than 22x22). Then I would make them simulate that they are moving away in different directions from the camera position until they have reached a distance away from the camera that is bigger than the preset render distance. They would always hit test their simulated X, Y and Z position and see if they were touching any object. Then they would draw a pixel at their position in the "picture" and draw a pixel of the right color.


@BuildASnowman, I've started creating the project and iv'e come pretty far, although it takes a while (1 to 3 seconds on an iPad Pro) for each pixel to calculate/check what to draw and then draw it. At the moment, the "resolution" is 22x22 (about 480 clones), and each clone is drawing and calculating one pixel.
I am probably going to publish the project soon.
(The reason I tag you is that you told me you are interested in 3D in Hopscotch)


Amazing. Could you publish your work so far? I'm pretty good when it comes to optimization (no promises though :P)


Yes, I will :D
I am just gonna work some more on it.


Sounds good. I am really itching to see what you've done!


At the moment, i'm having some problems with it, but I think i'll be able to fix it.


@BuildASnowman, i'm sorry I haven't uploaded it, but it has got some big problems. Tell me if you want me to upload anyways.


Upload anyways and describe what the problem is - perhaps I can help :smiley:


Is it okay if I just give you a link?