Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411512 Posts in 69376 Topics- by 58430 Members - Latest Member: Jesse Webb

April 26, 2024, 06:37:07 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsDuality
Pages: 1 ... 3 4 [5]
Print
Author Topic: Duality  (Read 18759 times)
Adam_
Level 1
*



View Profile WWW
« Reply #80 on: February 05, 2017, 03:08:54 AM »

So this game jam entry I did earlier actually turned out to be surprisingly fun to play. Decided to continue it as a side project and who knows, maybe put it on itch.io for a dollar or two when it's far enough. It'll probably take a while, but whatever Shrug it's fun to work on an actual game once in a while to get a clear head between all this engine dev. And it's also really nice to use that engine I'm working on for one of my own projects Smiley

The first thing I did was porting the project from the official v2.x binary release of Duality to a recent build of the yet unreleased / wip v3.0 branch of Duality, so I can play around with the new API and features. The forced-resolution rendering already paid off, as the game now has exactly the same viewport on all screen resolutions, just scaled and with black rectangles on the side where needed. This also means the editor preview matches exactly what I see in fullscreen mode.


(Click Me, I'm a gif)


Next, there's now local multiplayer with mouse / keyboard and up to four additional players via gamepad. You can join and leave anytime you want and use either dual stick or single stick controls. Having a friction-less way to add or remove players at any point is something that I definitely want to keep. Especially with regard to local multiplayer, I think it'll be worth it.


(Click Me, I'm a gif)


I also experimented a bit with the enemy AI. They kept running into walls, so I added some VisualLog drawings to make sense of what was happening. These are actually part of Duality v2.x already, but it's a feature I really like, so I thought I'd mention it anyway: You can basically add a one-line (visual) log command anywhere in your code and it will show up in rendering:


(Click Me, I'm a gif)


Turns out, there was a bug in how the wandering agents chose their next waypoint when they found they couldn't reach their current one.

Continued to work on the AI topic for a while and started to re-implement it using a utility-based approach. Right now, there are only three behaviors - Wander, Follow and Attack - but I plan to diversify the AI a bit and introduce something like "circling a target", "running away" or maybe even "escort friend" and fine-tune individual agent types by adjusting the scoring / utility multipliers for each of these activities. This will be a lot of tweaking, but hopefully leads to more organic behavior. I'm still somewhat of a newbie on the utility-based approach, so there's definitely a bit to learn here.

And last but not least, here's some of the gameplay after switching to utility-based:


(Click Me, I'm a gif)


Fundamentally different? Nope. Still works after refactoring? Yes! Coffee
Logged

Adam_
Level 1
*



View Profile WWW
« Reply #81 on: March 29, 2017, 07:55:42 AM »

Alright, back to core Duality development for now. Smiley Lots of stuff happening on both the v2.x and the new v3.0 side, and this time I got around to write a blog post about it. Follow this link to read the original, but here's a text-only transcript as well:

Quote
With the recently started Duality v3.0 dev branch and continuous updates to the stable v2.x versions, there’s a lot of progress both visible and invisible to people following the binary release chain. The purpose of this split in two different versions is to reconcile the two conflicting goals of backwards compatibility and forward progress: Updating the Duality version behind a game or plugin project shouldn’t break it, so while fixing and adding features is fine, removing or changing them is not. However, as the project evolves, the requirement to maintain the same facade and feature set adds up to a constant maintenance cost that makes some things harder and pushes others beyond the threshold of viability. Old code just needs to be cleaned up once in a while, polished and streamlined – and that is exactly what v3.0 is for.

Don’t expect tons of big new features, but an improved API and the groundwork for future improvements on a more fundamental scale. That said, I’m (on a nerdy programmer-think basis) pretty excited about the things to come. You can find the full list of v3.0 issues here, and an overview on what has already been done below.



Among the bigger of the already implemented ones, there is a Font resource overhaul that allows for much more efficient serialization and arbitrary bitmap fonts with imported glyph boundaries as well as explicit kerning pairs. With the new data structures, it is not only possible to provide more versatile custom Font importers, but also more convenient to do so.

All logging related classes have been cleaned up, refactored and partially re-implemented to be more efficient, more consistent, more open to custom additions and fully thread-safe. Custom log channels can be defined in user code, are checked at compile time and displayed in the editor just like the three default channels. Similarly, VisualLog API has been updated to mirror Log changes.

The global Time class has been adjusted to introduce the (seconds) DeltaTime property as a first-class alternative to the (abstract) TimeMult property for achieving framerate independent simulation. It may not be a big change, but it does encourage developers to use real-time “X per second” unit representations for movement and change, rather than much less intuitive “X per frame” units. Thanks to @mfep for this contribution.

Sprite animation is now distinct from sprite rendering, allowing users to drop in a custom renderer while still using the default animator, and vice versa. The new class layout also means that the previously specialized renderers and animators for retro-RPG-like character controls can now be used interchangeably with their regular counterparts. As a side effect, it is no longer necessary to use any animation components for indexing single frames inside a sprite sheet.

GameObject and Scene queries have been overhauled to improve performance on both time and memory scales. At the same time their API has been adjusted to allow more efficient usage and reveal each operations impact instead of hiding implementation hints behind an opaque signature.

There is a new RenderSetup resource that replaces and extends the previous customizable rendering steps of the Camera component. While the base class acts as a shared setup for the former, it can also be extended with custom implementations to perform complex rendering setups in code, or to take full control over how a given scene, viewport or pass is rendered.

As a side effect of the cleanup, it is now easily possible to do fixed-viewport or fixed-resolution rendering while Duality handles the details of matching the desired resolution to the player’s screen or resizeable window. The same feature is also used to perform visual picking operations in the editor at a lower resolution for improved performance on complex scenes.



In addition to all of the above, there have been lots of tweaks, fixes and small additions to the ongoing v2.x branch, which you will get in every new Duality install and via package manager updates for existing projects.

By far the biggest recent change is a deterministic component execution order which will make sure that initialization, shutdown, updates and queries to every component follow a type-based schedule that can be adjusted using attributes. This feature addresses situation where code execution of one component type is required to be specifically before or after another component type, which up until now could neither be stated as a requirement nor guaranteed across all edge cases.

When not specified explicitly, an implicit execution order constraint is generated from  RequiredComponent attributes, assuming that “A requires B” also means “A needs to execute after B”. As an override to this behavior, every component can now specify any number of  ExecutionOrder attributes, each of them placing it before or after a certain component type. It is also possible to use abstract base classes (such as Renderer) or interfaces (such as ICmpSpriteRenderer) as anchors, so more general constraints are possible as well. Cycles in the constraint graph that can be built this way are detected and logged as a warning, so problems arising from erroneous attributes can be fixed early in the process.

That’s it for this worklog – more updates when they arrive. In the meantime, make sure to check out the general and v3.0 issue lists and vote on things that are important to you.

Until next time - happy coding Coffee
Logged

foofter
Level 4
****


MAKE THAT GARDEN GROW


View Profile WWW
« Reply #82 on: March 29, 2017, 11:11:10 AM »

Hey, really glad you're keeping up work on this game! I wanna play again!  Hand Fork Left Gomez Hand Knife Right
Logged


@_monstergarden (game) and @williamzwood (me)
See Monster Garden progress here: https://forums.tigsource.com/index.php?topic=56012.0
Adam_
Level 1
*



View Profile WWW
« Reply #83 on: April 14, 2017, 09:10:41 AM »

Hey, really glad you're keeping up work on this game! I wanna play again!  Hand Fork Left Gomez Hand Knife Right

Thanks! Smiley Though I must admit, I didn't really work on that recently - moved a bit into the background with some engine changes on the top priority list.

Speaking of which.

Just released an update to RigidBody polygon shapes! They no longer have to be convex and there no longer is a limit to the number of vertices. Internally, a polygon decomposition algorithm will transform any simple (no crossing edges) polygon into a set of convex polygons for internal usage.

Defining a non-convex polygon. Note the decomposition lines appearing as soon as it turns from convex into non-convex:

(Click Me, I'm a gif)


The RigidBody editor now uses thicker lines to render shape outlines and joints. They are also now using a constant screen-space size, so they always remain visually readable regardless of your zoom level:

(Click Me, I'm a gif)


Physics with "non-convex" / auto-decomposed polygons:

(Click Me, I'm a gif)


This was heavily inspired by YMR's ComplexBody plugin, but it's not meant as a replacement. Even though some improvements are still scheduled, only a select subset of features you can see there will make it into the core.
Logged

Adam_
Level 1
*



View Profile WWW
« Reply #84 on: April 21, 2017, 10:39:10 AM »

Working on a new sample package for all kinds of physics related stuff. Maybe less than half finished, but super fun so far Grin


(Click Me, I'm a gif)



(Click Me, I'm a gif)



(Click Me, I'm a gif)


Until next time Coffee
Logged

Adam_
Level 1
*



View Profile WWW
« Reply #85 on: May 09, 2017, 09:41:04 AM »

Added lots of more sample scenes to the physics sample package:


(Click Me, I'm a gif)


...and actually released it! You can now grab it in the Duality package manager to check it out. Source code included.

Logged

Adam_
Level 1
*



View Profile WWW
« Reply #86 on: June 13, 2017, 01:22:31 PM »

Hey everyone, long time no see. Just a quick mention that I'm currently running a small survey on potential tutorial coverage for Duality in the future. Feel free to join in if you're using or considering Duality: https://goo.gl/forms/vRlsHuk925p22hC72

I might publish the results in the end for those who are interested in contributing articles and tutorials, but the results are, of course, anonymous if you care about that.
Logged

Adam_
Level 1
*



View Profile WWW
« Reply #87 on: June 16, 2017, 08:09:35 AM »

Hey gamedev people!

Just a quick update on the tutorial side: Recently joined Stacey Haffner on her Channel 9 game development show .GAME to do a short, two-episode Getting Started demo with Duality. Here's a link to episode one:



As always, feel free to leave me a comment if you have feedback Smiley
Logged

Adam_
Level 1
*



View Profile WWW
« Reply #88 on: June 23, 2017, 08:28:28 AM »

Part 2 is here! Not all the parts are as smoothly explained as I would want them to be, but yeah, I guess I just need to do that more often to get the hang of it Smiley

Anyway, hope this proves useful to at least some of you and until next time, happy coding! Coffee
Logged

Pages: 1 ... 3 4 [5]
Print
Jump to:  

Theme orange-lt created by panic