Adam's Lair Forum

game development and casual madness
It is currently 2019/10/17, 13:31

All times are UTC + 1 hour [ DST ]




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 78 posts ]  Go to page 1, 2, 3, 4, 5 ... 8  Next
Author Message
 Post subject: [WIP] Frozen Core plugin
PostPosted: 2013/10/02, 16:38 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 883
Location: Italy
Role: Hobbyist
[11/11/2014] FrozenCore is dead! Long live FrozenCore

No, I am not crazy.. it's just that I am in the process of heavily refactoring and splitting the whole project in a number of subprojects, more defined in scope and hopefully easier to integrate in Duality's plugin vision.
Also, since we'll be using NuGet, I can remove some small-ish sections of code to add references to other, better libraries.

The end functionalities will be the same and (hopefully) nothing will change on the API side.

I will move the repository as well, to stay in line with my other plugin's naming and coding style.

So, for the time being, you can still download the latest version available, but be ready to, at least, change the reference once I am done (not needed, but at least you can update it more easily in the future :D)

Thanks everyone for the support and help!





[LATEST BINARY RELEASE]
Grab it here



[UPDATE 17/04/2014]

Hi everyone,

you can now find all informations, news and showcase for Frozen Core here
http://www.snowypeakstudio.com/frozen-core.html

and there are (will be :mrgreen: ) also a bunch of other info, tutorials etc.
I'll wait for your feedback!



[OLD INFO]


you can grab the full sourcecode here:
https://github.com/SirePi/FrozenCoreDuality

[UPDATE 03/03/2014]

Well, it has been long and difficult, but I finally managed to complete (ok, almost :mrgreen: I still need to finish a couple of things) my FrozenUI. Basically is a collection of basic Widgets that can be used for menus and mouse-driven User Interfaces.

At the moment you will find the following Widgets:
  • Panel
  • Button
  • CheckButton
  • RadioButton
  • ScrollBar
  • Window
  • TextBox
  • TextBlock
  • ListBox
  • Window

For the moment you can give a Widget a Skin and set some other options (more will come in the future, especially those relative to layout and management of text)

This is a quick preview of what can be done at the moment:
Attachment:
frozenUi.png


Or, if you want to download the sample, grab it here!
https://github.com/SirePi/FrozenCoreSam ... UIDemo.zip

Again, thanks to everyone (and especially Adam) for the help! Hope it will be of help :mrgreen:

[UPDATE 10/10/2013]


and a quick sample, to be copied in the latest Duality directory
https://www.dropbox.com/s/p2ohldl6gx6yw ... Sample.zip

----------------------------------------



After a couple weeks of hammering around, I can finally introduce Frozen Core!

What is it

My first plugin library for Duality, including more or less everything I think *I* will need for starting developing some games. Currently still a work in progress but with some functionalities already developed.
It is not entirely made by me, as some classes / ideas are taken around the net.


What's inside

FrozenCore.FastRandom
A quick xor-shift based pseudo-random number generator

FrozenCore.Colors
All the traditional System.Drawing.Colors already converted to ColorRgba for your convenience :mrgreen:

