This site is no longer active and is available for archival purposes only. Registration and login is disabled.

New version of PF in a day or two...


New version of PF in a day or two...

Postby fzammetti » Jun 11, 2003 @ 6:05pm

Just wanted to let you all know that I'm putting the finishing touches on v0.7.0, and I expect to have it out to you all in a day or two (certainly no later than the weekend).

It has actually turned into a much more substantial release than I first intended, but I think what's in it will make many of you happy. Here is a list thus far (and I actually expect this to be the final list... the only thing not completed is the last item)...

+ Added "desktopZoom" attribute to m_config structure. This allows you to zoom the window size to any multiple on a desktop PC. You CAN use this on a PocketPC device as well, it won't bomb or anything, but it's pretty much pointless there, so generally you should simply not set any value at all, which will zoom to 1x, a 240x320 window as usual in other words. Setting it to zero or one does the same thing. Any other value will simply multiply the width and height by that amount. So, if you do m_config.desktopZoom = 2; in your Init method, you will get a window that is 480x640, = 3 would give you 720x960, etc.

+ Built lib files are now included with the PF distribution. I'm not sure if they were prior to 0.6.1, but they weren't in that release, and they probably should be, if for no other reason than convenience.

+ Added sample "hekkus" to show how to hook into that sound library without needing to use PocketFrogPlus (PF development can now continue independant of Hekkus!)

+ Added two methods to Game class: void GameSuspend() and void GameResume(). These are called, as you would expect when the application is suspended (i.e., low battery warning message) and resumed (i.e., message is dismissed) accordingly. These are needed to properly hook into sound libraries such as Hekkus. Override them and do whatever you please with them. See the Hekkus sample for usage example.

+ Added Rasterizer::FillPoly to draw filled polygons. Pass it (Point[], int pointCount, Pixel). The method only handles convex polygons and polygons that are vertically concave, that is, a polygon cannot have more than two edge points on the same horizontal line. Thanks to Andreas Hedström for optimizing and improving my original code for this.

+ Added Rasterizer::BlitRotatedStretch to draw surfaces that are both stretched and rotated at the same time. Pass it (int destx, int desty, float angle, const Surface* source, int stretch_xsize, int stretch_ysize, Surface* stretch_surface, const Rect* src_rect). Note that the stretch_surface MUST be created with the dimensions stretch_xsize and stretch_ysize (see SuperSample for usage example). Note that you SHOULD NOT delete this surface yourself, it is done by the function. Note in the SuperSample example that it is created locally in the method call. I suggest only doing it that way so you don't forget. Thanks to Andreas Hedström for this implementation.

- Removed all sample projects from the "Make" workspace.

