November updates
New month, new thread
A new version of PPL beta 0.8 pre-release is now available:
New features:
- SoundEx() function
- SetSpriteMirrorX(), SetSpriteMirrorY() functions.
- SpriteMirrorX(), SpriteMirrorY() functions.
Fixes:
- Fixed array's offset calculation.
- Game api window has a border on the PC now.
- Fixed g_lock() and g_unlock() to support surface parameter.
- Fixed For() last parameter (increment) to be optional.
- Fixed SetSpriteFrames(), SetSpriteAnimSpeed() not to reset current animation index.
Another update today:
Fixes:
- No more SetSpriteOffsetX, SetSpriteOffSetY, SpriteOffsetX, SpriteOffsetY, replaced by SetSpriteOffset, SpriteOffset.
- No more SetSpriteMirrorX, SetSpriteMirrorY, SpriteMirrorX, SpriteMirrorY, replace by SetSpriteMirror, SpriteMirror.
- DrawSurface changed to DrawSurfaceEx with a target surface parameter added.
- No more Sprite() function. Use &spr;$ = Sprite$ instead.
- Fixed PIDE, debug buttons.
- Fixed compiler loop addressing bug.
New features:
- SetSpriteParent, SpriteParent.
- Easier DrawSurface function.
What do you mean by 'easier drawsurface function'?
In general, how do we know the specifics of the updates? I looked at the online help and it seems to be the same.
SetSpriteMirror doesn't get highlighted in the PIDE here - works normally.
fastrx: DrawSurface takes less parameters than DrawSurfaceEx. SHould be in the help. If not I will add it.
sponge: Will take a look!
Kornalius,
Have loaded beta 0.8 2/11/2004.
Compiler now objects to "deletewindowobject". Maybe I missed the advice, but cannot find any reference to a change.
NOTE: I did not try the first update released in November!
Help!
DeleteWindowObject has been changed to DeleteObject. The internal DeleteObject doesn't exists anymore. DeleteObject is now pointing to the real DeleteObject function from the Windows API.
New version is now available.
Fixes:
- Free() function.
- Pointer addressing issue.
- SetSpriteMirrorX, SetSpriteMirrorY, SpriteMirrorX, SpriteMirrorY.
- SetSpriteOffsetX, SetSpriteOffSetY, SpriteOffSetX, SpriteOffsetY.
New features:
- NewParticle(), ClearParticles(), ProcessParticles(), RenderParticles().
- Particles.ppl demo.
To come (probably tomorrow):
- Sprite clipping.
- Sprite parent's clipping.
- zlib.ppl library for zip operations.
Beta 0.8 03/11/2004 loaded and DeleteWindowObject => DeleteObject. Perfect!
Thanks
New version available.
Fixes:
- Fixed pointer addressing issue with arrays.
- Fixed SpriteAt and SpriteAtRect functions.
- Fixed game api independent processing time.
- Fixed SetSpriteDirection().
- Some other minor fixes.
New features:
- Added looping and fading to particle engine.
- Sprite clipping.
- Parent sprite and parent sprite clipping.
- New motionblur.ppl demo, showing particle engine with fading.
The latest version of PPL pre-release beta 0.8 is now available for download.
Fixes:
- g_init, added a new fullscreen parameter.
- Changed ^ operator to @.
- "BORDER" in sprite's collide to check for borders collisions.
- And many more...
New features:
- Auto offset and scrolling based on the map origins.
- New Scroll.ppl demo.
- Updated Particles.ppl demo.
- ^ operator (bitwise-exclusive or)
- Support for |= &= and ^= operators.
- Tons of sprite options. (SetSpriteOptions, SpriteOptions, AddSpriteOption, DelSpriteOption).
- OffsetSprite() function.
- Wrap() function.
- Sprite clipping is now supported.
- ParticlesCount() function.
- New MotionBlur.ppl demo.
Here is a brief list of things I am working on:
- Nice and simple User Interface functions for the gameapi:
- Keyboard (like the SIP).
- Input fields.
- Listbox.
- Button.
- Checkbox.
Things I'd like to do:
- A* multi-threaded pathfinding for sprites.
- Isometric display system.
- Nice level editor (tile editor) in PPL using the gameapi, with a LoadLevel() function for games.
The Isometric engine should be relatively easy to implement since I already did a fully working isometric game editor in Delphi. The multi-threaded A* pathfinding was also implemented in this game editor. It should be relatively easy to port too.
It seemed a bit quiet the past few weeks!

I hope it's just a phase!
I hope to release the official beta 0.8 soon. I want it to be pretty stable and impressive (the features are quite long to list now!). I will advertise it almost everywhere.
Is there a need to do isometric built into PPL? I think I could do it right now without little modifications, infact I've been toying with such an idea.
By adding sprite.height, the engine will be able to calculate when a sprite should be in front or in the back of another sprite on the fly. You won't have to do anything.
When you say isometric, do you mean that I could create a Textbox called Text, and call its text function with Text.Text?
Is so, then YES I would like to have that with my mash taters and gravy! Yummy, yummy!
No isometric means the way the engine displays it's sprites. Sprites are displayed on a grid that is isometric.
- Code:
/___/___/___/___/
__/___/___/___/___/
/___/___/___/___/
__/___/___/___/___/
I am really bad at drawing in ascii, but you should get the idea.
PPL won't restrict you to position sprites on an isometric grid, it's more advanced than that!

Hi Kornalius,
I have loaded the 0.8 beta code for 11-11-2004.
As per your change advice I needed to replace all "^" constructs to "@". I tried using the PIDE editor to do a global replace in each file in my project (one file at a time). For some reason the "search/replace" optiion never finds any "^" chars. I ended up using an external editor to make the replacements.
After applying the above change all compiles OK. The program initially runs, but there is a "serious" memory leak. It crashes after about 15 secs.
Hopefully I'll get some timme later this afternoon to trace the reason for the "memory leak" and report back
cheers
You sure you didn't make any other changes? Maybe you missed a ^ somewhere! Send me the piece of code where it occurs, I will take a look.
All I did was change the ^ to a @ character, no internal code changes.
Btw, I have to fix a few things with the PIDE Find/Replace features. They don't work right.
There nothing like a good mystery ......
The following is provided as an "info update" only ... no action expected ... I am still investigating.
1. I fell back to beta 0.8 04-11-2004. My original program compiles and runs without issue.
2. I loaded beta 0.8 11-11-2004, applied the "global edit" ("^" => "@") to all files in my project directory, compiled and "run". Just doing nothing causes error messages to occur after about 15 secs. I haven't logged all the messages but they include some "stack" messages etc. If I get in and look at "memory" (beore the 15 secs) I can see it dropping by about 1Mb every 1 to 2 secs.
Now strangely enough my "program" is doing very little (with my code) at this time. The main procedure is in a tight loop calling "ProcessMessages". There is a TimerProc enabled which innocently assigns a global variable (TickCounter) to three other global variables. The WM_Paint event would be the only other possible bit of my code that is being executed, which given the variable values at initialisation simplifies to:
- Code:
hdc$ = GetDC(hWnd$);
BeginPaint(hWnd$, &ps;$);
FillRect(hdc$, &rt;$, GetStockObject(WHITE_BRUSH));
EndPaint(hWnd$, &ps;$);
ReleaseDC(hWnd$, hdc$);
I've fallen back to 04-11-2004 version to use my program this afternoon/evening. I'll continue my investigation later tonight.
I'll make sure that ALL PPL files/directories are removed from the PPC before I apply the 11-11-2004 upgrade and continue testing tonight. I normally do this anyway, but will make sure of it as this has caused funny things to happen in the past.
Here are few updates:
1. The SetSurface() function doesn't exists anymore, it has been replaced by a much easier function, SetRenderTarget(). This is how to use it:
- Code:
s$ = NewSurface(100, 100);
oldsurface$ = SetRenderTarget(s$);
g_clear(0);
g_textout(null, "Test", 0, 0, 0, 0);
SetRenderTarget(oldsurface$);
2. I have almost finished the new ui.ppl library which contains many procedures to allow for user interface elements (edit boxes, labels, checkboxes...) to be used with the game api. It is entirely written in PPL. There is also an on-screen keyboard very easy to use.
3. I've changed the default vgarom.fnt to another font style. It is a bit smaller.
I've finally gotten to the point where I'm going to get back into PPL development, and it looks like it couldn't come at a better time. Any ETA on the UI elements for the game API? That will put an already incredible game development library over the top.
Good to see you back PointOfLight. I thought you left us!
As for the ui library, I am still working on it and I am expecting a release by the end of the week or early next week.
I have a few more surprises I will be working on after that...
On July 31st my wife and I had our 3rd child, which puts us at 3 kids under the age of 4. So basically I've had the life sucked out of my for the last 3 1/2 months

But hopefully I'll be back in the swing of things soon. I want to finish up the .cdb viewer I was writing, and I might implement the same viewer for SQLite databases. I also want to get working on a game, which is why the UI is so exciting. Can't wait to see what other surprises you have in store. Sorry to be so off topic here, but oh well...
Congratulations! Wow 3 kids, I have only 1 and I find it hard at times, imagine 3.

Important news:
There was a nasty bug introduced a couple versions ago, huge memory leak. I have just fixed it.
So mervjoyce, wait until this version to investigate further. Do you call a lot of func/proc in your code? Because the leak was related to func/proc calls.
New version of PPL is now available.
New features:
- GameAPI user interfaces. Check UIDEMO.PPL.
- Edit box
- List box
- Button
- Label
- CheckBox
- Per-sprite ai speed timer. (WM_TIMER)
- New sprite option: SO_FREESURFACE.
- Runtime errors are written to the debuglog.txt file as they occur.
- VGA font system redesigned a bit.
- Better standard VGA font. (vgarom.fnt)
- New WM_MOUSELEAVE message for sprites event.
Fixes:
- Major memory leak that was introduced in the last few version was fixed.
- SpriteAt, SpritesAt, CheckCollision fixed to support SO_FIXED sprites.
- SetSpriteAngle now uses degrees instead of RAD angles.
- Fixed g_DrawText, g_DrawText drawing bug and parameters order.
- And much more...
I have the new Dell x50v VGA Pocket PC. I am testing this all out and find the GameAPI extremely slow. Then when I use Picard's GAPI tweak
http://www.aximsite.com/boards/showthread.php?t=57128
, PPL crashes altogether.
---------------------
Update:
Ok, I reset the device with Picard's tweak and it will now run ok. The problem is that I am getting 10-20 fps slower on the 624 mHz device as opposed to my 400 mHz device.
You see, the new Axim x50v has an intense "video card" built in that is optimized for GDI+ games and not GAPI games. I wish there was something I could do.
The simple loop test however gets 296,000 iterations/sec so I now it should be faster
I would suggest asking Picard about it. He is quite an expert in these subjects.
what would I ask him? I don't know the innards of the gameapi
As long as PocketHAL is not fixed to work with this device there is nothing I can do. I use PocketHAL as a third party graphic engine for PPL. I hope there will be an update soon that will fix this.
Btw, the raw performance of PPL should be quite amazing with this little beast!
I agree. Great machine. I posted to PocketHal forum. I hope someone can help me. Maybe not though.
Hi Kornalius,
Thanks for 0.8 beta update 19-11-2004. Installed and everything here runs 100% OK again.
Many thanks for finding and correcting the memory leak. I was having no success at all, but was not looking for something as basic as "every proc/func call".
Kornalius ... You've saved the day again!
I'll get on with expanding my program functionality.
cheers
Little update:
A lot of little bugs here and there have been fixed since the last update.
I worked on fixing quite a few things with the object-oriented features in the last few days.
Today I will focus on the debugger.
Tomorrow I will try to implement isometric sprite display (automatic sorting of sprites on screen) if I have time. The sprites will support a new height property for isometric collision detection and sorting.
On friday I hope to release another build!
how much does oop slow down ppl?
If you use it, it will be just a little slower probably won't notice!

If you don't use it, it doesn't slow down PPL.
kornalius wrote:If you use it, it will be just a little slower probably won't notice!

If you don't use it, it doesn't slow down PPL.
i would be using it in a game and would want to have it as fast as possible
It's not slow it's just a touch slower than regular PPL code. The slowdown only occurs when PPL is looking for an object variable. In a loop it will be a bit slower but in other situations you won't notice. Dynamic optimization cannot be done just like regular PPL code.
Object oriented is a higher level language, therefore cannot be as fast as a lower level code in most cases.
Another little Update:
The debugger is now more stable. I couldn't come up with a completly new algorythm for it but I found the reasons why it wasn't behaving normally before.
I hope to find time today to start working on the isometric display.
Btw, the next release will include the inifiles.ppl library written by PointOfLight some time ago that I totally forgot about, sorry POL.
The next release will be delayed until early next week, I won't be available during the weekend and don't feel like putting out a version that I won't be able to support for a couple days after it's release day. That is just not me!

Small update:
- New functions:
CopySurface() : Copy a surface to another one.
CloneSurface() : Create a copy a surface.
SurfaceEffect() : Apply, Blur, Negative, AlphaBlending or GreyScale to a surface.
- Can't use NULL parameter for main surface buffer anymore. A new variable is used. BUFFER%.
- New functions:
Classes() : Return a list of all defined classes.
Assign() : Assign a pointer to an object. Can also be done this way: &object;$ = pointer$;
I should start work on the isometric features today, more on this later...
This is basically off-topic, but since you were talking about surfaces... is there a way to load a new image into an already existing surface?
No, do you really need it?
Can't really think of a good reason. Just wondered if it existed.
Actually it's not possible after checking the code.
What? Something not possible for you? I don't believe my eyes

Really, though, I didn't have a good reason for it anyway. I was just asking. So stop talking to me and get to work on the isometric stuff

Little update:
New features:
- Isometric sprite sorting is implemented but not finished yet.
- IsoDemo.ppl
- Implemented ZLib library for PC and PPC.
- Pixel-perfect collision detection now works even if sprite sizes changes and even if rotation applied.
Fixes:
- Sprite sorting bug fixed. (ZOrdering now works correctly).
- Fixed PIDE NewSubMenu() form generation error.