Some missing functions for next release of PB

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
TazNormand
User
User
Posts: 27
Joined: Tue May 26, 2009 3:17 pm
Location: France

Some missing functions for next release of PB

Post by TazNormand »

Hi

OK, PureBasic 5.40 LTS is out, and as versions pass, PureBasic seems to be oriented more "professional" programming but still missing some important little things like :
  • for n=0 to step variable : why we still couldn't use a variable as STEP ? and a floating variable/constante ?
    select...case : ability to use operands like < > (case < 5, case > 200...)
    UseBuffer() return : drawing sprite on sprite, not on screen
    2 openwindowedscreen on 1 window
    ternary test condition (some of iif())
    flipsprite() : vertically and/or horizontally
    More functions for graphical screens, especially for sprites, no specific idea for now
    Sound generation function like Amstrad locomotive Basic Sound command (yes i love oldschool stuff) to produce better beep sounds :lol:
Not sure if all if possible, and i know there are many code on the forum to do some of my request (ie iif macro), but implemented features are simplier for beginners like me.

For the "More graphical functions, sprites functions", i'm tired with headache for now and forgot what i wanted as more functions, so i'll go back for more details later. :oops:

If you have ideas/requests for 2D screen/sprites, you're welcome to post them here :wink:
User avatar
kenmo
Addict
Addict
Posts: 2032
Joined: Tue Dec 23, 2003 3:54 am

Re: Some missing functions for next release of PB

Post by kenmo »

for n=0 to step variable : why we still couldn't use a variable as STEP ? and a floating variable/constante ?
You can just use a While loop and increment your counter however you like. :)
select...case : ability to use operands like < > (case < 5, case > 200...)
Do any other languages have that? Why not use If:ElseIf for checks like that?
ternary test condition (some of iif())
Would be nice. I use macro versions for now.
flipsprite() : vertically and/or horizontally
Requested many times over the years... :(
Sound generation function like Amstrad locomotive Basic Sound command (yes i love oldschool stuff) to produce better beep sounds :lol:
There are lots of sound generation examples on the forum. It seems like an odd request to be an official PB-included library.
More functions for graphical screens, especially for sprites, no specific idea for now
If you have ideas/requests for 2D screen/sprites, you're welcome to post them here :wink:
Have you tried SDL2? I've used it with PureBasic (Windows and Mac). It gives you a lot more multimedia control than native PureBasic libs (screens, sprites, keyboard/mouse, gamepad). Audio/music controls are decent too.
User avatar
[blendman]
Enthusiast
Enthusiast
Posts: 297
Joined: Thu Apr 07, 2011 1:14 pm
Location: 3 arks
Contact:

Re: Some missing functions for next release of PB

Post by [blendman] »

I agree with a lot of your suggestions ;).
UseBuffer() return : drawing sprite on sprite, not on screen
+1. To have the possibility to display sprites on a sprite would be very great !

flipsprite() : vertically and/or horizontally
Flipsprite() is very important feature, for animation and other cool stuff in games.

More functions for graphical screens, especially for sprites, no specific idea for now
- not to have the mouse blocked inside the screen
- change the center of a sprite for rotation or zoom
- to have the possibility to color a sprite : with DisplayTransparentSprite(sprite,x,y,alpha, color) -> color should be multiplied not replaced like actually (like with vertex color in 3D). We can have a function ReplaceSpriteColor() -> does the same thing like the DisplayTransparentSprite() , and DisplayTransparentSprite() multiply the color with color of the image.
- SpriteUV

More informations :
http://www.purebasic.fr/english/viewtop ... =3&t=62628
Thorium
Addict
Addict
Posts: 1305
Joined: Sat Aug 15, 2009 6:59 pm

Re: Some missing functions for next release of PB

Post by Thorium »

TazNormand wrote: and a floating variable/constante ?
Using floats on for next is actualy not a good idea.
It's extremly slow because it needs some extra care do work reliably. You can't just increment floats like integers.
Here is a thread about the dangers of incrementing floats in for next loops: http://www.purebasic.fr/english/viewtop ... 13&t=61753
Post Reply