! Fixed a bug in the VGADrawText function that caused the X location to be ignored in all cases. You should now be able to position text anywhere on the screen. At the same time, fixed an compatibility between the desktop and PPC builds (it wouldn't compile on one or the other depending on how it was coded, now it works fine on both).

! Fixed some errors that would keep PF from compiling on Win32 (I had never done that in the prior version so I didn't see the errors). Also made similar changes to the samples so they will compile when targeted to Win32, so everything should now compile and run properly on a desktop as well as a PocketPC device.

+ A sample app by Damian Ancukiewicz to show how to use pixel shaders. Included are three useful shaders: greyscale shader, fade shader and an 8-bit shader.

+ Frame rate limiting. Set the value of m_config.frameRate to the maximum rate you want your app to run at, and PF will do it's best to fulfill your wishes. Not setting anything results in maximum frame rate, as PF does now.

Any comments before release are of course welcome.
...and so I said to Mr. Gates: "$640 billion should be enough for anyone!"
User avatar
fzammetti
pm Insider
 
Posts: 1496
Joined: Jun 4, 2002 @ 6:21pm
Location: Omnytex Technologies


Postby Conan » Jun 11, 2003 @ 8:03pm

Comments as requested:-

1. Delighted to see the suspend & resume as I was expecting to have to do this myself

2. Can I just substitute the PF for regular 0.6 PF & expect my project to keep on working with little change?

3. What are the main features of the font function ( over the previously released 3d party font features )
What is Best in Life ?
User avatar
Conan
pm Member
 
Posts: 1309
Joined: Dec 24, 2001 @ 5:16am
Location: the Shades, Ankh-Morpock


Postby fzammetti » Jun 11, 2003 @ 8:24pm

Yes, when Gersen wrote to me to explain what he had changed it was pretty obvious to both of us that adding those methods made sense. We finally have PF and Hekkus decoupled, and you should be able to stick any other library in there you want too.

To answer your second question: yes, you should just be able to drop in the new version, recompile and go with the new version. I've been very careful not to change method signatures or anything of that nature. I can say for sure that all the sample apps work as expected with the new version.

I should note however that if you are moving from PocketFrogPlus, you will have a slight bit of work to do. I expect it shouldn't be a major undertaking though. In fact, I may go ahead and convert Invasion: Trivia to the new version and report back what has to be changed for reference.

As for the font features, the font function I added uses a standard 8x16 non-proportional VGA font, not a source image. In many ways it's frankly inferior to what's out there or what you could do yourself. The benefits however are (a) any VGA-compatible font you can find should work (there are over 100 for anyone that wants them in the PF Developer's Corner file exchange), (b) an entire 256-character font takes up only 4K of memory and doesn't require any decoding like an image, (c) it's pretty efficient to plot so performance doesn't get impacted in a noticeable way), (d) you can do Commodore 64-style character animation by altering the font data in memory (you of course still have to draw the text each frame, but it's another method you can now use easily), (e) if you want to modify the code it's very straight-forward and you can do some fairly neat effects with it easily (see the gradient look of the text in Invasion: Trivia and the rotating color text on the high scores screen as some examples), (f) it's simpler in some ways than using a bitmap font since you don't have to draw the image with all the characters in the correct places.

Basically, if you need a non-proportional font, this if probably the best choice. If you need a proportional font it's not an option at all. For many things I think it's simpler, but for others it's not powerful enough. Just think of it as another tool in the toolbox, not the one way to do fonts. In any case, it added less than half a K to the library size, so it doesn't seem like a problem in that respect if you never use it.

As an addendum to my original post... Frame rate limiting is not going to make it in this release. I rad into some problems getting it in there, and I'd rather not release something that's broken or not optimal. I have however added frame limiting to the SuperSample application so that people can see one method for doing it. It's frankly very easy and although I'd like to see it in the core library, it's certainly not any problem to add on your own.
...and so I said to Mr. Gates: "$640 billion should be enough for anyone!"
User avatar
fzammetti
pm Insider
 
Posts: 1496
Joined: Jun 4, 2002 @ 6:21pm
Location: Omnytex Technologies


Postby adde » Jun 12, 2003 @ 2:12am

User avatar
adde
pm Member
 
Posts: 152
Joined: Oct 9, 2002 @ 1:42pm
Location: Stockholm / Sweden


Postby fzammetti » Jun 12, 2003 @ 2:56am

...and so I said to Mr. Gates: "$640 billion should be enough for anyone!"
User avatar
fzammetti
pm Insider
 
Posts: 1496
Joined: Jun 4, 2002 @ 6:21pm
Location: Omnytex Technologies


Postby adde » Jun 12, 2003 @ 3:43am

I think you've convinced me to change it in some way, and I'm leaning towards not destroying the surface in the function and leave it to the user. I think I'm going to combine with that the removal of the stretch surface size as well, that makes sense (less parameters to pass is better in all cases as far as I'm concerned) ... This can be seen as an optimization of sorts, so I think the solution I'm leaning towards is probably the best of both worlds.

I totally agree!

Hopefully one day someone will show me how to do this the right way and we can get the performance that not combining these two functions doesn't.

Well, combining the two Blit functions into one function that calls BlitTransformed() with a different (combined) transformation matrix shouldn't be that hard in theory. You simply multiply the two matrixes together.

The trick is to make it work in practice =) I started out trying to do a simple hack, but it turned out a simple external function that invoked both BlitRotated() and BlitStretch() was the best solution for me (cause then I didn't have to modify the PF library).

Anyways.. As soon as I get some free time I'll take a look at it. Unless someone else does it first.

(geeze, I've been saying that a lot the past 6 months but now I'm finally finished with my thesis and thus my whole M.Sc. education.. hurray for me!!! =)

Thanks for the suggestions!

Anytime
User avatar
adde
pm Member
 
Posts: 152
Joined: Oct 9, 2002 @ 1:42pm
Location: Stockholm / Sweden


Return to PocketFrog & PocketHAL


Sort


Forum Description

SDKs for fast and robust device-independent access to Pocket PC display hardware.

Moderators:

sponge, Kzinti

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron