ArianeSoft - Programming and development for Windows and Windows Mobile :: Forums :: PPL - Pocket Programming Language :: Made with PPL
 
<< Previous thread | Next thread >>
Bitmap manipulation
Moderators: kornalius, bmanske, PointOfLight
Author Post
Mike Halliday
Tue Nov 06 2007, 06:53am

Registered Member #671
Joined: Tue Sep 25 2007, 12:22pm
Posts: 400
Here is a taster of my Bitmap Manipulation code using surfaces instead of sprites.

Un-optimised and needs work, but in principle it shows what is possible.

[Mike]
1194349979_671_FT0_wibblywobbly.zip

Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL!

Still trying to get people to contribute to the newsletter!
Back to top
PointOfLight
Tue Nov 06 2007, 09:03am

Registered Member #49
Joined: Sun Sep 17 2006, 03:02pm
Posts: 1129
Unfortunately, this didn't work for me.  I got an Application Error and it exited before even doing anything.

Eric Pankoke
Founder
Point Of Light Software
http://www.polsoftware.com/
Back to top
kornalius
Tue Nov 06 2007, 09:10am


Registered Member #1
Joined: Wed Apr 19 2006, 08:25pm
Posts: 2783
This one crashes immediately on startup. Are you missing some files?

Regards,
Alain Deschenes
President and programmer
ArianeSoft Inc. (http://www.arianesoft.ca)
Back to top
Mike Halliday
Tue Nov 06 2007, 12:36pm

Registered Member #671
Joined: Tue Sep 25 2007, 12:22pm
Posts: 400
Hmmmm

I have just got home and downloaded the post to my home PC and it still works for me! - How odd.

I am still on Version 1.32 Pro and it works on both my home PC and work PC (30 day trial)

No special location, just unzip and away.

Home PC still running Vista and Work PC still running XP Pro.

[Mike]

Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL!

Still trying to get people to contribute to the newsletter!
Back to top
Mike Halliday
Tue Nov 06 2007, 12:38pm

Registered Member #671
Joined: Tue Sep 25 2007, 12:22pm
Posts: 400
Tested the sourcecode on my home PC too and it runs from the IDE without error.

Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL!

Still trying to get people to contribute to the newsletter!
Back to top
kornalius
Tue Nov 06 2007, 12:41pm


Registered Member #1
Joined: Wed Apr 19 2006, 08:25pm
Posts: 2783
Is it possible to send me the source code somehow, I'd like to test it. If you don't want to send me the source code just send me the .PPC file. It could be that something has changed since 1.32 (and we all know a lot has changed)

Regards,
Alain Deschenes
President and programmer
ArianeSoft Inc. (http://www.arianesoft.ca)
Back to top
Mike Halliday
Tue Nov 06 2007, 12:43pm

Registered Member #671
Joined: Tue Sep 25 2007, 12:22pm
Posts: 400
This is what you should get - This is what I get on my screen.


Image: ../../e107_files/public/1194371007_671_FT7658_output_.jpg


Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL!

Still trying to get people to contribute to the newsletter!
Back to top
Mike Halliday
Tue Nov 06 2007, 12:45pm

Registered Member #671
Joined: Tue Sep 25 2007, 12:22pm
Posts: 400
Alain,

Sent you an eMail with the source.

Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL!

Still trying to get people to contribute to the newsletter!
Back to top
kornalius
Tue Nov 06 2007, 12:54pm


Registered Member #1
Joined: Wed Apr 19 2006, 08:25pm
Posts: 2783
Thank you I got it. It worked right away. I don't know what is happening. I have made an executable and ran it with success. Can you recreate the .exe and resend it here?

Regards,
Alain Deschenes
President and programmer
ArianeSoft Inc. (http://www.arianesoft.ca)
Back to top
Mike Halliday
Tue Nov 06 2007, 12:59pm

Registered Member #671
Joined: Tue Sep 25 2007, 12:22pm
Posts: 400
He is a re-compiled .exe


1194371942_671_FT7658_wobblylogo_small_pc.zip

Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL!

Still trying to get people to contribute to the newsletter!
Back to top
kornalius
Tue Nov 06 2007, 02:08pm


Registered Member #1
Joined: Wed Apr 19 2006, 08:25pm
Posts: 2783
This one works perfect.

Btw, here is a little trick, try to make all processor intensive calculations in the WM_TIMER event instead of WM_PAINT. Try to keep WM_PAINT for just drawing things to screen. You should use a temporary surface that you draw onto in WM_TIMER and draw it to the screen in WM_PAINT.

This way you will always be getting the same framerate, on fast and slow computers. I know the FPS is limited to 60 frames per second but on the PocketPC this could be one of the reasons why it is slow.

Try to stay away from FOR() loops as well in time sensitive loops, use WHILE() loops which is much faster.

These are little tricks that will help speed up your program a bit.

Regards,
Alain Deschenes
President and programmer
ArianeSoft Inc. (http://www.arianesoft.ca)
Back to top
Mike Halliday
Tue Nov 06 2007, 02:23pm

Registered Member #671
Joined: Tue Sep 25 2007, 12:22pm
Posts: 400
ooo thanks for the tip. I will use that in the newsletter some time!

Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL!

Still trying to get people to contribute to the newsletter!
Back to top
Andrew Beery
Tue Nov 06 2007, 03:05pm

Registered Member #10
Joined: Sun Jun 18 2006, 09:41pm
Posts: 107
Mr Mike!!! I'm impressed. I can forsee a "form transistion" library being written where a grap of the current screen is made to a surface, the resulting surface transformed (swirled, flipped, etc) and the new form displayed in its place. Kudos

Let us not love with words or tongue but with actions and in truth -- 1 John 3:18
Back to top
Donone
Tue Nov 06 2007, 03:27pm
Registered Member #231
Joined: Fri Jan 12 2007, 10:17am
Posts: 626
Mike, may we perhaps see a tutorial from you on these super techniques that I can only dream about? I don't know where to start. Perhaps in next month's newsletter?

You only stop learning when you die.
Sometimes I think I am dead
http://www.don-simmonds.co.uk
Back to top
Mike Halliday
Tue Nov 06 2007, 03:43pm

Registered Member #671
Joined: Tue Sep 25 2007, 12:22pm
Posts: 400
Well, as a matter of fact ...

The optimisations Alain has suggested have speeded the routine up by about oooo .. 20 times! hee hee

I will be featuring an combined optimisation and surface tutorial in Dec 07 newsletter so keep watching.

This routine was really easy once I understood how the surface generation and displaying worked. - Donone - I'm sure its not mearly dreams .. all you need is a good idea, and a few carefully placed questions on the forum.

[Mike]

Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL!

Still trying to get people to contribute to the newsletter!
Back to top
Mike Halliday
Tue Nov 06 2007, 03:46pm

Registered Member #671
Joined: Tue Sep 25 2007, 12:22pm
Posts: 400
Andrew,

I can see a real use in 3D routines as the DRAWSURFACE3 command has an angle option. Hmmm texture mapped faces maybe?

But if not, then a form transition library woudl surfice.

Any volunteers to do a form or screen manipulation/transition library then?

[Mike]

Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL!

Still trying to get people to contribute to the newsletter!
Back to top
Andrew Beery
Wed Nov 07 2007, 01:43pm

Registered Member #10
Joined: Sun Jun 18 2006, 09:41pm
Posts: 107
Actually Mike I've been thinking about the form library for a while and will likely do one... if you're interested in helping me jumpstart send me a PM and we'll talk

Let us not love with words or tongue but with actions and in truth -- 1 John 3:18
Back to top
Mike Halliday
Tue Nov 13 2007, 06:49am

Registered Member #671
Joined: Tue Sep 25 2007, 12:22pm
Posts: 400
Andrew,

How is the form transition library coming along?

Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL!

Still trying to get people to contribute to the newsletter!
Back to top
kornalius
Wed Nov 14 2007, 01:48pm


Registered Member #1
Joined: Wed Apr 19 2006, 08:25pm
Posts: 2783
Mike, when you have a minute, can you send us the new bitmap demo executable optimized?

Regards,
Alain Deschenes
President and programmer
ArianeSoft Inc. (http://www.arianesoft.ca)
Back to top
Andrew Beery
Wed Nov 14 2007, 04:23pm

Registered Member #10
Joined: Sun Jun 18 2006, 09:41pm
Posts: 107
I started the library... I'll have a proof-of-concept in a week or so (probably right after Thanksgiving here in the States)

I'll offer a standard transisition function that you feed start/end form handles and transition type... initially "type" will be limited to one or two but will expand over time

Let us not love with words or tongue but with actions and in truth -- 1 John 3:18
Back to top
Mike Halliday
Wed Nov 14 2007, 05:07pm

Registered Member #671
Joined: Tue Sep 25 2007, 12:22pm
Posts: 400
oooo, sounds good. Will there be some examples to get us all started?



Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL!

Still trying to get people to contribute to the newsletter!
Back to top
Mike Halliday
Wed Nov 14 2007, 05:13pm

Registered Member #671
Joined: Tue Sep 25 2007, 12:22pm
Posts: 400
2 files for you ...

Un-optimised and optimised versions of wobbly logo.

Optimisations performed by moving the sine calc to the WM_TIMER: section from the main drawing section.

Much faster and a more contstant frame rate.

(Let me know if they don't work again for any reason)
1195078379_671_FT7658_wobblylogounoptimised_small_pc.zip
1195078380_671_FT7658_wobblylogooptimised_small_pc.zip

Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL!

Still trying to get people to contribute to the newsletter!
Back to top
Mike Halliday
Wed Nov 14 2007, 05:15pm

Registered Member #671
Joined: Tue Sep 25 2007, 12:22pm
Posts: 400
doh - forgot to include the bitmap in the .zip files.

You can use the logo from the original post - that should be fine.

Q: any reason why attachments show as having a space in them?

wobblylogooptimi sed_small etc, etc???

Is this just happening in my browser?

Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL!

Still trying to get people to contribute to the newsletter!
Back to top
kornalius
Thu Nov 15 2007, 01:54pm


Registered Member #1
Joined: Wed Apr 19 2006, 08:25pm
Posts: 2783
It is a problem with the way the code is interpreted in the forums, the link is correct at least.

I cannot wait to move to the new forums.

Regards,
Alain Deschenes
President and programmer
ArianeSoft Inc. (http://www.arianesoft.ca)
Back to top
 

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System