WaveEngine components

0 %
100 %
Information about WaveEngine components

Published on March 15, 2014

Author: waveengineteam

Source: slideshare.net


Review of the WaveEngine components

WaveEngine Team @waveengineteam http://waveengine.net WaveEngine Components

Component Based Game Engine

Component types Componentes Drawables Behaviors

2D Components Components Behavior Drawable • Transform2D • Sprite • SpriteAtlas • Material2D • ParticleSystem2D • Joint2D • TouchGestures • SkeletalAnimation • Animation2D • AnimationUI • Collider2D • RigidBody2D • SpriteRenderer • SpriteAtlasRenderer • QuadRenderer • AnimatedSpriteRenderer • ParticleSystemRenderer2d

Entity To draw a sprite Transform2D Sprite SpriteRenderer

To draw a sprite Entity sprite = new Entity("mySprite") .AddComponent(new Transform2D()) .AddComponent(new Sprite("Content/texture.wpk")) .AddComponent(new SpriteRenderer(DefaultLayers.Opaque)); EntityManager.Add(sprite);

Transfom2D .AddComponent(new Transform2D() { Origin = Vector2.Center // [0,0] – [1,1] X = 100, //0 Default Y = 100, // 0 Default XScale = 1.5f, // 1 Default YScale = 1.5f, // 1 Default Rotation = Math.PI, // 0 Default Opacity = 0.6f, // [0-1] 0 Alpha, 1 Opaco (default) DrawOrder = 0.3f, //[0-1] 0 Front, 1 Back Default:0.5f })

Sprite .AddComponent(new Sprite(“Content/texture.wpk”) { IsGlobalAsset = true, // Default: False TintColor = Color.Red, //Default Color.White SourceRectangle = new Rectangle(0, 0, 100, 100); })

Opaque Alpha Additive GUI SpriteRenderer .AddComponent(new SpriteRenderer(DefaultLayers.Opaque)) Debug

To draw a sprite from Atlas Entity sprite = new Entity("mySprite") .AddComponent(new Transform2D()) .AddComponent(new SpriteAtlas("Content/atlas.wpk", “textureInAtlas”)) .AddComponent(new SpriteAtlasRenderer(DefaultLayers.Opaque)); EntityManager.Add(sprite);

Simple property animation var move = new SingleAnimation(0,100, TimeSpan.FromSeconds(2f), EasingFunctions.Back); PropertyValue = 0 PropertyValue = 100 2 segundos

Simple entity animation Entity sprite = new Entity("mySprite") .AddComponent(new Transform2D()) .AddComponent(new AnimationUI()) .AddComponent(new Sprite("Content/texture.wpk")) .AddComponent(new SpriteRenderer(DefaultLayers.Opaque)); EntityManager.Add(sprite); AnimationUI animation = sprite.FindComponent<AnimationUI>(); animation.BeginAnimation(Transform2D.XProperty, move);

Collision detection Collider2D • RectangleCollider • CircleCollider • PerPixelCollider

Collision detection Entity sprite = new Entity("mySprite") .AddComponent(new Transform2D()) .AddComponent(new RectangleCollider()) .AddComponent(new Sprite("Content/texture.wpk")) .AddComponent(new SpriteRenderer(DefaultLayers.Opaque)); EntityManager.Add(sprite); Collider2D collider = sprite.FindComponent<RectangleCollider>(); collider.Intersects(otherCollider);

To draw an animated character(SpriteSheet)

Texture Packer (SpriteSheet) http://www.codeandweb.com/texturepacker

To draw an animated character(SpriteSheet) Entity player= new Entity(“myPlayer") .AddComponent(new Transform2D()) .AddComponent(new Sprite("Content/spriteSheet.wpk")) .AddComponent(Animation2D.Create<TexturePackerGenericXml>(“Content/spriteSheet.xml") .Add("idle", new SpriteSheetAnimationSequence() { First = 1, Length = 8})) .Add("run", new SpriteSheetAnimationSequence() { First = 9, Length = 8})) .AddComponent(new AnimatedSpriteRenderer(DefaultLayers.Opaque)); EntityManager.Add(player);

To draw an animated character (Skeleton)

To draw an animated character (Skeleton) http://esotericsoftware.com/

To draw an animated character (Skeleton) Entity player = new Entity(“myPlayer") .AddComponent(new Transform2D()) .AddComponent(new SkeletalData("Content/spriteSheet.atlas")) .AddComponent(new SkeletalAnimation("Content/spriteSheet.json")) .AddComponent(new SkeletalRenderer()); EntityManager.Add(player);

2D Particle system

2D Particle system Entity smokeParticles= new Entity(“myPlayer") .AddComponent(new Transform2D()) .AddComponent(new ParticleSystem2D() { //Parameters }) .AddComponent(new Material2D(new BasicMaterial2D("Content/particleTexture.wpk"))) .AddComponent(new ParticleSystemRenderer2D(“smoke", DefaultLayers.Alpha)); EntityManager.Add(smokeParticles);

2D Particle system .AddComponent(new ParticleSystem2D() { //Parameters NumParticles = 100, EmitRate = 1500, MinLife = TimeSpan.FromSeconds(1f), MaxLife = TimeSpan.FromSeconds(3f), LocalVelocity = new Vector2(0f, 0f), RandomVelocity = new Vector2(3f, 2.5f), MinSize = 15, MaxSize = 40, MinRotateSpeed = 0.03f, MaxRotateSpeed = -0.03f, EndDeltaScale = 0f, EmitterSize = new Vector2(30), Gravity = new Vector2(0, 0.03f), EmitterShape = ParticleSystem2D.Shape.FillCircle, Emit = false, })

2D physics components • WaveEngine integrates the Box2D implementation in C# called FarseerPhysics. • Offers a component based interface • Not all Box2D feature are available in the current version, but the most important ones are.

2D physics components Entity sprite = new Entity("mySprite") .AddComponent(new Transform2D()) .AddComponent(new RectangleCollider()) .AddComponent(new RigidBody2D() { //Parameters}) .AddComponent(new Sprite("Content/texture.wpk")) .AddComponent(new SpriteRenderer(DefaultLayers.Opaque)); EntityManager.Add(sprite);

2D physics components .AddComponent(new RigidBody2D() { //Parameters Mass = 4f, // Default: 2f Friction = 1f, // Default: 0.5f Damping = 0.8f, // Default: 0.4f Restitution = 0.5f, // Default: 0.3f CollisionCategories = Physic2DCategory.Cat1, CollidesWith = Physic2DCategory.Cat2, IsKinematic = true, // Default: false })

2D physics components Joint2D • AngleJoint2D • DistanceJoint2D • FixedJoint • FixedMouseJoint2D • PrismaticJoint2D • RevoluteJoint2D

UI Components UIBase • Button • CheckBox • Grid • Image • Panel • ProgressBar • RadioButton • Slider • Stack • TextBlock • TextBox • ToggleSwitch • Wrap

Thank you WaveEngine Team @waveengineteam http://waveengine.net

Add a comment

Related presentations

Presentación que realice en el Evento Nacional de Gobierno Abierto, realizado los ...

In this presentation we will describe our experience developing with a highly dyna...

Presentation to the LITA Forum 7th November 2014 Albuquerque, NM

Un recorrido por los cambios que nos generará el wearabletech en el futuro

Um paralelo entre as novidades & mercado em Wearable Computing e Tecnologias Assis...

Microsoft finally joins the smartwatch and fitness tracker game by introducing the...

Related pages


WaveEngine is a new cross-platform mobile engine to develop games for iOS, Android, Windows Store and Windows Phone.
Read more

GitHub - WaveEngine/Components: To make the creation of ...

Components - To make the creation of custom components a little easier, we will publish the source code of some of the internal components
Read more

NuGet Gallery | WaveEngine.Components

Provides Components, behaviors and drawables, which allow developers to create games reusing a lot of code. To install WaveEngine.Components, run the ...
Read more

Internet texture as UI component - Wave Engine Forum

using WaveEngine.Common.Graphics; using WaveEngine.Components.Graphics2D; using WaveEngine.Components.UI; using WaveEngine.Framework.Graphics; using ...
Read more

WaveEngine.Components.GameActions Namespace

Name Description ActionGameAction: A game action that execute an Action ActiveWaitConditionGameAction: A game action to wait an event for a time
Read more

A Closer Look At Wave Engine - Game From Scratch

A Closer Look At Wave Engine. 5. October 2015. 0 Comments . ... Cameras; using WaveEngine. Components. Graphics2D; using WaveEngine. Components. Graphics3D
Read more

WaveEngine | Facebook

WaveEngine. 686 likes · 14 talking about this. ... How components resolve their dependencies – WaveEngine Team. WaveEngine Team. geeks.ms. WaveEngine.
Read more

Download wave engine version - WAVE cross platform engine

Wave Engine is a Component Based Game Engine architecture, 2D and 3D physics engines, ... Open Source Components (GitHub Repository) Wave Engine Logos.
Read more

Commits · WaveEngine/Components · GitHub

Components - To make the creation of custom components a little easier, we will publish the source code of some of the internal components
Read more