Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Announcements and Showcase
Some screen transition animations and filters

sakura
Registered User
Quote
2023-03-25 12:45:53

Hello everyone!

I'm glad to bring the Sakura Function Library update!

This week's update is mainly about adjusting the framework of the function library, testing and modifying the code.

There is not much new things, only 32 functions have been added, hope it is useful for you.

New functions have been added, including Time, Color, Drawt, Filter and Transition Animation.

Because there was already so much code backlog, I had to release a 1.1 version first so that I could do enough testing to make sure the functions would execute correctly.

The currently planned development content I will gradually add in the future, each update will roughly focus on a primary goal and multiple secondary goals, as well as fixing bugs from the previous version.

The major change in this update is the parameters of the LoadVMDCamera function, I spent some time modifying the third of these parameters from the play speed to the actual play frame rate of VMD, which has the advantage of making the game frame rate different from the camera animation frame rate and more accurate.

This is the download address:
https://send.cm/d/Mia9

I have just released the full version 1.1
If you have already downloaded the old version, please re-download the latest version.



sakura
Registered User
Quote
2023-03-25 12:46:40

This is the draw function I added. Now CopperCube can draw opaque rectangles, rectangles based on linear transparency, circles and lines.
🔎︎



sakura
Registered User
Quote
2023-03-25 12:47:18

Added some transition animations, using which you can load maps, data and various other things behind the mask layer.
By modifying the duration, you can also use quick flashes for a simple hit screen effect, or use a pure color filter for a flashbang effect.
🔎︎



sakura
Registered User
Quote
2023-03-25 12:48:02

Transition animations have a lot of parameters and you can control the direction, for example the FlyInOut function, with 16 transition effects.

LeftIn,LeftOut,LeftInOut,RightIn,RightOut,RightInOut,TopIn,TopOut,TopInOut,
BottomIn,BottomOut,BottomInOut,LeftInRightOut,RightInLeftOut,TopInBottomOut,BottomInTopOut

🔎︎



sakura
Registered User
Quote
2023-03-25 12:48:39

This is another transition animation, you can also control its maximum size, increase the screen border or use it to switch scenes, its color and opacity can be modified.
🔎︎



sakura
Registered User
Quote
2023-03-25 12:49:02

This is the screen effect of the mosaic. You can customize the color of the mosaic by simply filling in the colorArray with the color values.
🔎︎



sakura
Registered User
Quote
2023-03-25 12:49:54

There are more functions that can be found in the documentation.

Documentation

Version 1.1
GetColorFromARGB(a,r,g,b)
Get color from Alpha, Red, Green and Blue.

GetColorFromRGB(r,g,b)
Get color from Red, Green and Blue.

GetColorFromHex(hex)
Get color from hex text.
For example: GetColorFromHex("FFFFFF") or GetColorFromHex("FFFFFF")

GetColorFromName(name)
Get color from name.
For example: GetColorFromName("white")
For the name you can see the HTML color name.

GetARGBFromColor(color)
Get Alpha, Red, Green and Blue from color.
The return value structure is {a:0,r:0,g:0,b:0}.

GetRGBFromColor(color)
Get Red, Green and Blue from color.
The return value structure is {r:0,g:0,b:0}.

DrawRect(color,x,y,width,height,opacity)
Draw a rectangle.
The opacity is an optional parameter.
When opacity is not set, transparency is based on color.

DrawCircle(color,x,y,radius,opacity)
Draw a circle.
X and Y are the center point.
The opacity is an optional parameter.
When opacity is not set, transparency is based on color.

DrawLine(color,point1,point2,opacity)
Draw a line.
The point structure is {x:0,y:0}.
The opacity is an optional parameter.
When opacity is not set, transparency is based on color.

GetTime()
Return the current time(millisecond).

GetRunTime()
Return the game run time(millisecond).

GetStartTime()
Return the game start time(millisecond).

GetDeltaTime()
Return the spent time(second) per frame.

GetFrameRate()
Return the current frame rate.

SetFrameRate(frameRate)
Set the current frame rate of the game.
This function can't change the maximum frame rate of the game.
If your game is not 60 fps, you need to use this function
to adjust the reference frame rate of the Sakura Function Library
and improve the accuracy of the calculation.

