Automated way to create level datablocks?
by Luis E Pabon · in iTorque 2D · 12/21/2011 (10:38 am) · 7 replies
I have a project that is close to completion. There's a lot of levels, and they are very complex. This makes it a pain to manually set up the level datablocks.
Is there a simpler way to set them?
Is there a simpler way to set them?
About the author
#2
So we need to hire trainees to finish our games :)
This is also a good stimulation of the industry.
:(
12/21/2011 (1:49 pm)
This is utterly devastating.So we need to hire trainees to finish our games :)
This is also a good stimulation of the industry.
:(
#3
If you widely have the same datablocks the easiest way pretty surely is going into the directory and simply copy paste the whole file.
Alternatively slightly expand the level datablock editor to offer a 'copy from XXX' button so you can copy it directly from a different level.
normally though if you have that many levels you either set them up where you could add the datablocks to the level datablocks when you added their stuff to the level, or where you copied whole levels and simply could have copied the level datablock file too ...
so its often more a matter of getting the workflow up and well working for mobile targeting instead of thinking in 'we have 2gbs of ram, I don't care' TGB style.
The reason you do it manually btw is rather simple: you get full control over it! sounds like nonesense, but the reason why you have to delete the datablocks at the end of the level yourself is that you can delete what you no longer need and let the stuff remain in there thats used on the next level again to save time on unload - load, massive amounts of time actually. (something like angry bird and alike would likely load a vast majority of its blocks once in the first level and never unload them again as all birds, pigs etc are used all the time). Any automatism can only be worse to significantly worse than that (look at Unity if you want to see how bad it can get when you rely on automagic + have limited environments like a mobile)
12/22/2011 (1:09 am)
This is about optimization, not about 'it does it for us' cause if it would do that it would still be as in iTorque 1.1 etc where no level datablocks were around, where it stupidly and bruteforce style simply loaded the whole blob and then crashed on pre 3GS devices flat out ;)If you widely have the same datablocks the easiest way pretty surely is going into the directory and simply copy paste the whole file.
Alternatively slightly expand the level datablock editor to offer a 'copy from XXX' button so you can copy it directly from a different level.
normally though if you have that many levels you either set them up where you could add the datablocks to the level datablocks when you added their stuff to the level, or where you copied whole levels and simply could have copied the level datablock file too ...
so its often more a matter of getting the workflow up and well working for mobile targeting instead of thinking in 'we have 2gbs of ram, I don't care' TGB style.
The reason you do it manually btw is rather simple: you get full control over it! sounds like nonesense, but the reason why you have to delete the datablocks at the end of the level yourself is that you can delete what you no longer need and let the stuff remain in there thats used on the next level again to save time on unload - load, massive amounts of time actually. (something like angry bird and alike would likely load a vast majority of its blocks once in the first level and never unload them again as all birds, pigs etc are used all the time). Any automatism can only be worse to significantly worse than that (look at Unity if you want to see how bad it can get when you rely on automagic + have limited environments like a mobile)
#4
I was not prepared for this situation.
I have done my datablocks for the leveldesign:
ice_
wood_
castle_
so it is not so hard to workout, but it would be easier, when the level
is done, to click a button "make the leveldatablocksfile for this level,please"
12/22/2011 (3:07 am)
My problem is, that i saw this nowhere.I was not prepared for this situation.
I have done my datablocks for the leveldesign:
ice_
wood_
castle_
so it is not so hard to workout, but it would be easier, when the level
is done, to click a button "make the leveldatablocksfile for this level,please"
#5
If you use 1 file per map type you don't even need that. you can just write an extended loadlevel function that checks the name for the pattern, executes the corresponding datablock containting CS file and then loads the level or alike.
Question from my end would be how you achieved to nearly finish a game in iT2D without being prepared for it / missing it, as nothing ever loaded in the test player / on the device (as such you basically never could cross the 50% progress bar as anything beyond that progress on mobile means testing on mobile, experience it. A mouse is no acceptable replacement to experience it)
Did you potentially use TGB to create the game and then at 90% you decided to move it over or alike? (if so you might want to do further optimizations / setups as iT2D is not iTGB. iT2D 1.0 was around TGB 1.7.4 but by now there is quite some difference between the two due to the required optimizations for mobiles)
I don't ask to be mean or harsh but to find out how such situations can arise and I'm sure Garage Games would like to know that too to potentially document it better / make it more obvious that mobile = you optimize or you don't run your game (well).
12/22/2011 (3:23 am)
Actually if you work like that its relatively easy to overcome it as the editor has all datablocks loaded so you can actually extend the editor script for the level datablock editor to 'add datablocks comply to name scheme' for the current level and alike.If you use 1 file per map type you don't even need that. you can just write an extended loadlevel function that checks the name for the pattern, executes the corresponding datablock containting CS file and then loads the level or alike.
Question from my end would be how you achieved to nearly finish a game in iT2D without being prepared for it / missing it, as nothing ever loaded in the test player / on the device (as such you basically never could cross the 50% progress bar as anything beyond that progress on mobile means testing on mobile, experience it. A mouse is no acceptable replacement to experience it)
Did you potentially use TGB to create the game and then at 90% you decided to move it over or alike? (if so you might want to do further optimizations / setups as iT2D is not iTGB. iT2D 1.0 was around TGB 1.7.4 but by now there is quite some difference between the two due to the required optimizations for mobiles)
I don't ask to be mean or harsh but to find out how such situations can arise and I'm sure Garage Games would like to know that too to potentially document it better / make it more obvious that mobile = you optimize or you don't run your game (well).
#6
Make a game in TGB and won a prize with a publishing contract.
the idea is, to port the game from PC to IOS and Android (contracted).
So we start dev for it on iTGB.
i think we are well organized, and after IOS we want to port to Android.
After release IOS, we hope, that we find a coder for the Android Version, or GG will have a TGB Version for it... what about: aTGB? :)
I love this great community here :)
12/22/2011 (11:16 am)
Here is the fast one:Make a game in TGB and won a prize with a publishing contract.
the idea is, to port the game from PC to IOS and Android (contracted).
So we start dev for it on iTGB.
i think we are well organized, and after IOS we want to port to Android.
After release IOS, we hope, that we find a coder for the Android Version, or GG will have a TGB Version for it... what about: aTGB? :)
I love this great community here :)
#7
I personally would hope for a mTGB (marmelade), means less work to keep it alive, more platforms and a software renderer for all thos trashy android devices where you can forget the pre stone age gpu anyway
12/22/2011 (1:25 pm)
The license explicitely forbids porting the code to new platforms actually so without geting the ok from GG upfront you would be violating the license.I personally would hope for a mTGB (marmelade), means less work to keep it alive, more platforms and a software renderer for all thos trashy android devices where you can forget the pre stone age gpu anyway
Torque Owner Johnny Vo