Product Chat / Supporting PNG and 2D Sprites in General ?

Author
Message
QatariGameDev
GameGuru TGC Backer
10
Years of Service
User Offline
Joined: 18th Jan 2014
Location: Doha
Posted: 6th Aug 2014 19:56 Edited at: 6th Aug 2014 19:59
I think having the ability to render an animated SpriteSheets would benefit us, this would be a handy feature

for developing a Light and Fast Particle Systems which will boast the performance to maximum, also we can add more GUI and Other graphically elements into the game (EX: like slender notes)



i remember, UDK having a similar system for rendering the blood and explosions, which in fact they actually using png SpriteSheet images instead of a real-time 3d particles.
Wolf
Forum Support
16
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 6th Aug 2014 19:58
You could do that in FPSC Classic... I'm sure you can do that in reloaded too.

"When I contradict myself, I am telling the truth"

"absurdity has become necessity"
tomjscott
User Banned
Posted: 6th Aug 2014 20:09
You can do that right now. I have the animated sprite pack from classic and took Bond1's old shader file and it works with a few tweaks to the shader. If you have the animated sprite pack or something equivalent and want help to get it to work, I can help. I used animated sprites for my contest entry in several places.

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.0071
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 7th Aug 2014 17:06


PM
QatariGameDev
GameGuru TGC Backer
10
Years of Service
User Offline
Joined: 18th Jan 2014
Location: Doha
Posted: 7th Aug 2014 17:21
wow i'm really glad this feature already supported !!

@tomjscott @3com any tutorials or tips how we can call this into FPSC-Reloaded ?
i want to learn using this, also it's possible to replace an animated images effects with the explosions effects ?
tomjscott
User Banned
Posted: 7th Aug 2014 17:27
I'm so busy with all my Omega Core plugin coding and getting back to polishing my demo game Rescue the Princess that I don't have much time to spare for making tutorials and stuff like that. However, when I get a chance I'll attach a sample entity that uses the modified shader and one of the stock atlas textures. Maybe the explosion.

The one drawback to this is that it is a continuous looping animation. The problem with things like explosions is that they should be one shot effects with a beginning and and end. Even if you were to hide the explosion entity, there is no guarantee that when you show it that it'll be at the first frame of the animation. And then you have to hide it again strategically on the last frame for best effect. This technique works best for continuous looping effects such as fire, smoke, etc.

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.0071
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 7th Aug 2014 17:30
I'm sorry but I'm not the right person to help you, in fact I have plans to install Reloaded this weekend.
I'm sure tomjscott can help you.
PM
QatariGameDev
GameGuru TGC Backer
10
Years of Service
User Offline
Joined: 18th Jan 2014
Location: Doha
Posted: 7th Aug 2014 17:34
No problems my friends, i'm not in hurry in fact, but at least I'm glad this still possible with FPSC-R, thanks for the both of you
tomjscott
User Banned
Posted: 7th Aug 2014 19:15
I thought about this some more and I'm thinking that with the Spawn function working in current engine versions that using this for an explosion might actually work. It could force the first frame to start right at spawn time. The only thing to do then is to turn it off at the right time so it doesn't loop and look strange. I'll have to give this a try.

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.0071
rolfy
17
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 7th Aug 2014 20:11 Edited at: 7th Aug 2014 20:16
Quote: "I thought about this some more and I'm thinking that with the Spawn function working in current engine versions that using this for an explosion might actually work. It could force the first frame to start right at spawn time."
It doesn't, was same problem in classic, the timer starts when the level starts for frames, you would have to create some kind of variable in the shader itself. It may be that it is doing what you want in the engine but I reckon this is only appearing to do so because of the design of the Atlas textures themselves, could be wrong, but for sure if you try to span and destroy with a timer it will do so but the frame start is absolutely hit and miss.



You don't need to hunt down bond1's shader either there is a version of the Atlas walk shader provided in Reloaded now called effect_animate.fx. I believe this shader is currently being used for the particle and explosion effects.

A funny thing happened on the way to the forum...
tomjscott
User Banned
Posted: 7th Aug 2014 20:14
Quote: " there is a version of the Atlas walk shader provided in Reloaded now called effect_animate.fx"


Nice. I didn't know that. I was already using a modified bond1 shader so I had no need to look for an updated one. They must have added it in 1.008.

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.0071
rolfy
17
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 7th Aug 2014 20:18 Edited at: 7th Aug 2014 20:22
Would be nice if an animation could be started and stopped per frame in the shader as it could be used for progressive damage etc even on characters if the code were added into the character_basic.fx shader..

A funny thing happened on the way to the forum...
tomjscott
User Banned
Posted: 7th Aug 2014 20:24
Quote: "Would be nice if an animation could be started and stopped per frame in the shader"