FadeInOut(color,time,type,maxRatio,opacity)
Fade in/out transition animation.
time(second) is the duration of the transition animation.
type includes: In,Out,InOut
maxRatio controls the maximum play ratio.
The opacity is an optional parameter.
When opacity is not set, transparency is based on color.

IsFadeInOutStop()
Return the fade in/out transition animation playing status,
true means it is playing, false means it is stopped.

ClearFadeInOut()
Clear the fade in/out transition animation.

PureColorFilter(color,opacity)
Single color filter.
The opacity is an optional parameter.
When opacity is not set, transparency is based on color.

ClearPureColorFilter()
Clear the pure color filter.

FlyInOut(color,time,type,opacity,maxRatio)
Fly in/out transition animation.
time(second) is the duration of the transition animation.
type includes: LeftIn,LeftOut,LeftInOut,RightIn,RightOut,RightInOut,TopIn,TopOut,TopInOut,
BottomIn,BottomOut,BottomInOut,LeftInRightOut,RightInLeftOut,TopInBottomOut,BottomInTopOut
maxRatio controls the maximum play ratio.
The opacity is an optional parameter.
When opacity is not set, transparency is based on color.

IsFlyInOutStop()
Return the fly in/out transition animation playing status,
true means it is playing, false means it is stopped.

ClearFlyInOut()
Clear the fly in/out transition animation.

RectInOut(color,time,type,opacity,maxRatio)
Rectangle in/out transition animation.
time(second) is the duration of the transition animation.
type includes: In,Out,InOut,InvertIn,InvertOut,InvertInOut
maxRatio controls the maximum play ratio.
The opacity is an optional parameter.
When opacity is not set, transparency is based on color.

IsRectInOutStop()
Return the rectangle in/out transition animation playing status,
true means it is playing, false means it is stopped.

ClearRectInOut()
Clear the rectangle in/out transition animation.

Rand(min,max)
Returns a random number between the minimum and maximum value.

RandInt(min,max)
Returns a random number(Int) including the minimum and maximum values.

MosaicFilter(opacity,colorArray)
Random mosaic filter


Des
Guest
Quote
2023-03-25 14:19:23

Excellent work sakura keep it up

Pls provide a link to the vmd files for us also ccbs would be extra helpful but all the same
Keep on with your hardwork and pls try to make a camera shake action I provided some code in 0revious threads, see if ita helpful


sakura
Registered User
Quote
2023-03-25 15:21:09

Des wrote:
Excellent work sakura keep it up

Pls provide a link to the vmd files for us also ccbs would be extra helpful but all the same
Keep on with your hardwork and pls try to make a camera shake action I provided some code in 0revious threads, see if ita helpful


Camera shake is already in my development plan and will be added to the function library soon.

VMD camera animation can be searched at https://bowlroll.net/


sakura
Registered User
Quote
2023-03-25 15:24:27

@Just_in_case is a respectable person who brings a lot of useful things to this community, for example he is very good at shader programming.


sakura
Registered User
Quote
2023-03-25 16:32:57

Tips:

For example:
GetColorFromHex("FFFFFF")

GetColorFromName("white")
For the name you can see the HTML color name.


Zimba
Guest
Quote
2023-03-25 18:11:05

For the rectangle drawing and color conversion and Completely Opaque rectangle.

I found this on Just_in_case website https://neophyte.cf/CS_color_con...

So, it was already possible to do this all, you just utilized those functions, and created the transitions and other stuff based on that.

though it's been provided by him already, I will still give you points for it to utilize the color conversion code. He will remain a scum, as he is not answering my questions.

He is a noob and you are pro


sakura
Registered User
Quote
2023-03-25 18:55:16

I took a look at that link you posted and the conversion is too complicated, it's actually quite simple.

The version I'm releasing now can really only be called a pre-release, I'm still adjusting the details of the function and will soon release a new version with better performance when drawing opaque graphics.


sakura
Registered User
Quote
2023-03-25 19:02:41

Later I may release an interesting action extension that will be useful for no-code users.


sakura
Registered User
Quote
2023-03-26 11:21:35

I have just released the full version 1.1.

I have changed all the draw depth parameters to opacity for better understanding, and merged the DrawRect and DrawRectEx function.

If you have already downloaded the old version, please re-download the latest version.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internat?onal" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact