B4J + (B4A/B4i) = powerful!

ilan

Expert
Licensed User
Longtime User
Last edited:

ilan

Expert
Licensed User
Longtime User
I would have moved the levels data to a text file

Save/load to a list from a textfile via file.readlist/writelist good idea @Erel ;)

Just a general question if i load 1000 items to a list only to get 1 item and that list will still hold those items will it use memory? Is the right way to clear a list when you dont need anymore his content?
 

inakigarm

Well-Known Member
Licensed User
Longtime User
Like so much this kind of integration !!!

Maybe the Post name must include B4R (see @rwblinn projects ) ;-)

P.D:

Move the data to a Sqlite file (index=level) and read only current-next level
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Just a general question if i load 1000 items to a list only to get 1 item and that list will still hold those items will it use memory?
Lets say that there are 1000 levels in your game.
Each level will take about 200 bytes. So the list will take about 200k from the available ram. This is similar to loading a small bitmap.

Even if there were 100,000 levels the memory impact would not have been significant.
 

susu

Well-Known Member
Licensed User
Longtime User
@ilan , why don't you share your level maker? I'm sure you will get many amazing levels from us.
 

ilan

Expert
Licensed User
Longtime User
I offered it on the chat room few days ago and i really want you guys to make me some levels.

So i will do it but i need to improove it a little bit and i will realese it. Thanx susu :)
 

susu

Well-Known Member
Licensed User
Longtime User
I offered it on the chat room few days ago and i really want you guys to make me some levels.

So i will do it but i need to improove it a little bit and i will realese it. Thanx susu :)
I'm happy to help you make some cool levels.
 

ilan

Expert
Licensed User
Longtime User
why don't you share your level maker?

hi susu (and all community)

if you like to make me some levels (that i will add to the next update) you can use the leveleditor.

there are some rules to use it. the shape lines need to be along the triangle lines and the lines cannot touch each other.

see pic for explaination.

ex1.png ex2.png ex3.png ex4.png ex5.png ex6.png

download the JAR file (leveleditor) and start making new levels :)

please post your level code + if you would like to have it a rotated pieces level or not rotated!

btw. dont make the level to hard (or to easy) :)
 

Attachments

  • leveleditor.jar
    334.9 KB · Views: 282

mangojack

Expert
Licensed User
Longtime User
please post your level code + if you would like to have it a rotated pieces .......

and also your PayPal details for commission payments ...:D

Unfortunately I dont have PC to download and have a go .. ( maybe thats a good thing as well ...);) I,m missing my machinery already !
 
Last edited:

Peter Simpson

Expert
Licensed User
Longtime User
Here you go @ilan, one for each board just for the fun of it :cool:

levelstr = "3x3$0,4,-65536,0,0,1,1,1,0,0,0|1,6,-256,0,0,1,0,0,1,-1,0,-1,-1,0,0|2,5,-16711936,0,0,1,-1,-1,-1,-1,0,0,0|3,5,-16776961,0,0,0,-2,-1,-2,-1,0,0,0|4,4,-65281,0,0,1,-1,1,0,0,0|5,4,-7278960,0,0,0,-1,1,0,0,0|6,4,-16711681,0,0,1,-1,1,1,0,0|7,5,-8388480,0,0,0,-1,-1,-2,-1,0,0,0" '0,5,1,0|5,6,9,4,0,5|6,3,1,5,6|15,7,6,14,15|6,3,7,6|13,9,14,13|9,6,14,9|13,9,4,12,13

levelstr = "4x4$0,7,-65536,0,0,-1,0,0,-1,1,-1,1,1,0,1,0,0|1,4,-256,0,0,-1,0,-1,1,0,0|2,6,-12490271,0,0,0,1,1,1,1,-1,0,-1,0,0|3,7,-7278960,0,0,2,0,2,-2,1,-2,1,-1,0,-1,0,0|4,4,-1146130,0,0,1,0,0,1,0,0|5,7,-47872,0,0,2,0,2,-2,1,-2,0,-1,1,-1,0,0|6,4,-8355840,0,0,1,0,0,1,0,0|7,4,-5374161,0,0,2,2,2,0,0,0|8,5,-7722014,0,0,-1,-1,-2,-1,-2,0,0,0|9,4,-989556,0,0,0,-1,1,0,0,0" '6,5,1,2,12,11,6|1,0,5,1|10,15,16,6,5,10|20,22,12,11,16,15,20|12,13,17,12|22,24,14,13,17,18,22|17,18,22,17|2,14,4,2|14,8,7,12,14|7,2,8,7

