Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Curve a Picture

Hello,

I wanted to ask if there?s a way to curve a straight picture..

I put an example in the attachment. The blue one is normal.. the red one is curved.

Situation:
I show the picture via $game_screen.picture[ID].show(...)
or via draw bitmap clas in a transparent Window... how i?m showing.. is not of importance
important is only that i can erase the picture from the screen when i want.. And show it again.
Best is to show it if $hud[0] is true.. and erase it if it?s false.

I need it for an HUD. The Values i use are in the following Hash:
@Hero["HP"]
@Hero["MAXHP"]
@Hero["MP"]
@Hero["MAXMP"]

*I use hashes because i want to go away fro the Database settings.*
 
I think he wants to curve an existing picture, which the CGT cannot (I believe). But please tells us more details : what kind of picture, when do you want to generate one (static or dynamic), maybe another example (I didn't understand yours...)
 
I need it for an HUD

I start to see what you want to do. Could you post the 2 bars you intend to using ? Your best bet would be to generate the fully curved image first, then "cut" the top when needed with a script to adjust it to your HP total.

Generating a true curved image in real time with a scripted language isn't easy (well, laggy) so the more informations and presets we have, the better.
 
The original Bars are not drawn yet.. but i know the size..

so, in the attachment are the right sized Bar-Dummys, and the Curve Template.


In the middle between the two quarter curvers is empty space.. That?s because there will be the player face, and some other Stats. so pleace keep this space free ^^

and.. thx
 
Curve around a picture.

Like i said. In the middle of the HUD-Form will be shown a new picture ( zwo twisted swords ). On these picture the Hero Stats and face will be shown.
 
If I understand your request correctly, what you want to do is just use a curved 'meter' bar, not necessarily 'bend' a linear bar into a curved bar.

Is the quarter circle bar 'full'? (max HP & SP)
Is the background of the HUD transparent?

The reason I ask is, if the background is opaque, you could create a mirror image of the bar, in the open area of the circle, the same color as the background, and then simply rotate that picture around it's center to shrink the bar(s).

Another option would be to divide each bar into multiple pieces and display each piece as a seperate picture, then erase, or redisplay, each piece to make the bar shrink or grow.

Rather than describing your proposed solution, try describing the actual problem, or desired result, then we may be able to help.

Be Well
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top