Giter Site home page Giter Site logo

nez-samples's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nez-samples's Issues

Can't run samples

Hey, I want to point out that the samples crash at the start. Also, there is a folder included in the Content section that I cannot find it's the nez folder ... the content pipeline is looking for a gooCursor that cannot be found.

image

image

After replacing the references with the NuGet version and fixing the folder issue it works partly. There are more issues then.

image

-- Edit: Ah, I just saw I need to replace it with the DefaultContent\effects folder. There are the compiled effects the program is looking for. I thought pushing them through the content pipeline to make them xnb files is everything I need to do.

SVG to Farseer Physics sample crash

Other samples work just fine.

Running Ubuntu 18.04 with Mono 5.18.0.225.

The stacktrace :

  at System.Number.ParseSingle (System.ReadOnlySpan`1[T] value, System.Globalization.NumberStyles options, System.Globalization.NumberFormatInfo numfmt) [0x00071] in <7b0d87324cab49bf96eac679025e77d1>:0
  at System.Single.Parse (System.String s) [0x0001a] in <7b0d87324cab49bf96eac679025e77d1>:0
  at Nez.Svg.SvgPolygon.parsePoints (System.String str) [0x0003a] in /home/code/git_repos/Nez-Samples/Nez/Nez.Portable/Graphics/SVG/Shapes/SvgPolygon.cs:36
  at Nez.Svg.SvgPolygon.set_pointsAttribute (System.String value) [0x00000] in /home/code/git_repos/Nez-Samples/Nez/Nez.Portable/Graphics/SVG/Shapes/SvgPolygon.cs:22
  at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderSvgDocument.Read11_SvgPolygon (System.Boolean isNullable, System.Boolean checkType) [0x003a9] in <df114bbdfd99449891aeae0e2c3cb59a>:0
  at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderSvgDocument.Read14_SvgGroup (System.Boolean isNullable, System.Boolean checkType) [0x00854] in <df114bbdfd99449891aeae0e2c3cb59a>:0
  at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderSvgDocument.Read15_SvgDocument (System.Boolean isNullable, System.Boolean checkType) [0x00684] in <df114bbdfd99449891aeae0e2c3cb59a>:0
  at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderSvgDocument.Read16_svg () [0x00050] in <df114bbdfd99449891aeae0e2c3cb59a>:0
  at at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0003b] in <7b0d87324cab49bf96eac679025e77d1>:0
  --- End of inner exception stack trace ---
  at System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.XmlReader xmlReader, System.String encodingStyle, System.Xml.Serialization.XmlDeserializationEvents events) [0x0011b] in <2388e378a5cd4e65bc514c9bf93520a5>:0
  at System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.XmlReader xmlReader, System.String encodingStyle) [0x00000] in <2388e378a5cd4e65bc514c9bf93520a5>:0
  at System.Xml.Serialization.XmlSerializer.Deserialize (System.IO.Stream stream) [0x0001c] in <2388e378a5cd4e65bc514c9bf93520a5>:0
  at Nez.Svg.SvgDocument.open (System.IO.Stream stream) [0x0000f] in /home/code/git_repos/Nez-Samples/Nez/Nez.Portable/Graphics/SVG/SvgDocument.cs:36
  at Nez.Samples.FarseerSVGScene.initialize () [0x0009d] in <2ebf495a000a4fcead86a991d8b55384>:0
  at Nez.Scene..ctor () [0x000d3] in /home/code/git_repos/Nez-Samples/Nez/Nez.Portable/ECS/Scene.cs:317
  at Nez.Samples.SampleScene..ctor (System.Boolean addExcludeRenderer, System.Boolean needsFullRenderSizeForUI) [0x0000b] in <2ebf495a000a4fcead86a991d8b55384>:0
  at Nez.Samples.FarseerSVGScene..ctor () [0x00000] in <2ebf495a000a4fcead86a991d8b55384>:0
  at at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke(System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) [0x00005] in <7b0d87324cab49bf96eac679025e77d1>:0
  --- End of inner exception stack trace ---
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) [0x00017] in <7b0d87324cab49bf96eac679025e77d1>:0
  at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic, System.Boolean wrapExceptions) [0x000a8] in <7b0d87324cab49bf96eac679025e77d1>:0
  at System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean wrapExceptions, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00009] in <7b0d87324cab49bf96eac679025e77d1>:0
  at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Boolean wrapExceptions, System.Threading.StackCrawlMark& stackMark) [0x00027] in <7b0d87324cab49bf96eac679025e77d1>:0
  at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic, System.Boolean wrapExceptions) [0x0002c] in <7b0d87324cab49bf96eac679025e77d1>:0
  at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00000] in <7b0d87324cab49bf96eac679025e77d1>:0
  at System.Activator.CreateInstance (System.Type type) [0x00000] in <7b0d87324cab49bf96eac679025e77d1>:0
  at Nez.Samples.SampleScene+<>c__DisplayClass7_0.<setupSceneSelector>b__2 () [0x00000] in <2ebf495a000a4fcead86a991d8b55384>:0
  at Nez.SceneTransition+<loadNextScene>d__13.MoveNext () [0x00077] in /home/code/git_repos/Nez-Samples/Nez/Nez.Portable/Graphics/Transitions/SceneTransition.cs:136
  at Nez.Systems.CoroutineManager.tickCoroutine (Nez.Systems.CoroutineManager+CoroutineImpl coroutine) [0x00000] in /home/code/git_repos/Nez-Samples/Nez/Nez.Portable/Utils/Coroutines/CoroutineManager.cs:157
  at Nez.Systems.CoroutineManager.startCoroutine (System.Collections.IEnumerator enumerator) [0x00013] in /home/code/git_repos/Nez-Samples/Nez/Nez.Portable/Utils/Coroutines/CoroutineManager.cs:84
  at Nez.Core.startCoroutine (System.Collections.IEnumerator enumerator) [0x00000] in /home/code/git_repos/Nez-Samples/Nez/Nez.Portable/Core.cs:399
  at Nez.FadeTransition+<onBeginTransition>d__12.MoveNext () [0x000b1] in /home/code/git_repos/Nez-Samples/Nez/Nez.Portable/Graphics/Transitions/FadeTransition.cs:73
  at Nez.Systems.CoroutineManager.tickCoroutine (Nez.Systems.CoroutineManager+CoroutineImpl coroutine) [0x00000] in /home/code/git_repos/Nez-Samples/Nez/Nez.Portable/Utils/Coroutines/CoroutineManager.cs:157
  at Nez.Systems.CoroutineManager.Nez.IUpdatableManager.update () [0x00093] in /home/code/git_repos/Nez-Samples/Nez/Nez.Portable/Utils/Coroutines/CoroutineManager.cs:136
  at Nez.Core.Update (Microsoft.Xna.Framework.GameTime gameTime) [0x0003f] in /home/code/git_repos/Nez-Samples/Nez/Nez.Portable/Core.cs:215
  at Microsoft.Xna.Framework.Game.DoUpdate (Microsoft.Xna.Framework.GameTime gameTime) [0x00019] in <bdb3723ca0994eb68ac257fed9cb7a92>:0
  at Microsoft.Xna.Framework.Game.Tick () [0x001d6] in <bdb3723ca0994eb68ac257fed9cb7a92>:0
  at Microsoft.Xna.Framework.SdlGamePlatform.RunLoop () [0x00021] in <bdb3723ca0994eb68ac257fed9cb7a92>:0
  at Microsoft.Xna.Framework.Game.Run (Microsoft.Xna.Framework.GameRunBehavior runBehavior) [0x00082] in <bdb3723ca0994eb68ac257fed9cb7a92>:0
  at Microsoft.Xna.Framework.Game.Run () [0x0000c] in <bdb3723ca0994eb68ac257fed9cb7a92>:0
  at Nez.Samples.Program.RunGame () [0x0000a] in <2ebf495a000a4fcead86a991d8b55384>:0
  at Nez.Samples.Program.Main (System.String[] args) [0x00000] in <2ebf495a000a4fcead86a991d8b55384>:0

Cannot apply indexing with [] to an expression of type 'DeferredLight'

I'm trying to build the Nez samples project but I get two errors:

Cannot apply indexing with [] to an expression of type 'DeferredLight'
at:

\Nez.Samples\Scenes\Deferred Lighting\DeferredLightingController.cs 51

and
'DeferredLight' does not contain a definition for 'Count' and no extension method 'Count' accepting a first argument of type 'DeferredLight' could be found (are you missing a using directive or an assembly reference?)
at:

\Nez.Samples\Scenes\Deferred Lighting\DeferredLightingController.cs 49

looks to me that at one point DeferredLight was indexable but not anymore(?)

I'm using monogame 3.5.1, on a windows with visual studio 2015.

also,
I had multiple errors about:

'Scene' does not contain a definition for 'findObjectOfType'

I have the feeling that its a deprecated function so I've changed it the findComponentOfType()
am I correct in doing so?

thanks.

Location of ProjectTemplate used for new projects

Hi,

The readme states that "ProjectTemplate is an empty project ..." but I cannot find it in this repo. I'm proposing to update the readme to be more precise as to where to find said template.

regards.

default SceneResolutionPolicy and Default DesignResolution not affecting

        Texture2D texture;
        Scene.SceneResolutionPolicy policy;
        protected override void Initialize()
        {
            base.Initialize();
            policy = Scene.SceneResolutionPolicy.ExactFit;
            Scene.setDefaultDesignResolution(400, 300, policy);
            Window.AllowUserResizing = true;
            Screen.setSize(640, 480);
            var scene = Scene.createWithDefaultRenderer(Color.CornflowerBlue);

            texture = scene.content.Load<Texture2D>("textures/penguin");
            var entity1 = scene.createEntity("Entity1");
            entity1.addComponent(new Sprite(texture));
            
        }

Tried this in the core window class. Doing this doesn't seem to change the way the scene is rendered at all. Is there something I'm missing?

Problem with Tile examples.

Running any of the tile examples ("Destructable Tilemap", "Animated Tiles", "Pathfinding Tilemap") results in an error. I'm running with Visual Studio 2017 and MonoGame v3.5.1.1679.

The error is a System.Collections.Generic.KeyNotFoundException from line 64 in Nez-Samples\Nez\Nez.Portable\PipelineRuntime\Tiled\TiledTileSet.cs

It appears to be related to asking for a region id that does not exist -- so maybe something screwy with how tiles are referenced?

Mouse clicks are not registered on MacOS

I've tried building with Visual Studio for mac and Xamarin Studio. In both the app does start but I'm not able to click on the buttons to switch between the sample's.

On the base class (SampleScene) the onToggleSceneListClicked is not getting fired. Any suggestions ?

Build errors on MacOS

Hi, I tried to clone the sample repo and build it myself. But for some reason I'm getting 18 errors that look like this:

/Users/jelle/Desktop/Nez-Samples/Nez.Samples/Scenes/RigidBodies/RigidBodyScene.cs(11,11): Error CS0311: The type Nez.CircleCollider' cannot be used as type parameter T' in the generic type or method Nez.Entity.addComponent()'. There is no implicit reference conversion from Nez.CircleCollider' to Nez.Component' (CS0311) (Nez.Samples)`

When I take a look at the CircleCollider it is indeed not compatible with a Nez.Component. Did something break the sample project?

scene.findComponentOfType<> missing?

I just pulled down this samples project. I built Nez.sln and then opened Nez-Samples.sln and built it. The file Nez.Samples\Scenes\AI\AIUI.cs is throwing compiler errors on the above method, as is the DeferredLightingController.

If I comment out these offending lines, the sample project builds fine. I also checked the Nez source, and this method doesn't appear to be present in the Scene class.

Error building samples solution

A lot of errors like:
Nez.Content.Shared.Moon (Content has not a definition for Shared)

And warnings (i think associated to avobe message) like:
..can't add link to file.. ..the file is in project tree directory..

Sorry for translation and my bad english (i'm spanish)

Downloading FNA Release No Longer Works - Must Clone FNA Repo

Hello,

Was having a few issues using the provided FNA Nez template generator and plugging in the samples repo. It turns out, the FNA folder must be cloned rather than downloaded from the releases, otherwise you will get a missing mojo.dll error. I recommend the steps be modified to reflect this. Adding an alternate solution using the template generator would also be helpful.

Samples fail to build

After following the instructions: Do fresh checkout of the Nez-Samples repo recursively, build Nez first, then try to build Nez-samples - I get a bunch of errors.

Severity Code Description Project File Line Suppression State Error CS0117 'Color' does not contain a definition for 'MonoGameOrange' ProjectTemplate \Nez\Nez-Samples\ProjectTemplate\Game1.cs 21 Active Error The command ""C:\Program Files (x86)\MSBuild\MonoGame\v3.0\Tools\MGCB.exe" /@:"\Nez\Nez-Samples\Nez.Samples\Content\Content.mgcb" /platform:DesktopGL /outputDir:"\Nez\Nez-Samples\Nez.Samples\Content\bin\DesktopGL" /intermediateDir:"\Nez-Samples\Nez.Samples\Content\obj\DesktopGL" /quiet" exited with code 2. Nez.Samples Error Processor 'TiledMapProcessor' had unexpected failure! Nez.Samples /Nez/Nez-Samples/Nez.Samples/Content/DestructableMap/destructable-map.tmx Error Processor 'TiledMapProcessor' had unexpected failure! Nez.Samples /Nez/Nez-Samples/Nez.Samples/Content/NinjaAdventure/map/tilemap.tmx Error CS0103 The name 'Window' does not exist in the current context Nez.Samples p\Nez\Nez-Samples\Nez.Samples\Game1.cs 17 Active Error CS0103 The name 'Window' does not exist in the current context Nez.Samples \Nez\Nez-Samples\Nez.Samples\Game1.cs 18 Active Error CS0117 'Color' does not contain a definition for 'MonoGameOrange' Nez.Samples \Nez\Nez-Samples\Nez.Samples\SampleHelpers\SampleScene.cs 77 Active Error CS0117 'Color' does not contain a definition for 'MonoGameOrange' Nez.Samples \Nez\Nez-Samples\Nez.Samples\Scenes\Shadows\ShadowsScene.cs 26 Active Error CS0103 The name 'Window' does not exist in the current context ProjectTemplate p\Nez\Nez-Samples\ProjectTemplate\Game1.cs 17 Active Error CS0103 The name 'Window' does not exist in the current context ProjectTemplate \Nez\Nez-Samples\ProjectTemplate\Game1.cs 18 Active

This is on VS2015 update 2.

Content path generation fails adding new content

I added a new folder and texture file to Content.mcgb and followed the steps to generate the content class.

The process fails with ErrorGeneratingOutput in ContentPathGenerator.cs, ""A namespace does not directly contain members such as fields or methods" and invalidates all of the provided sample content.

I have tried it with the file in the root of the project and in /shared where you originally put it.

license

Can I assume you use the same dual-licenses here as you do in Nez? It would be nice to include them in the repo.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.