Orbital remake

Hello @Spirikoi. I had a look to your last version (1.1). For me the dynamics is nice to play. However a few bugs seem to have sneaked ino this version:

  • i think when a ball comes close to the line limit but does not cross it, then, sometimes, when the ball inflates after having stopped, it explodes and the game stops, while it should not! It is a bit frustating…
  • the score screen or combo screen remains present several seconds. It seems to consume a lot of fps and the game is less fluid when these screens are present.
    Due to these 2 ‘‘bugs’’ the pleasure is a bit lower in this last version, although the physics seem better.
    PS: the advantage of having your code on my repo is that you can check the number of downloads: your score is quite good (better than my own code! Congrats)

I don’t have these problems on my iPad. I think it reached the ipad 1 limit.
I changed a few things on github, tell me if it’s better or not. Although I’ve not tested it since I don’t have my ipad for the moment.

Thank you @spirikoi. I have checked your new version: it is actially better for the 2 problems i have pointed. I have added this vesion to my repo (http://jmv38.comze.com/CODEAbis/server.php#orbital) with versioning 1.1.02 because i have made 2 changes:
1/ corrected again line 133: will not work as is for codea1.5: maybe you should change it in you source? ( a<b has to be replaced by tonumber(a)<tonumber(b)).
2/ i’ve added my fps class to check where are the bottlenecks and measure them: the fps falls down to 8 to 11 fps when a big ball is inflating… I think this could be improved by coding all the graphics in a mesh (i dont think you did?). Maybe some day i’ll do it if i keep playing with the game again and again :slight_smile:

Ok, I’ve copied your modified version on github.
I don’t know how to try the 1.5 version of Codea.

In fact the physics is paused when there is no rocket moving. And I’ve removed it when I added the multiball option. That’s what slowed your ipad. I think the multiball is impossible on ipad 1 and maybe also the 2nd

I don’t think I coded the graphics in a mesh because I don’t know what it is…

Maybe you can explain me ? En français peut être ? :slight_smile:

Ooops! I had forgotten to add my FPS class tab in version 1.1.02, so if you ran it you pbly got an error. Sorry for that. I have corrected my online version now to include the missing class.
Concerning meshes… There are several tutos on how to use them on the forum. It is not really difficult, but it is a little work to understand everything. It will be easier for me just to do it in your program, and comment it once it is done. If you look at my KraizyCicles game, the lines are really meshes of a few hundred of circles, otherwise the refresh would be too long…

Ok I will update it too.

Yes I would be interested if you want to make it by yourself. Although I will take a look to your KrazyCircles first so I’ll start to understand.

Tell me when you start it.

Hi. My idea would be to make a texture image of w=400x5 by h=400 and sprite the 5 circles to it with the number 1, 2,3,4,5 inside, all white. Then each circle is a rectangle from the mesh, the colors and nunbers are set with the rectcolor and recttexcoord functions. The position and size is adjusted with the setrect functions (might not be the exact name, check the doc) This is very quick.

Hey @Jmv38, I’ve learned a bit about meshes.
But I didn’t find a command to draw circles.
It can certainly be done with many triangles, but I think it will be slower. I don’t know…
Have you an idea of what can be done?