Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (NewbieZorro, TipmyPip, 1 invisible), 19,045 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Final Fantasy style damage numbers ?? #308842
02/05/10 12:33
02/05/10 12:33
Joined: Apr 2008
Posts: 144
Germany | Niedersachsen (Lower...
Roxas Offline OP
Member
Roxas  Offline OP
Member

Joined: Apr 2008
Posts: 144
Germany | Niedersachsen (Lower...
Hey guys.

I wonder how to achieve something like the damage numbers in final fantasy,
you know, when your character runs to the monster, and strikes him with his weapon, there're numbers which indicate the damage your character dealt.

I tried to use sprites with numbers from 0 to 9 and to show them above the enemy who was hit by a character depending on the damage he dealt.

the problem is, the numbers are facing the camera, what actually is fine to me, thats what i want, but they don't move to the camera. what i mean is, they stay on their given place, facing the camera. so they overlap eachother in the viewport.

i assume that there must be another possibilty like copying the numbers on a new sprite that'll face the camera. but i need some help because i do not know how to solve this

hope you can help me,

best regards
Roxas

Re: Final Fantasy style damage numbers ?? [Re: Roxas] #308843
02/05/10 12:44
02/05/10 12:44
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
render a panel with digits on bmap, and use this as the sprite's skin. i am not sure if this is posible but it should be.


3333333333
Re: Final Fantasy style damage numbers ?? [Re: Quad] #308857
02/05/10 14:12
02/05/10 14:12
Joined: Jan 2004
Posts: 3,023
The Netherlands
Helghast Offline
Expert
Helghast  Offline
Expert

Joined: Jan 2004
Posts: 3,023
The Netherlands
Code:
VECTOR temp = vec_to_screen(player.x, camera);
draw_text(str_for_num(NULL, varDamageNum), temp.x, temp.y, vector(255,255,255));



if you use that in a loop, it'll draw the variable given at varDamageNum on the player's position. if you change the player.x to the entity you want to display the damage above, it should work fine.

remarks:
code is untested, so might not work instantly.
Make sure the entity though is onscreen (temp != NULL).
That should get you started laugh

regards,


Formerly known as dennis_fantasy
Portfolio - http://www.designorhea.com/
Project - http://randomchance.cherrygames.org/
Re: Final Fantasy style damage numbers ?? [Re: Helghast] #308863
02/05/10 14:30
02/05/10 14:30
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
from what i remember in FF the text spwans on enemy's head, so it is 3d, i mean it is smaller for enemies that are far away?


3333333333
Re: Final Fantasy style damage numbers ?? [Re: Quad] #308876
02/05/10 15:42
02/05/10 15:42
Joined: Jan 2004
Posts: 3,023
The Netherlands
Helghast Offline
Expert
Helghast  Offline
Expert

Joined: Jan 2004
Posts: 3,023
The Netherlands
draw_textmode and set fontsize based on distance between target and camera?
(you can also fade the text out using draw_textmode and a loop)

Last edited by Helghast; 02/05/10 15:42.

Formerly known as dennis_fantasy
Portfolio - http://www.designorhea.com/
Project - http://randomchance.cherrygames.org/
Re: Final Fantasy style damage numbers ?? [Re: Helghast] #308908
02/05/10 18:59
02/05/10 18:59
Joined: Apr 2008
Posts: 144
Germany | Niedersachsen (Lower...
Roxas Offline OP
Member
Roxas  Offline OP
Member

Joined: Apr 2008
Posts: 144
Germany | Niedersachsen (Lower...
alright sorry for my late reply.

well as far as i know the numbers are always the same size, no matter if the camera is close or not, so maybe they just draw them on screen as a viewobject. but im not certain about that.
i will try the draw-text thing later. maybe this works for me.

but to add a little something extra.
i tried something like following:

i made a tga sprite for all numbers from 0 to 9, and they are all the same size, furthermore i made 4 black bmp's, one for each numbertype like, 1er, 10er, 100er and 1000er numbers.

for example -
i got a damage of 122
the thing i tried is to isolate the first number and to bmap_blitpart it to the bmap which holds space for the 100er numbers.
i wanted to make this for every number so that i would have a bitmap, which holds all numbers. and then i wanted to create it above the enemy's head. but it didn't work, i got a strange error which said nothing to me.

i hope you got the basic idea behind this.

best regards
Roxas

Re: Final Fantasy style damage numbers ?? [Re: Roxas] #308962
02/06/10 03:31
02/06/10 03:31
Joined: Jun 2004
Posts: 2,234
Wisconsin USA
FoxHound Offline
Expert
FoxHound  Offline
Expert

Joined: Jun 2004
Posts: 2,234
Wisconsin USA
If you want 3d numbers I would just model 0 - 9 numbers, set up to work in 10s and 100s or even 1000s and have them appear above the character's head when damage is inflicted. Also set up a green texture to use for healing.


---------------------
There is no signature here.


QUIT LOOKING FOR ONE!
Re: Final Fantasy style damage numbers ?? [Re: FoxHound] #309097
02/07/10 08:35
02/07/10 08:35
Joined: Aug 2008
Posts: 482
B
bart_the_13th Offline
Senior Member
bart_the_13th  Offline
Senior Member
B

Joined: Aug 2008
Posts: 482
I think Helghast's method is better and easier. The numbers shouldnt obstructed by other 3D object which means text will do better than 3d sprites.
The vec_for screen will represent the 3D position of the object into 2D screen position.

Re: Final Fantasy style damage numbers ?? [Re: bart_the_13th] #309233
02/08/10 02:50
02/08/10 02:50
Joined: Jun 2004
Posts: 2,234
Wisconsin USA
FoxHound Offline
Expert
FoxHound  Offline
Expert

Joined: Jun 2004
Posts: 2,234
Wisconsin USA
I'm not arguing with that, in Tower I made 2d numbers and had them moved with the blocks they were showing to be blown up, however the OP seemed set on using 3d numbers and I am working with that idea.


---------------------
There is no signature here.


QUIT LOOKING FOR ONE!

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1