levelstr = "5x5$0,7,-65536,0,0,-1,-1,-1,-2,-2,-2,-2,-3,0,-3,0,0|1,5,-23296,0,0,1,1,4,1,4,0,0,0|2,7,-1146130,0,0,0,-1,1,-1,1,-2,2,-2,2,0,0,0|3,4,-8388480,0,0,2,2,0,2,0,0|4,4,-8355840,0,0,2,0,2,2,0,0|5,6,-7876885,0,0,-2,2,-3,2,-3,-1,-1,-1,0,0|6,6,-16776961,0,0,1,0,1,1,2,2,0,2,0,0|7,4,-60269,0,0,-2,2,0,2,0,0" '35,28,22,21,15,17,35|0,7,10,4,0|15,9,10,4,5,17,15|0,14,12,0|7,9,21,7|21,31,30,12,14,21|21,22,28,35,33,21|21,31,33,21

levelstr = "6x6$0,5,-65536,0,0,1,1,1,2,0,2,0,0|1,6,-256,0,0,2,0,2,-2,-1,-2,0,-1,0,0|2,5,-16711936,0,0,6,0,6,-1,0,-1,0,0|3,4,-16711681,0,0,3,2,3,0,0,0|4,4,-16776961,0,0,-3,-2,-3,0,0,0|5,7,-65281,0,0,1,0,1,1,2,2,1,3,0,3,0,0|6,6,-23296,0,0,1,-1,1,-2,-1,-2,-1,-1,0,0|7,6,-9543,0,0,2,0,-1,3,-2,3,0,1,0,0|8,5,-60269,0,0,1,0,1,3,0,3,0,0|9,4,-7876885,0,0,-3,3,0,3,0,0" '0,8,15,14,0|15,17,3,0,8,15|21,27,20,14,21|3,20,6,3|20,3,17,20|21,22,29,37,43,42,21|37,31,24,22,29,37|24,26,44,43,31,24|26,27,48,47,26|26,44,47,26

levelstr = "7x7$0,4,-65536,0,0,2,1,0,1,0,0|1,4,-256,0,0,0,-1,-2,-1,0,0|2,5,-16711936,0,0,5,0,5,1,0,1,0,0|3,4,-16711681,0,0,0,6,-1,6,0,0|4,4,-16776961,0,0,-1,6,-1,0,0,0|5,5,-65281,0,0,6,0,6,-1,0,-1,0,0|6,4,-23296,0,0,0,5,2,5,0,0|7,4,-40121,0,0,0,-5,-2,-5,0,0|8,7,-9543,0,0,0,1,2,1,2,2,3,2,3,0,0,0|9,7,-7278960,0,0,0,-1,-2,-1,-2,-2,-3,-2,-3,0,0,0|10,4,-8355840,0,0,4,3,0,3,0,0|11,4,-8388480,0,0,0,3,-4,0,0,0" '0,10,8,0|10,2,0,10|2,7,15,10,2|15,63,62,15|15,62,14,15|16,22,14,8,16|16,56,58,16|58,18,16,58|19,27,29,37,38,22,19|37,29,27,19,18,34,37|34,62,58,34|38,62,34,38

levelstr = "8x8$0,11,-65536,0,0,1,1,1,2,2,3,2,4,3,5,3,6,4,7,4,8,0,8,0,0|1,10,-12490271,0,0,0,1,1,2,1,3,2,3,2,1,1,0,1,-1,-1,-1,0,0|2,6,-7278960,0,0,0,1,1,2,2,1,2,0,0,0|3,10,-2252579,0,0,1,1,1,2,3,2,3,0,2,0,2,-1,1,-1,1,0,0,0|4,9,-60269,0,0,2,0,2,-4,0,-4,0,-3,-1,-2,-1,-1,0,-1,0,0|5,8,-5374161,0,0,1,1,1,2,3,2,3,-2,2,-2,2,0,0,0|6,7,-8388480,0,0,2,0,2,-3,1,-2,1,-1,0,-1,0,0|7,7,-16711809,0,0,2,0,2,1,1,2,1,3,0,3,0,0|8,4,-47872,0,0,2,-4,0,-4,0,0|9,4,-8355840,0,0,2,-4,2,0,0,0" '0,10,19,29,38,48,57,67,76,72,0|10,19,29,38,39,21,11,2,0,10|2,11,21,13,4,2|38,48,57,59,41,40,31,30,39,38|40,42,6,4,13,21,30,31,40|57,67,76,78,42,41,59,57|78,80,53,61,70,69,78|42,44,53,61,70,69,42|42,8,6,42|42,8,44,42

One is illegal though ;)

tumblr_nogeczMv9K1tgck26o1_1280.jpg
 
Top