don´t want per level datablocks
by Isaac Barbosa · in iTorque 2D · 02/02/2010 (2:24 pm) · 8 replies
@Luma,
Since it was always a pain to load all the datablocks at one time, per level datablocks sounds ok, but I don´t want to use that feauture since I´m using a custom method to load the stuff is need when I want it. My custom method is not compatible with the per level datablocks approach... and the worst thing is that engine is not building because I don´t have the per level datablocks in my project... how can I disable this feature so I will be able to keep using my own approach?
Right now I´m getting this error:
Game::argv0
Initializing chunk mappings...
o 'TEXT' maps to TextChunk
o 'SCHK' maps to UnknownChunk
o 'SCHK' maps to SimChunk
Error : Failed to open "main.cs".
Application failed to start! Make sure your resources are in the correct place.onExit: Unknown command.
[]Input::disable.
Why is not main.cs being opened?
Thanks in advance
Since it was always a pain to load all the datablocks at one time, per level datablocks sounds ok, but I don´t want to use that feauture since I´m using a custom method to load the stuff is need when I want it. My custom method is not compatible with the per level datablocks approach... and the worst thing is that engine is not building because I don´t have the per level datablocks in my project... how can I disable this feature so I will be able to keep using my own approach?
Right now I´m getting this error:
Game::argv0
Initializing chunk mappings...
o 'TEXT' maps to TextChunk
o 'SCHK' maps to UnknownChunk
o 'SCHK' maps to SimChunk
Error : Failed to open "main.cs".
Application failed to start! Make sure your resources are in the correct place.onExit: Unknown command.
[]Input::disable.
Why is not main.cs being opened?
Thanks in advance
#2
All the game resources are in its place. That´s why I don´t know what to do...
And I´ve cleaned and compiled unsuccesfully several times
02/02/2010 (2:39 pm)
@Christopher,All the game resources are in its place. That´s why I don´t know what to do...
And I´ve cleaned and compiled unsuccesfully several times
#3
Is one of your warning something like:
no rule to process file '$(PROJECT_DIR)/../../projectFiles/main.cs' of type sourcecode.torque for architecture armv6
edit: I forget you stated your console output, in the early section :)
02/02/2010 (2:43 pm)
Do you have any warnings and if so how many?Is one of your warning something like:
no rule to process file '$(PROJECT_DIR)/../../projectFiles/main.cs' of type sourcecode.torque for architecture armv6
edit: I forget you stated your console output, in the early section :)
#4
This is what your Groups and file sections should look like. Notice that the Resources and target sections are open.

This is what I am thinking your look like, because it is the only way I get the same error you get. Notice how the red circle has no main.cs, just drag it from your "Resource" group to the target.
02/02/2010 (3:08 pm)
@Isaac This is what your Groups and file sections should look like. Notice that the Resources and target sections are open.

This is what I am thinking your look like, because it is the only way I get the same error you get. Notice how the red circle has no main.cs, just drag it from your "Resource" group to the target.
#5
So instead of doing any level loading, just create your level object at the start, then populate it as needed. Here's some quick code to get you started with that:
Then this goes in place of the loadLevel function, as it is no longer needed.
02/02/2010 (4:43 pm)
I would actually suggest a rewrite of the level loading system. The existing system is not really designed for careful resource management like is needed on the iPhone, and while per-level datablocks work in some situations, their uses I think can be somewhat limiting. So instead of doing any level loading, just create your level object at the start, then populate it as needed. Here's some quick code to get you started with that:
exec("~/gui/mainScreen.gui"); // Exec this as it contains the sceneWindow2D object we use to render the world.
$LastLoadedScene = new t2dSceneGraph(){};
sceneWindow2D.setSceneGraph($LastLoadedScene);
sceneWindow2D.setCurrentCameraPosition("0 0", "75 100");Then this goes in place of the loadLevel function, as it is no longer needed.
#7
When I deploy TGB game on ipad, I meet a warning "no rule to process file '$(PROJECT_DIR)/../../projectFiles/main.cs' of type sourcecode.torque for architecture armv6".
I try to follow your instructions but I dont see the images. Can you tell me how to fix this problem.
Thanks and best regards,
10/28/2010 (7:04 am)
Hi Chris,When I deploy TGB game on ipad, I meet a warning "no rule to process file '$(PROJECT_DIR)/../../projectFiles/main.cs' of type sourcecode.torque for architecture armv6".
I try to follow your instructions but I dont see the images. Can you tell me how to fix this problem.
Thanks and best regards,
#8
Your account doesn't show a iT2D license attached to it, studio or individual. If you purchased a license on a different account please post using that account.
10/28/2010 (4:19 pm)
@leanhtaiitYour account doesn't show a iT2D license attached to it, studio or individual. If you purchased a license on a different account please post using that account.
Torque Owner Christopher Evans
Morphosis Games
To do so you need to go to Xcode, in the "Groups & Files" section open "Target". Find out what Target you are using and open it (The one with the green check mark). Then open "Copy Bundle Resources" if you don't see your main.cs in their drag it from your "Resources" folder.
Clean project and compile. Hopefully it will fix your issue. If not then we will go from there.