Adam's Lair Forum

game development and casual madness
It is currently 2017/03/25, 01:57

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Plugin: Duality.Actions
PostPosted: 2017/02/09, 20:03 
Forum Adept
Forum Adept
User avatar

Joined: 2015/03/15, 02:49
Posts: 351
Location: Out there
Role: Hobbyist
Hey there!

As promised a while back, I offered myself to make a behaviours plugin, and here it is.
The programming could be better, but I'm fairly certain the logic is sound.

For some reason, Duality's Time class is kicking my ass, because I'm having to resort to Time.LastDelta for a few calculations. Not sure if it is right but the output is smoooooothhh, so it must not be that wrong.

Included:
4 Directional movement (with the possibility to map keys)
Fading In Out and both
Wave Movement (sin wave)
Lateral Movement (cos wave)
Look at Mouse
Look at GameObject
Look at Position
Make Solid (currently useless)
Move To Position (HardCoded)
Move To Mouse
Move to Mouse Click
Move To GameObject
Rotate Clockwise and Anticlockwise

Any and all additional behaviours you might think are welcome. I believe this could be quite a useful tool.

For me anyway.
I'll slap it on Nuget, what do you have to say? Is it worthy at this time, or should I wait until it is more mature?

_________________
Hello there! Nice to meet you!
I have github. Apologies in advance for bad coding practices.


Last edited by eyeliner on 2017/02/13, 16:40, edited 1 time in total.

Top
 Profile  
 
PostPosted: 2017/02/09, 20:16 
Veteran Member
Veteran Member
User avatar

Joined: 2016/01/10, 10:56
Posts: 140
Location: Budapest
Role: Hobbyist
Cool, this is definitely useful! Time stuff is going to change in v3 to a degree, so don't bother too much with that (However I don't have a slightest expectation on the release date). I think the set of the features is complete enough to fill a meaningful package (also there's a namespace name convention you might wanna now about). Just write some docs ^^


Top
 Profile  
 
PostPosted: 2017/02/10, 14:31 
Forum Adept
Forum Adept
User avatar

Joined: 2015/03/15, 02:49
Posts: 351
Location: Out there
Role: Hobbyist
Hm... Can't seem to remember to see any namespace conventions anywhere.

Care to enlighten the heathen? xD

_________________
Hello there! Nice to meet you!
I have github. Apologies in advance for bad coding practices.


Top
 Profile  
 
PostPosted: 2017/02/10, 17:32 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 819
Location: Italy
Role: Hobbyist
either
Duality.Plugins.YourPluginName
or
YourName.Duality.Plugins.YourPluginName

_________________
Come on Duality's Discord channel. It's entertaining and productive! :mrgreen:


Top
 Profile  
 
PostPosted: 2017/02/10, 17:46 
Forum Adept
Forum Adept
User avatar

Joined: 2015/03/15, 02:49
Posts: 351
Location: Out there
Role: Hobbyist
Ah, cool stuff! I shall post it on Nuget (I hope) shortly.

_________________
Hello there! Nice to meet you!
I have github. Apologies in advance for bad coding practices.


Top
 Profile  
 
PostPosted: 2017/02/10, 20:48 
Forum Adept
Forum Adept

Joined: 2015/07/08, 16:41
Posts: 414
Role: Gamer
Nice work! Looks like it'll help in quick prototyping situations.

Also, one more thing: You appear to have included the auto-generated YourCustomComponentType.cs file in the repository?


Top
 Profile  
 
PostPosted: 2017/02/11, 13:51 
Forum Adept
Forum Adept
User avatar

Joined: 2015/03/15, 02:49
Posts: 351
Location: Out there
Role: Hobbyist
Thanks! That is one of the intended points. Slapping a few routinely used "controls", without the need to code them in, specially if they are a couple of lines long, should help someone new in game development/Duality breaking in.

I'd like some suggestions, though. There's a few more behaviours (I'll call them "actions" from here on) I can add, and a few more I might forget, so throw them suggestions in!

About that class:
Heh, guess I forgot to delete it. Don't remember how I managed to let that one through, though. It doesn't appear in my solution. And the namespace is way off.

Must have been some freak leftover file, because I created a new project from Duality itself, and it might have made a copy of it. I'll get to it eventually.

Edit:
And as I figured, I can't understand Nuget, yet. This thing doesn't appear in Duality's package manager. *sigh*

_________________
Hello there! Nice to meet you!
I have github. Apologies in advance for bad coding practices.


Top
 Profile  
 
PostPosted: 2017/02/11, 18:46 
Forum Adept
Forum Adept

Joined: 2015/07/08, 16:41
Posts: 414
Role: Gamer
eyeliner wrote:
Edit:
And as I figured, I can't understand Nuget, yet. This thing doesn't appear in Duality's package manager. *sigh*
It seems like it does appear initially, but it might be because of version incompatibility that it is filtered out. Could you post the .nuspec file, so we could take a look?


Top
 Profile  
 
PostPosted: 2017/02/13, 14:04 
Forum Adept
Forum Adept
User avatar

Joined: 2015/03/15, 02:49
Posts: 351
Location: Out there
Role: Hobbyist
Hey! Got it to appear, finally. I guess it was a mismatch between .nuspec fields, or whatever.
Sadly, it has a generic icon, but I shall resolve it in future iterations because I had the impression it was correctly set up.

Heh, guess I'm becoming a bit more inteligent. It's good to "get out there" and show stuff.

_________________
Hello there! Nice to meet you!
I have github. Apologies in advance for bad coding practices.


Top
 Profile  
 
PostPosted: 2017/02/13, 18:31 
Forum Adept
Forum Adept
User avatar

Joined: 2015/03/15, 02:49
Posts: 351
Location: Out there
Role: Hobbyist
So, here's a bit of an example of what a few simple components can achieve:
Gfycat Video - Click to Play. [Source]


The main ship has two components from the action library:
DirectionalMovement
Create GameObject

The bullet, another two:
AutoMove
DestroyIfOutOfView

Each action has values to edit them, of course.

I shall work on a few more actions so to make the bare essentials of a shooter game, I guess.

Any thoughts?

_________________
Hello there! Nice to meet you!
I have github. Apologies in advance for bad coding practices.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2, 3  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 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:  
cron
Powered by phpBB® Forum Software © phpBB Group