Embed Unreal Engine 4 project into another app - ios

I've been trying to work on a proof of concept (POC) where I can embed a UE4 project into an existing application (in my case NativeScript) but this could just as easily apply to Kotlin or ReactNative.
In the proof of concept I've been able to run the projects on my iPhone launching from UE4 pretty easily by following the Blueprint and C++ tutorials for the FPS. However the next stage of my POC requires that I embed the FPS into an existing NativeScript application, this application will manage the root menu, chat, and store aspects of the platform in the POC.
The struggle I'm running into is that I cannot find how to interact with the xcode project generated from the blueprint tutorial and the C++ tutorial generates a xcode project that i'm unsure where the actual root is that I need to wrap.
Has anyone seen a project doing this before and if so are there any blogs or guidance that you can point me to? I've been Googling and looking around for a couple weeks and have hit a dead end. I found a feedback post here from April of 2020, that was referring to a post in January 2020 that talked about how Unity has a way to embed into other applications additionally a question from 2014 here. But other than that it's a dead end.

A slightly different approach
Disclaimer: I'm not an UE4 developer. Guilty as charged for seeing an unanswered bounty too big to ignore. So I started thinking and looking - and I've found something that could be bent to your needs. Enters pixelstreaming.
Pixelstreaming is a beta feature that is primarily designed to allow for embedding the game into a browser. This opens a two way communication between a server where the GPU heavy computations happen and a browser where the player can interact with the content - the mouseclick & other events are sent back to the server. Apparently it allows some additional neat stuff, however that is not relevant for the question at hand.
Since you want to embedd the Unreal application into your NativeScript tool(menu of some kind if I understood correctly), you could make your application a from two separate parts:
One part would run the server.
The second part would handle the overlay via the pixelstreaming.
This reduces the issue of embedding the UE4 into an application to the(possibly easier) issue of embedding a browser into your application. (Or if your application is browser based - voila, problem solved.)
If you don't want to handle the remote communication, just have the server-side run on the localhost.(With the nice sideeffect of saving bandwidth.)
Alternatively, if you are feeling adventurous, you could go and write your own WebRTC support on the application side to bypass the need for the browser alltogether. It might not be worth the effort though.
Side note: The first of the links you provided is a feature request which hints at the unfortunate fact that UE4 doesn't support embedding. This is further enforced by the fact that one of the people there says somethig along the lines "Unity can to this, it would be nice if UE4 could as well."
Yet a different approach:
You could embedd and use a virtual display to insert the UE4 part into your controller - you would be basically tricking UE4 into thinking that the desired display device is a canvas inside your application.
This thread suggests a similar approach:
In general, the way to connect two libraries like this would be through a platform dependent window handle, e.g. a HWND under Windows. Check the UE api if you find any way to bind the render target to a HWND. Then you could create a wxWindow in wxWidgets and tell UE to render into that window. That would be a first step.
I'm not sure if anything I've listed will be of much help but hey, at least I tried :-). Good luck with your game.
At the same time, the author suggests to:
Reverse the problem:
Using the UE4 slate framework and online subsystem. You would use the former to create the menus you need directly in the UE4 and then use the latter to link to the logic you want to have outside of the UE4. However that is not what you asked for so I'm listing it only for the completeness sake.

Related

Does flutter/dart work on desktop as a native app?