FrozenCore.Collections.Map
A two-way dictionary where you can perform a lookup per key and/or per value (based on http://stackoverflow.com/a/10966684)

FrozenCore.Components.InputController and FrozenCore.Components.InputElement
Event-driven controller for Keyboard and Mouse, allows to direct commands to one InputElementbetween many, with the ability to switch between them by direct Mouse selection or Keyboard.
Can be configured in order to listen only to Keyboard or Mouse events, InputElement class methods should be derived in order to define the desired behavior for Mouse and Keyboard events.
Allows to drag InputElements around.

FrozenCore.Data.Range, FrozenCore.Data.IntegerRange, FrozenCore.Data.FloatRange, FrozenCore.Data.ColorRange
Abstract and derived types that allow to easily interpolate between two values.

FrozenCore.Data.Graph
Directed / Undirected graph implementation based on the concept of Links and Nodes.
Included Triangulator library (http://paulbourke.net/papers/triangulate/morten.html) allows to perform Delaunay triangulation on the Graph itself.

FrozenCore.FX
Helper classes for the management and realization of special effects such as

FrozenCore.FX.Lightning
Shocking! :mrgreen: (based on http://gamedev.tutsplus.com/tutorials/i ... g-effects/)
Attachment:
lightning.jpg

Customizable Source and Target areas (FrozenCore.FX.FXPoint, FrozenCore.FX.FXCircle, FrozenCore.FX.FXRectangle), frequency, amplitude etc.

FrozenCore.FX.ParticleEmitter
Lots of colors!
Attachment:
particles.jpg

Customizable source area, and lots of parameters!


When will it be ready?

Not exactly sure now.. there are still some things I want to polish before version 0.1 is made available. I will be putting the source code somewhere online anyway one of these days. Or, if you'd like to have a preview, leave a message and I will send it your way.


What's next

I plan to implement more customizable gradients for use in the FX classes, and if possible dedicated editors to be used in Dualitor.
Also, I will try to add some shaders, but I am still a complete noob on that side so.. that might take a while :mrgreen:


Why Frozen Core?

It's a long story that began at university between my group of friends.. to cut it short, it's because where I live can get very cold.. and I like the name :mrgreen:


I would like to give my thanks to Adam for the wonderful engine and all the suggestions he gave me in these days (and that I am sure will continue to give me :mrgreen: ). Hope I can help Duality get even better.

_________________
Come on Duality's Discord channel. We have cookies! :mrgreen:


Last edited by SirePi on 2014/11/11, 11:28, edited 17 times in total.

Top
 Profile  
 
PostPosted: 2013/10/07, 23:02 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2073
Location: Germany
Role: Professional
Looks neat so far - especially particle systems is something that Duality misses out on right now. It's hard to judge all this based on a single forum posting, though.. when will you publish a first version for testing purposes? Will it be Open Source?

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
PostPosted: 2013/10/10, 16:08 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 883
Location: Italy
Role: Hobbyist
updated.. see first post

_________________
Come on Duality's Discord channel. We have cookies! :mrgreen:


Top
 Profile  
 
PostPosted: 2014/01/08, 13:22 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 883
Location: Italy
Role: Hobbyist
Hi everyone, I'm still alive! :mrgreen:

Just a quick heads up on what's been cooking in the FrozenCore:
  • Reworked the namespaces, moved stuff around with a better organization
  • Added an abstract LoadableResource type which can be used for Resources that need a long time to load / generate. The actual loading process is done by a separate thread which allows to develop animated loading screens while all the data is being loaded.
  • And the big part, I am developing a collection of basic, skinnable Widgets for use in UIs. At the moment the Button is complete and the Window is more or less finished. They can be placed in the Scene, scaled and rotated. Next planned Widgets are: ListBoxes, ComboBoxes, CheckBoxes and RadioButtons, and TextEditors.

I hope I can have another stable version soon.. I'll keep you posted

_________________
Come on Duality's Discord channel. We have cookies! :mrgreen:


Top
 Profile  
 
PostPosted: 2014/01/08, 19:05 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2073
Location: Germany
Role: Professional
SirePi wrote:
  • Added an abstract LoadableResource type which can be used for Resources that need a long time to load / generate. The actual loading process is done by a separate thread which allows to develop animated loading screens while all the data is being loaded.


That sounds quite interesting. How stable is it, and are there any major drawbacks? Can the user break this or cause a program crash by not knowing he's dealing with multithreading? How did you implement it?

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
PostPosted: 2014/01/08, 22:40 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 883
Location: Italy
Role: Hobbyist
Well, you can check here for an idea (it's not the last commit but I didn't touch this part in a long time, so it might as well be the last version)

https://github.com/SirePi/FrozenCoreDua ... dLoader.cs
https://github.com/SirePi/FrozenCoreDua ... esource.cs

ThreadedLoader is the component actually in charge of loading a single Resource. It has to be extended in order to implement two functions:
  • LoaderOnUpdate is called at each update and should be not too intensive.. maybe you can use it to animate a spinning icon or filling a bar
  • LoadingComplete is called when the LoadableResource's LoadInBackground method, executed by the background thread, exits. At that moment you can do what you want: change Scene, notify another object in the Scene that waits for all ThreadedLoaders to finish, etc..

From my tests is quite stable. Of course you have to code the LoadInBackground properly to avoid infinite loops, any eventual race conditions in case you have to reference other objects outside the class and everything else that might happen in a multithreaded environment.

If you see any issues or have any suggestions, feel free to comment :mrgreen:

_________________
Come on Duality's Discord channel. We have cookies! :mrgreen:


Top
 Profile  
 
PostPosted: 2014/02/06, 11:59 
Newbie
Newbie

Joined: 2014/02/06, 10:52
Posts: 8
Role: Professional
Nice addition to Duality.

I'm still watching your repo and try to use the plugin. Still fiddling with the values. Is it possible to create/fill Widgets and Effects with standard values?

How can I define an FXArea?

_________________
gamejams.schattenkind.net | crankgaming.blogspot.de | https://twitter.com/crank_gaming


Top
 Profile  
 
PostPosted: 2014/02/06, 13:18 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 883
Location: Italy
Role: Hobbyist
SiENcE wrote:
Nice addition to Duality.

Thanks for the interest! Hope it will be of help
SiENcE wrote:
I'm still watching your repo and try to use the plugin. Still fiddling with the values. Is it possible to create/fill Widgets and Effects with standard values?

Good idea.. I'll keep it in mind for the next update. Especially for Widgets I think I will have to prepare a default plain-color rendering mode, if there is no Skin set
SiENcE wrote:
How can I define an FXArea?

You simply create a new FrozenCore.FX.FXPoint, FXRectangle or FXCircle Components in the Scene and link the Emitter to it. (It can be another Component of the ParticleEmitter's GameObject itself)

Let me know if you need some help, I'll be glad to assist and I might find out some issues as well.

EDIT: Typos and fixes

_________________
Come on Duality's Discord channel. We have cookies! :mrgreen:


Last edited by SirePi on 2014/02/06, 13:27, edited 1 time in total.

Top
 Profile  
 
PostPosted: 2014/02/06, 13:25 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2073
Location: Germany
Role: Professional
Quote:
Especially for Widgets I think I will have to prepare a default plain-color rendering mode, if there is no Skin set


I did that once, when I wrote ZweiDe and its User Interface module "Fenster" back in 2009. My advice for you: Don't. Programming an internal fallback to render unskinned Widgets can become quite painful when the complexity increases. Instead, consider simply using a fallback Skin. That way, you'll only have to write all the drawing code once.

Not sure whether it applies to your specific plugin, though. Depends on how you've structured it and whether or not a Skin is actually its own instance.

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
PostPosted: 2014/02/06, 13:36 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 883
Location: Italy
Role: Hobbyist
Adam wrote:
I did that once, when I wrote ZweiDe and its User Interface module "Fenster" back in 2009. My advice for you: Don't. Programming an internal fallback to render unskinned Widgets can become quite painful when the complexity increases. Instead, consider simply using a fallback Skin. That way, you'll only have to write all the drawing code once.

Not sure whether it applies to your specific plugin, though. Depends on how you've structured it and whether or not a Skin is actually its own instance.


In fact I was wondering why there was no such thing as ZweiDe's UI in Duality :D it looked neat from the screenshots.

For how I made it, a Skin is a Resource pointing to a Texture with some extra parameters, which is then cut and applied by drawing Quads directly. I think it would just be a matter of falling back to the default White Texture in case there is no Skin assigned. Otherwise, at the moment, you end up with an empty square in space, without even knowing where it is :mrgreen:

Since we are on the topic, I noticed that in some cases I end up with some blurring between the quads if the GameObject is too "skinny" (i.e. taller than wider).
Basically from a GameObject's Rect I get a 3x3 grid which is then filled with the cutouts of the Texture, in order to support various sizes without the need to have a specific Texture for each one. In the case I mentioned I get that, while on a "big" GameObject the texture appears crisp as it was drawn in a graphic editor, on skinny GameObjects it appears blurry on the Horizontal plane.
Do you have any idea on what might the issue?

_________________
Come on Duality's Discord channel. We have cookies! :mrgreen:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 78 posts ]  Go to page 1, 2, 3, 4, 5 ... 8  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group