Skip to main content

A large grin show file.

6 replies [Last post]
flat8
Offline
Joined: 2008-02-24

Hi All,

I have a question about Grin Show file.
When I write a grin show file to describe a kind of elaborate scene,
the file size is apt to be very large.
Is it possible to divide a show file into separate files?
Is there any syntaxes like "include" directive of C language?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
flat8
Offline
Joined: 2008-02-24

Hi Bill, Richard,

Thanks for your quick response and helpful answer.
Yes, I did just mean that grin show source text file
becomes to have a large number of lines.
Size and loading time of a compiled binary grin file is no problem.

So far, lines of grin show source file of my project is about 10,000.
(though it can't hold a candle to Richard's file) So I'm looking for
a good way to manage segments, features, and to collaborate with
other developers.
And I will try to use Apache Ant to combine separated files
before grin compile.

Thanks again

flat8

billf
Offline
Joined: 2004-02-13

To follow up on this... After discussing a bit more widely, I think we will add an "include" directive to the text file format. It's pretty simple to do, and should help some. See RFE 132 for details, and if anyone has thoughts about what form this should take (beyond, or in contradiction to what's in the RFE), please discuss.

Thanks,

Bill

Richard Ross

Hi Bill and Chihiro,

I have only just started playing with menu assemblies. They seem very
useful. Thanks for this.

Are there any circumstances where you would use a regular assembly
instead of a menu assembly? I ask this because they seem to work fine
if you define nothing in the template, i.e they can, if you wish, act
like regular assemblies. So as far as I can see they supersede the
functionality of regular assemblies.

Richard.

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net

Bill Foote

Richard Ross wrote:
> Hi Bill and Chihiro,
>
> I have only just started playing with menu assemblies. They seem very
> useful. Thanks for this.
>
> Are there any circumstances where you would use a regular assembly
> instead of a menu assembly? I ask this because they seem to work fine if
> you define nothing in the template, i.e they can, if you wish, act like
> regular assemblies. So as far as I can see they supersede the
> functionality of regular assemblies.

Yes, that's right - a menu assembly with nothing in the template
becomes precisely the same thing as a regular assembly at runtime.

Cheers,

Bill

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net

Bill Foote

bd-j-dev@mobileandembedded.org wrote:
> Hi All,
>
> I have a question about Grin Show file.
> When I write a grin show file to describe a kind of elaborate scene,
> the file size is apt to be very large.

Which file? Do you mean that the source file is apt to
get large enough so that editing becomes cumbersom, or that
the binary file becomes large enough to make load time and
memory consumption an issue?

On the latter, my hope is that the binary show file will almost
always be significantly smaller than the image assets it's used
to manage. Of course, it's not hard to make a contrived counter-example,
but if there are any real situations where the binary file size becomes
an issue, we'd love to understand the usage that brings that about.

If you just mean the size of the text file becoming unwieldy to,
edit then there are a couple of avenues to consider. One is that
the text file syntax isn't set in stone; the real value-add of GRIN
is meant to be the underlying logical model that's used to produce
the binary file. If a different sort of syntax works better for
a particular class of problems, it's not too hard to invent a new
syntax. XML-based syntaxes can be popular.

But there are easier options too, suggested by:

> Is it possible to divide a show file into separate files?
> Is there any syntaxes like "include" directive of C language?

Sure - just run whatever pre-processor you like to produce the
flattened GRIN text file as part of your build process.

Bill

> [Message sent by forum member 'flat8' (flat8)]
>
> http://forums.java.net/jive/thread.jspa?messageID=319484
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
> For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net

Richard Ross

> bd-j-dev@mobileandembedded.org wrote:
>> Hi All,
>> I have a question about Grin Show file.
>> When I write a grin show file to describe a kind of elaborate scene,
>> the file size is apt to be very large.
>
> Which file? Do you mean that the source file is apt to
> get large enough so that editing becomes cumbersom, or that
> the binary file becomes large enough to make load time and
> memory consumption an issue?
>
> On the latter, my hope is that the binary show file will almost
> always be significantly smaller than the image assets it's used
> to manage. Of course, it's not hard to make a contrived counter-
> example,
> but if there are any real situations where the binary file size
> becomes
> an issue, we'd love to understand the usage that brings that about.
>
> If you just mean the size of the text file becoming unwieldy to,
> edit then there are a couple of avenues to consider. One is that
> the text file syntax isn't set in stone; the real value-add of GRIN
> is meant to be the underlying logical model that's used to produce
> the binary file. If a different sort of syntax works better for
> a particular class of problems, it's not too hard to invent a new
> syntax. XML-based syntaxes can be popular.
>
> But there are easier options too, suggested by:
>
>> Is it possible to divide a show file into separate files? Is there
>> any syntaxes like "include" directive of C language?
>
> Sure - just run whatever pre-processor you like to produce the
> flattened GRIN text file as part of your build process.
>
> Bill
>

I have a Grin Show file with about 100,000 lines of code. It complies
down to 1.2M which is about a quarter of the size of the images used.
It loads at an acceptable speed on all players - about 10 seconds on
the PS3.

Grin rules! Thanks Bill.

Richard.

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net