I'm interested in learning Google's flutter/dart but I want to be able to create desktop x86 apps with it like with react native. Is there built in support or any 3rd party addons that I can use to make drsktop applications with flutter/dart?
I'm having a hard time deciding whether this question is off-topic or not; I won't vote to close it for now but I wouldn't be surprised if someone does (since it veers pretty close to the 'recommend a tool' type of question).
To answer your question though, the answer is sort-of for now. From the flutter FAQ:
Can I use Flutter to build desktop apps? Yes, but right now it’s not
very well supported. We’re working on making this a first class
experience. Our current progress is documented on our wiki.
The wiki is here and at the current time of this answer it has some basic information on how to set up building a flutter app for windows, mac, and linux, along with warnings that everything may change at any point and that any plugin needing native code won't work as they only contain code for iOS/Android. The flutter-desktop-embedding repository (left-over from before google officially started working on desktop embedding) is an example of how to get started but your mileage may vary as I'm not sure how up to date it is.
Basically, you could start developing a flutter app now on desktop now, but I wouldn't expect to be able to publish that app any time soon without a significant amount of work to get everything to line up properly. Also, publishing it might be difficult at least on windows, and on windows the current shell uses GLFW which isn't probably something you'd want to use in a released app if possible. I'm not from google so I can't speak as to their plans but I would guess (and hope) that there will be some sort of announcement at Google I/O about desktop embedding, but no guarantees.
So TLDR; yes for development purposes but no for deployment.

How to create an iOS app add-on?

Is it possible to create an API inside an iOS app to let 3rd party developers create app add-on that are downloadable for users inside the app?
I could not find any ressources for this topic online.
I think that's going to go against the app store guidelines if your intention is that the 3rd party developers write code, which will be downloaded and executed.
There's something of a grey area between legitimate uses and illegitimate uses of downloaded code:
Legitimate Example 1: Something like Hopscotch where children are creating simple fun shared games. These can be considered user generated content.
Legitimate Example 2: A game which is driven by scripts allows for the run-time downloading of patches to fix bugs in the scripts or even to add new levels. I believe such usages have been rejected occasionally in the past, but are generally accepted these days.
The relevant guideline from the guidelines is (emphasis mine):
2.5.2 Apps should be self-contained in their bundles, and may not read or write data outside the designated container area, nor may they download, install, or execute code, including other iOS, watchOS, Mac OS X, or tvOS apps.
And the all-encompassing:
We will reject apps for any content or behavior that we believe is over the line. What line, you ask? Well, as a Supreme Court Justice once said, "I'll know it when I see it". And we think that you will also know it when you cross it.
If your idea is to create some sort of app-store within your app-store app, then I would abandon it immediately, because that's going to be way over Apple's line.
That said, you haven't given much detail about your app, so I might have made wrong assumptions about where you're thinking of going.

ios - Best way to create own level editor

I've created a core mechanic of my game and want to create a level editor for it. my game is not a tile-based one, so my needs are quite specific. Game is written using Swift and Cocos2d-swift, but i dont think i can figure something out with Sprite Builder.
What you can advice me? Can I for example create a level editor with c# and then use it from swift code?
And what data structure is the best?
I mean is it possible to serialize classes on desktop Swift application and then just load them on ios from file or I'll need to use json/xml?
It might be an old question but I ended up with using a .Net powered solution. I choosed as It has all controls that you need for creating a rich user interface and also, it has a lot of built-in and third party solutions for serializing levels in any way you want. And the c# syntax is very similar to the Swift one.
The only problem is that you might run windows to work with it.
My game in development also needed a non-tile level editor. A few months ago I took some time to make my choice.
Since my project still uses cocos2d 2.x, I don't use the whole new 3.x and SB system. After some investigation I found out that it would be too time consuming to adjust my whole project to the new system and adjusting SB to my needs, mainly because my game engine has been in development for quite some time and is close to finished. Further more, I couldn't find the right information to actually make it work for my game (it needed some odd level architecture I guess).
Finally, I didn't find any other good alternative so I decided to create my own level editor. In this way I had full control and I knew exactly how everything worked which was a huge advantage for me.
Right now my level editor has been finished for some time and works like a charm. I still think in my situation I made the right choice. Also because I learned a lot this way, building everything from the ground up. Having said that, for my next game I will probably go with the main stream and use SB from the start. Also for you I advice you to still check out SB and take some time for it before making an alternative choice...
I'll explain how I did mine. Disclaimer: it has some oddity's which only worked in my situation, but hopefully it helps a bit with choosing your own way to go, that's the goal I'm aiming at...
I used:
max/msp
Although it's developed to make music and audio based software, I used max/msp because it's very easy and fast for creating visual and interface based software as well.
More importend: I happened to be very experienced in it, which shortened the development time tremendously.
javascript
Inside the max/msp patch is a javascript file running. This file is like a bridge between the interface and the visual representation of the level being edited, and the database in which the level
is saved in. 70% of the editor development went into this file I think.
sqlite
All the data is written in a sqlite database. Again, this has been mainly the choice because it saved a great amount of development time in my case. I could have used xml files for instance, but my game was already using a sqlite database and because of this I felt comfortable using it, I had no experience in xml. Also all the code was already in place for a big part, which speeded up the whole proces a lot.
I'm very happy with the end result. It does everything I need, it's easy too use and since I made everything myself from the ground up I know exactly how every works.
Good luck with you choices.