Agreed. I've thought of ways to tell the shader variable arguments, but we are limited to what the engine passes to it. I had a skybox shader that took the ambient light value and if it was within a certain range then do something different (darken the sky, for example). I think you can do this here as well, but you just need to make subtle changes to what's available because you end up changing the scene's look when you might not want that. You could for example cycle through a subtle range of fog colors and use the value of the fog parameter as an index to the frame you want to play.

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.0071
rolfy
17
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 7th Aug 2014 20:33 Edited at: 7th Aug 2014 20:36
Quote: "Agreed. I've thought of ways to tell the shader variable arguments, but we are limited to what the engine passes to it."
That is the problem right there, as a non coder I know what I want to do but limited to what the engine will let me do



If you reckon a parameter from fog or whatever can be used to control a shader variable then why not a simple function to do so? To me the problem would be finding a way to get the shader itself to accept any variables. I do know shader variables exist but not sure how to use them in code or if a start/stop frame for Atlas would even be one of those.

A funny thing happened on the way to the forum...
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 7th Aug 2014 21:14
There are no plans for any 2D sprite LUA commands in V1.009 but if I read a few posts on the subject, and a backing community opinions on the subject I can promote the addition of a few key HUD commands in there so you can load, place and remove images as part of your scripting fun.

PC SPECS: Windows 7 Ultimate 64-bit, Intel Core i7 920 (PASSMARK:5008), NVIDIA Geforce 9600 GT GPU (PASSMARK:752) , 6GB RAM

tomjscott
User Banned
Posted: 7th Aug 2014 21:18
Quote: "To me the problem would be finding a way to get the shader itself to accept any variables. I do know shader variables exist but not sure how to use them in code or if a start/stop frame for Atlas would even be one of those."


Right. The engine is the one that passes variables to the shader and only the engine can give it new variables. That's just the nature of it. But, if Lee could add some generic type variables to be passed into a shader and we had access to a Lua function to set those values then you'd have what you need for custom shader control.

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.0071
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 7th Aug 2014 21:22
I think many people have wanted hud support for as long as reloaded has been out. No brainer for me Get em in!



SPECS: Q6600 CPU. Nvidia 260GTX. 8 Gig Memory. Win 7.
QatariGameDev
GameGuru TGC Backer
10
Years of Service
User Offline
Joined: 18th Jan 2014
Location: Doha
Posted: 7th Aug 2014 21:30 Edited at: 7th Aug 2014 21:31
beside loading static images and HUD, i think a simple 2D sprite animated function would be perfect, the reason i requested this

to create some effects like explosions or blood instead of 3d real time particles.



even not at the V1.009 for the time being, but i hope you will consider it for the next updates, this might open doors for other games at future.
tomjscott
User Banned
Posted: 7th Aug 2014 21:31
Quote: "I think many people have wanted hud support for as long as reloaded has been out. No brainer for me Get em in!"


Don't forget my plugin is going to have full GUI support in a short while. You'll have all the HUD control you can want very soon. But, yeah, having it in the core engine obviously awesome as well.

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.0071
AuShadow
GameGuru TGC Backer
10
Years of Service
User Offline
Joined: 2nd Dec 2013
Location: Australia
Posted: 8th Aug 2014 08:45 Edited at: 8th Aug 2014 10:39
@lee I am full support for that



EDIT: any chance with that we could have the ability to have LUA propmts where we want them so for example i could display how much money someone has on the top left of the screen and it wouldn't be affected by other p
Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 8th Aug 2014 09:53
I was actually wondering if this was possible in Reloaded.

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce 420 GT
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 8th Aug 2014 18:06
Quote: "I can promote the addition of a few key HUD commands in there so you can load, place and remove images as part of your scripting fun."

Totally agree.
I'm Reloaded skills=0 yet, but I think 2d graphs can save some memory waste.

3com
PM
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 13th Aug 2014 21:56
The only LUA command is PROMPT which allows you to place a single piece of text to the screen for X seconds. We will likely expand upon this to allow images, and eventually move onto interactive images and multiple assets in play.

PC SPECS: Windows 7 Ultimate 64-bit, Intel Core i7 920 (PASSMARK:5008), NVIDIA Geforce 9600 GT GPU (PASSMARK:752) , 6GB RAM

QatariGameDev
GameGuru TGC Backer
10
Years of Service
User Offline
Joined: 18th Jan 2014
Location: Doha
Posted: 13th Aug 2014 22:25 Edited at: 13th Aug 2014 22:42
Quote: "The only LUA command is PROMPT which allows you to place a single piece of text to the screen for X seconds. We will likely expand upon this to allow images, and eventually move onto interactive images and multiple assets in play."




that's cool, please allow this feature as soon as possible for the animated images!!

this might playing well for adding some interactive texts effects, like leveling up !! or when we complete the stages, beside making a 2d

light effects which might boast the performance instead of the real-time particles.

Login to post a reply

Server time is: 2024-05-03 08:43:51
Your offset time is: 2024-05-03 08:43:51