Coder Social home page Coder Social logo

urhosamples2019's Introduction

UrhoSharp 2019 演示

UrhoSharp 是个优秀的开源游戏引擎,但官方的演示如今要改很多东西才能运行,为了让大家玩的开心,本喵翻新了演示里最重要的部分。

运行指南

桌面

  • 通过 Installer 安装默认工作负载:.NET Core 跨平台开发。
  • 在文件夹 SamplyGame\SamplyGame.Desktop 下执行 dotnet run 玩游戏。
  • 在文件夹 FeatureSamples\Urho.Samples.Desktop 下执行 dotnet run 运行功能展示,输入数字如 19;在 Windows 下,在文件夹 FeatureSamples\Urho.Samples.WPF 下执行 dotnet run 运行全部功能展示。

移动

  • 通过 Installer 安装默认工作负载:使用 .NET 的移动开发、通用 Windows 平台开发。
  • 打开 SamplyGame\SamplyGame.sln,编译 SamplyGame.Droid,连接安卓设备后部署、运行。
  • 打开 FeatureSamples\FeatureSamples.sln,编译 FeatureSamples.Droid,同上。

Urho3D 编辑器

  • 下载 Urho3D 编辑器(链接见下方),运行 bin\Editor.bat,File - Open Scene (Ctrl + O),打开示例 /UrhoAssetImporter/SampleData/MainScene.xml。

链接

UrhoSharp (Xamarin) 官网:https://docs.microsoft.com/zh-cn/xamarin/graphics-games/urhosharp/

Urho3D 官网:https://urho3d.github.io/

Urho3D 编辑器:https://sourceforge.net/projects/urho3d/files/Urho3D/

UrhoSharp 源码:https://github.com/xamarin/urho

Urho3D 源码:https://github.com/urho3d/Urho3D

UrhoSharp samples

This directory contains various samples for the UrhoSharp engine and they can be compiled for Android or iOS, or can be executed on Windows and Mac with the published NuGet package.

Samples

Some of the samples here include:

  • FormsSamples
  • FeatureSamples
  • SamplyGame
  • HoloLens, ARKit, ARCore
  • Mixed samples

ARKit, ARCore and HoloLens

These directories contain samples for running UrhoSharp on HoloLens, ARKit and ARCore.
Also there is a mixed sample that shares a scene between iOS, Android and HoloLens (see Mixed/AR)

Screenshot Screenshot

FormsSamples

The 'FormsSamples' solution demonstrates how UrhoSharp can be used in Xamarin.Forms applications as a View element.

Screenshot Screenshot

FeatureSamples

The toplevel FeatureSamples solution showcases 40 independent UrhoSharp features, each one showcasing a particular element of the framework and runs on all supported platforms.

Physics2D Water

SamplyGame

The SamplyGame directory contains a more complete game, it is a sample inspired by the gameplay and artwork of ShootySkies and shows a more complete game in action, showing how to load assets, write game code and structure a game. It is our first game build with this, so be kind.

Screenshot

Structure

All solutions are structured to have their cross platform code written in the Core directory, where we build a portable class library. While we have taken the approach of using Portable Class Libraries, you can also used Shared Projects.

The structure of each solution is this:

  • Assets: Contains the shared assets that are used for the various samples.

  • Core: Contains the various samples, one for each feature that is being showcased and it happens to be a Portable Class Library project, so it can be reused as-is across all supported platforms.

  • iOS: Contains the iOS launcher.

  • Android: Contains the Android launcher.

  • Mac: Contains the Mac launcher (but works on Windows too).

  • WPF: Contains the Windows launcher based on WPF.

  • WinForms: Contains the Windows launcher based on WinForms.

UrhoAssetImporter - a simple UrhoSharp assets viewer + AssetImporter

Supported formats:

  • .obj, .dae, .fbx, .blend, .3ds, .lwo, etc.
  • Urho3D Materials, Particles, Prefabs, Models, etc

Supported platforms:

  • Windows (WPF)

Screenshot

Screenshot

To build the samples

urhosamples2019's People

Contributors

slango0513 avatar

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

Watchers

 avatar  avatar

urhosamples2019's Issues

Android BackButton Press Crashes UrhoSharp SamplyGame [Fixed]

I had modelled my game on SamplyGame, so was also getting hanging when pressing the Android Back Button.
To fix, in MainActivity:

   public override bool OnKeyDown([GeneratedEnum] Keycode keyCode, KeyEvent e)
    {
        if (keyCode == Keycode.Back)
        {               
            this.MoveTaskToBack(false);//causes app to go to back, and works when refocussed.
            return false; //this prevents OnBackPressed(), call.                            
        }
        return base.OnKeyDown(keyCode, e);
    }

Then, delete the Esc key condition in SamplyGame, as shown:

SamplyGame.Start()
{
Input.SubscribeToKeyDown(e =>
{
if (e.Key == Key.Esc) Exit();//<- this causes app crash/hang
}
}

The app is now sent to the background, and opens nicely when refocussed.

Failed load the mesh from .obj/base64 string file.

Hi Team,
I am facing issue to load the mesh from .obj file. Is there any way to load the 3D drawing from .obj or base64 string.

I tried this sample (https://github.com/patrickabadi/UrhoCustomObj) it's not worked form me .
Getting below error.
Error (3624) / Urho3D: Failed to create vertex buffer
Error (3624) / Urho3D: Failed to create index buffer
Error (3624) / Urho3D: Attempted to get resource Techniques/NoTextureVCol.xml from outside the main thread

Thanks in advance.
Balakrishna.

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.