Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
142 user(s) are online (126 user(s) are browsing Forums)

Members: 1
Guests: 141

sinisrus, more...

Support us!

Headlines

 
  Register To Post  

Hollywood examples please
Just can't stay away
Just can't stay away


See User information
Hi all,

Could someone post a few examples of Hollywood code? A shell-based "Hello world" and a GUI based one would be cool.

I am interested in seeing how the AmigaOS API is usable from Holywood.

Thanks.

Philippe 'Elwood' FERRUCCI
Sam460ex 1.10 Ghz
http://elwoodb.free.fr
Go to top
Re: Hollywood examples please
Just popping in
Just popping in


See User information
@Elwood
Hello World in a window:

@DISPLAY {Mode = "Windowed"}
Print("Hello World")
WaitLeftMouse()


The shell version is a bit more tricky, because Hollywood was designed for multimedia applications. But you can call Execute to run an external program. I.e.:

@DISPLAY {Mode = "Windowed"}
Execute("Echo \"Hello World\"")

Still using windowed mode, because Hollywood would ask for a screenmode otherwise. The bad thing is, you will see an empty window for the duration of your program. The only way I know to suppress this is by opening a very small window which is not notable. Not a very nice solution IMO, but here it is anyway:

@DISPLAY {Mode="Windowed", X=#RIGHT, Y=#BOTTOM, Width=1, Height=1, Borderless=True}
Execute("Echo \"Hello World\"")

Alex.

Go to top
Re: Hollywood examples please
Just popping in
Just popping in


See User information
@Elwood

Quote:

Elwood wrote:
Hi all,

I am interested in seeing how the AmigaOS API is usable from Holywood.

Thanks.


Currently there is no way to directly use the AmigaOS API.
There is a plugin system in Hollywood that could be able to extend the capabilities in some ways.
However the functions that you can use in your scripts are heavily rely on the underlying AmigaOS API.

If you would be able to directly use API calls and OS structures then it should ruin the platform independency which is against the concept.

There is standard file/font/etc. requesters and arexx interface.

You should keep in mind the main goal of Hollywood which is described in the manual as follows:

"Hollywood is the Multimedia Application Layer for Amiga(tm) and compatible operating systems. That means that it offers a powerful 64-bit script language together with advanced functions that allow you to create your own multimedia applications, ranging from a simple slideshow to a complex game.
Hollywood is distributed on a CD-ROM that contains an AmigaOS 3 (68k) version, a WarpOS (PowerPC), MorphOS (PowerPC) and AmigaOS 4 (PowerPC) versions, and also an AROS (i386) version.

The big advantage of Hollywood is that it does all the framework for you. You do not have to care, for example, whether your application is going to run on 68k, PowerPC or i386. With Hollywood it runs on all of them. Even for the most complex operations, Hollywood has simple functions that do them, so you can concentrate yourself on the important thing - your application. The powerful Hollywood scheduler allows you to create presentations that are perfectly synchronized to the music - no matter if your presentation runs on a 50 Mhz or 1 Ghz CPU."

p.s.: I am days from the release of a project made by Hollywood. I will attach the sources too. So if you are curious about it then look after that on OS4Depot "when it's done"!

Go to top
Re: Hollywood examples please
Not too shy to talk
Not too shy to talk


See User information
@Elwood

In the PointRider package, I can find the tool MeltingPoint that creates an Hollywood projects (generates a script and extracts images) from a PPS file. You certainly have some simple PowerPoint files to convert and see the scripts.

Go to top
Re: Hollywood examples please
Just can't stay away
Just can't stay away


See User information
@lazi

This is what I thought: if some people can do games with Hollywood, maybe it's possible to do GUI apps too. And this, without the need to learn C, Reaction...
Just a thought.

If the API can't be used, it's impossible to do what a "standard" program can.

Quote:
If you would be able to directly use API calls and OS structures


I understand that. Hollywood could provide a way to do stuff in an independant manner.
As an example you could use a function called Getprogramdir and Hollywood would use DOS/GetProgramDir() on AmigaOS and something else on other platforms.

Philippe 'Elwood' FERRUCCI
Sam460ex 1.10 Ghz
http://elwoodb.free.fr
Go to top
Re: Hollywood examples please
Just popping in
Just popping in


See User information
@Elwood

Quote:

Elwood wrote:
@lazi
Quote:
If you would be able to directly use API calls and OS structures


I understand that. Hollywood could provide a way to do stuff in an independant manner.
As an example you could use a function called Getprogramdir and Hollywood would use DOS/GetProgramDir() on AmigaOS and something else on other platforms.


Noboby said it is technically impossible.
The problem is that old scheme: new hardware-new users-more support...

Hollywood is a great software even in the current form. I hope that the author will be inspired enough by users (buyers) to continue development.

Maybe I do not reveal secrets when paste here some lines from the "To Do" section of the Hollywood documentation just to arouse your interest:

"Here are some ideas that are on my to do list:
- support for new platforms like Windows, Linux and MacOS
- automated scaling engine which allows you to scale the display of any application; when layers are enabled this scaling engine should use lossless scaling for vector and text forms
- multiple displays
- a library which allows you to implement GUI elements in your scripts (i.e. an interface to gadtools.library)
- support for rotating text objects
- support for miter and bevel line join types (currently only rounded join type supported)
- support for AROS PPC
- support for video streaming; a suitable API would be required here
- asynchronous anim playback through layers
- support for palette images: a blast from the past!; dithering would be necessary when rendering RGB data to palette brushes
- speed of all the transition fx functions should be passed in milliseconds instead of a custom type; would help to time scripts correctly
- text transition effects
- new tag for preprocessor commands so that the data specified in them is not linked but loaded dynamically when required
- a version for PowerUP?
- a version which can render to palette screens? was possible in 1.x and removed in 2.0 but could be reimplemented quite easily though it would be totally slow
- more features"

Go to top
Re: Hollywood examples please
Just can't stay away
Just can't stay away


See User information
@lazi

Quote:
- a library which allows you to implement GUI elements in your scripts (i.e. an interface to gadtools.library)

Exactly what I need.

My idea is that Hollywood "could" become a RAD program allowing to easyly write applications. Maybe one day.

Philippe 'Elwood' FERRUCCI
Sam460ex 1.10 Ghz
http://elwoodb.free.fr
Go to top
Re: Hollywood examples please
Not too shy to talk
Not too shy to talk


See User information
@Elwood

This is what I thought: if some people can do games with Hollywood, maybe it's possible to do GUI apps too. And this, without the need to learn C, Reaction...
Just a thought.
[/quote]

It is certainly possible (Hollywood is really powerful !) but if you want to write GUI, I think this is not the good choice (the same for RxMUI : great but not dedicated to GUI programming).

A nicer way would be to have GUI modules to program easily in Python or Ruby.

Go to top
Re: Hollywood examples please
Quite a regular
Quite a regular


See User information
@corto

Quote:

corto wrote:
@Elwood
Quote:

This is what I thought: if some people can do games with Hollywood, maybe it's possible to do GUI apps too. And this, without the need to learn C, Reaction...
Just a thought.


It is certainly possible (Hollywood is really powerful !) but if you want to write GUI, I think this is not the good choice (the same for RxMUI : great but not dedicated to GUI programming).

A nicer way would be to have GUI modules to program easily in Python or Ruby.


Someone has to implement the gui objects first., afaik. Checking...
yup, here on according to installed Debian packages, there are various interfaces for ruby: tk/qt/gtk2. So no free lunches, more practical is to use ready software (rexx+mui thingies, awnpipe, hollywood etc if no portability is needed).
Dunnoh about hollywood, but rexx+awnpipe are pretty easy to use.

Resized Image
"the expression, 'atonal music,' is most unfortunate--it is on a par with calling flying 'the art of not falling,' or swimming 'the art of not drowning.'. A. Schoenberg
Go to top
Re: Hollywood examples please
Quite a regular
Quite a regular


See User information
Quote:
alexw wrote:

@DISPLAY {Mode = "Windowed"}
Print("Hello World")
WaitLeftMouse()


The shell version is a bit more tricky, because Hollywood was designed for multimedia applications. But you can call Execute to run an external program. I.e.:

@DISPLAY {Mode = "Windowed"}
Execute("Echo \"Hello World\"")

Still using windowed mode, because Hollywood would ask for a screenmode otherwise. The bad thing is, you will see an empty window for the duration of your program. The only way I know to suppress this is by opening a very small window which is not notable. Not a very nice solution IMO, but here it is anyway:

@DISPLAY {Mode="Windowed", X=#RIGHT, Y=#BOTTOM, Width=1, Height=1, Borderless=True}
Execute("Echo \"Hello World\"")

Hi alexw,

I was quite literally going to order Hollywood 2.5 in half an hour, until I saw this.

Unless a proper syntax for using a computer language is possible to be used by programs such as these, I will stick to AMOS Professional, oh, wait, AMOS Pro doesn't work on AOS4.0. Oh well.

I tried SDLBasic, it just locked up.

I honestly don't understand how people can think with all the (), \\, @, {}, of hollywood and * in "C" in the way!

Is it possible that the author would make a new version with all the trash removed from the lines of text code?

Support Amiga Fantasy cases!!!
How to program: 1. Start with lots and lots of 0's. 10. Add 1's, liberally.
"Details for OS 5 will be made public in the fourth quarter of 2007, ..." - Bill McEwen
Whoah!!! He spoke, a bit late.
Go to top
Re: Hollywood examples please
Just popping in
Just popping in


See User information
@Atheist
Quote:

Atheist wrote:

I honestly don't understand how people can think with all the (), \\, @, {}, of hollywood and * in "C" in the way!

Try learning what all those symbols are for.

The C Book
This is the online version of The C Book, second edition by Mike Banahan, Declan Brady and Mark Doran, originally published by Addison Wesley in 1991. This version is made freely available.

Go to top
Re: Hollywood examples please
Just popping in
Just popping in


See User information
@Atheist

Quote:

Atheist wrote:
Quote:
alexw wrote:

@DISPLAY {Mode="Windowed", X=#RIGHT, Y=#BOTTOM, Width=1, Height=1, Borderless=True}
Execute("Echo \"Hello World\"")

Hi alexw,

I was quite literally going to order Hollywood 2.5 in half an hour, until I saw this.


Beleive me, it is a quite simple syntax. You can transform most of the Amos sources in minutes. There is much more in this syntax than in any basics what I saw.

Here is another example:


@display { Mode = "ask", Desktop=false, Borderless = true, Sizeable = False, Title = "Starfield1", X = #CENTER, Y = #CENTER, Width = 800, Height = 600 }

star={x={}, y={}, z={}, sx={}, sy={}}

centerx=400
centery=300
starnr=100

createbrush(1,3,3,#white)
selectmask(1)
setmaskmode(#maskinvisible)
plot(0,0,#white)
plot(2,0,#white)
plot(2,2,#white)
plot(0,2,#white)
endselect()

createbrush(2,3,3)

for i=0 to starnr
star.x[i]=Rnd(1000)-500
star.y[i]=Rnd(1000)-500
star.z[i]=Rnd(900)+100
star.sx[i]=0
star.sy[i]=0
next

setfillstyle(#fillcolor)

function starfield()
For i=0 to starnr
displaybrush(2,star.sx[i],star.sy[i])

star.z[i]=star.z[i]-5
star.sx[i]=star.x[i]/star.z[i]*100+centerx
star.sy[i]=star.y[i]/star.z[i]*100+centery

If (star.z[i] < 6) or (star.sx[i] < 5) or (star.sy[i] < 5)
star.x[i]=Rnd(1000)-500
star.y[i]=Rnd(1000)-500
star.z[i]=Rnd(900)+100

endif

b=255-(star.z[i]*(255/1000))
selectbrush(1)
cls(rgb(b,b,b))
endselect
displaybrush(1,star.sx[i],star.sy[i])
Next
endfunction


setinterval(1,starfield,1000/50)

Repeat
WaitEvent
Forever


And here is the OS4 executable.

You can quit by pressing ctrl+c.

Go to top
Re: Hollywood examples please
Just popping in
Just popping in


See User information
@Atheist
The lines with @ are just some global settings for your program and you only need a few or even just one in your program. The rest looks a lot like AMOS. I was once an AMOS programmer and Hollywood reminded me a lot of it when I first tried it.

You might want to visit
http://www.amiga-resistance.info/home ... wood/quellc/quelltxt.html
for some example source codes. The page is in German, but you can still try the download links.

Alex.

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project