PDA

View Full Version : Copperbar Demo


Mike Halliday
10-16-2007, 10:26 PM
Ok, so with the help of kornalius's direct screen access code, I have created this very simple copper bar style demo.

Not much to it at the moment, but it is the basis of great things.

Just a simple bitmap image with 'black' transparency. This transparency is replaced with a copper bar style 'poke' to screen memory. It even moves up and down the screen bouncing off the top and bottom border.

Not much I know, but I'm still re-learing programming :)

Has anybody done any 'oldskool demos' in PPL yet that they would like to share the source code of? - I really need an example of left to right scrolling text... Just cant seem to get my head round it! :(

Enjoy and please, please, please make it better and re-upload for all to share! :)

Thanks

Mike.

Mike Halliday
10-16-2007, 10:27 PM
Yeah, yeah I know there is no attachment!

Doh. Thats because I uploaded it in rar format and it got stripped.

Have included the .zip version now!

Bye....[br]1192570060_671_FT7087_rasterbars.zip

kornalius
10-16-2007, 11:20 PM
Thank you very much for sharing, if you have the time and you want to, why don't you post a little article explaining what you did and how it works in our wiki? http://arianesoft.wiki.zoho.com/

Mike Halliday
10-17-2007, 07:20 AM
Indeed - When I get time I will disect the code and explain it in full.

matteo.m
10-17-2007, 09:02 PM
very cool!!!! i get a runtime error after a while:



Linking... (0 ms)
Compiling... (15 ms)
Saving ppc file... (0 ms)
Completion time (187 ms)

** 0 error(s), 68 warning(s)

-- Content of debuglog.txt --

17/10/2007 09:56:54 : Generated by the PPL interpreter v.1.32.0 Pro
17/10/2007 09:56:54 : Root C:\Program Files\PPL\Runtime\
17/10/2007 09:56:54 : Available memory 914,792,448 bytes
17/10/2007 09:56:54 : RASTERBARS.PPL started
17/10/2007 09:57:24 : ** runtime error ** (rasterbars.ppl) Variable VKBACKGROUND$ has not been defined in struct or in object class KEYS$! (18,22)

17/10/2007 09:58:11 : RASTERBARS.PPL ended (74,974 ms)
17/10/2007 09:58:11 : Available memory 839,925,760 bytes

PointOfLight
10-17-2007, 09:07 PM
Actually, you can get that error right away if you just hit a key after running the program. What key were you trying to trap for in that code, Mike?

[Edit]

By the way, I forgot to mention that this is a really sweet looking sample for what PPL can do!* Great job!

matteo.m
10-17-2007, 09:27 PM
Yes you are right Eric i was pressing some keys to exit...

Mike Halliday
10-18-2007, 07:23 AM
Hee Hee

I did not test key trapping. I just closed it down using the X in the top corner!

I will re-jig the code and create some different versions soon.

There are lots of different things that can be done with this code! :)

Regards

Mike

Mike Halliday
10-18-2007, 07:26 AM
Oh bugger.

I know what i did!!!! LMAO

the (vkBackground$) variable should have been ( vkB$ ) - I did a global search and replace of a B$ variable I had!! DOH.

Thanks for spotting the mistake. I have amended the code and will re-upload soon with other changes!

:) mike