iOS sample projects to learn from

I am just starting iOS development. I read some tutorials, watched stuff on iTunes U and wrote some sample code myself. Now I want to take the next step. I want to learn about best practices for iOS development in XCode.
Are there any well written and well organized iOS projects that one could take a look at?
(As I see it, iOS is not exactly the place for open source enthusiasts, however.)
Thanks
Mike.
I agree with several of the other answers that state that looking at many, many projects for mini-examples of what you want to do in your own app is the way to go.
However, you asked for an example of an app demonstrating best practices.
You could do worse than to read Matt Gallagher's blog, Cocoa with Love from beginning to end. However, the app example you asked for is right here.
Not only will it show a variety of techniques, some novel design and best-practices, but also he points out where he feels that he might have done something better.
It's a great read.
I would suggest the following process: (it worked for me)
Think of an advanced app. that you eventually want to be proficient enough to create.
Make a top-down problem-solving tree containing the necessary skills required to build your final app.
Use this tree to divide your final app. into 'sub apps'. Start at the bottom of the tree, find a tutorial specifically for that skill, and make a "Hello World" app. that uses that skill.
Keep progressing upwards, creating 'sub apps' as you go.
When you are finally ready to make your final app. (it will take a while), you will have a good handle on how iOS development works. It will also be a great test of your knowledge via direct application!
Getting the hang of iOS development can be tricky; it really does require a top-down approach, and every online resource I've found takes a linear one. The only way that I think a linear approach to learning iOS development would be manageable, is to take it one small task at a time.
As for specific resources, I always google "[what I want to do] iPhone SDK" and browse the tutorials and forum posts that come up.
Here are some open source iOS apps. However, they aren't very well documented and are also very advanced.
TKAWebView - A subclass of UIWebView that handles authentication and downloading.
Welcome to your Mac - An iOS app. to VNC into a PC/Mac and do some cool stuff.
InAppSettingsKit - A settings screen creator for your apps.
Good luck!
The people behind the Parse platform have made two complete projects.
For each project there is the complete source code, a tutorial and the resulting app is also available from the AppStore.
Anywall: https://parse.com/anywall
Anypic: https://parse.com/anypic
They both rely heavily on the Parse platform as the data source, but you still get a feel for an iOS project.
Molecules is a great open-source app that uses 3D OpenGL to render complex models of molecules.
Just keep coding my friend. You'll learn over a period of time. The best way to get dirty in a mud fight is to jump into it... Weird analogy but you get the point.
Maybe someday, we all will learn from you then !
Like you said there many and many source codes are available internet, but most are incomplete.
I found some Open source codes of REAL application currently available through Apple app store are given here
Free iPhone App Source Codes of real apps
and also, you can find many answers here on stackoverflow question - Are there any Open-source iPhone applications around?
You can download free IOS sample projects from http://devcodemarket.com
I realize this is an old thread but I've also been looking for good objective-c code examples recently and I just realized that TextEdit's source code is available at the Mac Developer Library webpage.
Also, here are some popular objective-c libraries that have caught my attention:
CocoaPods
AFNetworking.
you can also go through UICatalog from Developers Library and download the sample code. just google it and you will find a project containing all basics of iphone.
I don't think there is any perfect project that can demonstrate all the qualities of great code. Developers have stylistic preferences and may make mistakes. That said, you should look at a lot of different projects and try to look at the conventions used.
I'd suggest starting on GitHub. Besides for seeing code, you'll see what libraries are out there, which may help further your projects later on. Here's the Objective-C page on GitHub.
(Also, I (GitHub link) think you're wrong about iOS devs not being in favor open source. Yes, there's money to be made, but you can't sell a CSV paring library on the App Store as is.)
Have a look at https://github.com/mozilla/firefox-ios
That is Firefox for iOS, written in Swift.
Cocoacontrols has a wide range of controls written using Objective-C & Swift.
I believe these days, this is one of the most famous website for iOS Developers.
But, before you jump onto this, you have to learn Objective-C & Swift very well, so that you will understand how to use the controls in your app which makes your app smooth.

What web application framework should I use for a web gallery?

I need to create a photo gallery for a website running IIS 4.0 or IIS 5.0 (im not sure which). It needs to display a low resolution version of the gallery to anyone, and it must show both the low and high resolution images for "priviledged" users. So I need access priviledges, photo albums and once the site is complete, the person I am doing this for needs to be able to upload their own images to the gallery. It also needs to have a minimal interface as it needs to be integrated into an existing website.
So I need some advice on this with the direction I should approach it.
Does anyone know if their is a customisable gallery out there that can do something like this, such as Coppermine or Jgallery or something. The alternative is to use a web framework like Ruby on Rails, CodeIgniter or Sproutcore (each which require learning a new language). The framework would be more work, but the existing galleries may not be customisable enough. The important bit is the user privileges in an admin panel.
I am relatively new to "web programming", although not new to normal/games programming. I have a few years experience with C/C++ OpenGL and Java. I have also read up on MVC etc, and did hello world with sproutcore, so I kinda get the idea. Although learning a framework is a much heavier investment.
What are your thoughts?
If you don't want to re-invent the wheel you could use Gallery2 (requirements here). It runs on IIS -- you'd just need PHP and a database. It's very configurable (including user accounts), has lots of plugins, and its open source if that's not enough. Also, the development and support communities are large and active.
you could always go the route of Dotnetnuke and then use Ventrian's Simple Gallery module (http://www.ventrian.com/Products/Modules/SimpleGallery/Demo.aspx)
Using DNN offers a ton of functionality, including the security you need, and it would save you from doing any web development.
If you are a bit more adventurous, try Smaltalk based Aida/Web and specially Aida/Scribo CMS (currently still in beta), which include Gallery so called scriblet as well. Scribo scriblets are otherwise web components which you can include directly into a text. You therefore add a gallery directly into a surronding text. See for instance a presentation as a Gallery for example.
I would recommend my own but... If it weren't for the low/high resolution thing with permissions I think it would fit the rest of your needs. I'm going to leave a link just in case you want to take a look at it:
nzFotolog
It's also open-source (although the license is not the best) and you can change it at will if you want. The code itself is clean and self-explanatory. The downside is that I haven't developed it for some time now :(
Having faced a similar dilemma myself I have to say that I found Gallery2 and Coppermine both far too all-encompassing and difficult to customise to the degree I would have wished. I ended up rolling my own using straight, procedural PHP with various bits of jQuery for the GUI fancy bits. At the same time I was able to bake in some e-commerce and data gathering for my wedding photography clients, ending up with something which exactly matched my needs. Certainly, the gallery aspects of this project were, for a complete programming (although not HTML) neophyte, the least challenging - it's exactly the sort of thing PHP is made for.
I'm now taking my first faltering steps with CodeIgniter for my next project (photoblogging software) and I can already see that the framework would make a gallery project very quick, simple and secure.
Flickr.com and their API may be suitable from what you described.
http://www.flickr.com/services/api/

Resources