Jump to content
  • entries
    943
  • comments
    5,899
  • views
    924,386

Ultra Engine Client App


Josh

4,513 views

 Share

I've been working hard getting all the rendering features to work together in one unified system. Ultra Engine, more than any renderer I have worked on, takes a lot of different features and integrates them into one physically-based graphics system. A lot of this is due to the excellent PBR materials system that Khronos glTF provides, and then there are my own features that are worked into this, like combined screen-space and voxel ray traced reflections.

Anyways, it's a lot of difficult work, and I decided to take a "break" and focus something else for a few days.

Before Leadwerks was on Steam, it had a web installer that would fetch a list of files from our server and any files that were missing, or were newer than the locally stored ones. There was no system for detecting updates, you just pressed the update button and the updater ran. The backend for this system was designed by @klepto2 and it functioned well for what it needed to do.

install.png.ccf6c80217f7903c3b7a2c5aa2db11cf.png

With Ultra App Kit, I created a simple tool to generate projects. This introduced the account authentication / signin system, which was sort of superfluous for this application, but it was a good way to test it out:

ss_1d7bdedccece25796c428121ef4d3d549da152ac.thumb.jpg.31db11ed0fa194983b9ebace00fde0d1.jpg

With Ultra Engine, I wanted some characteristics of both these applications. I wrote a new backend in about a day that handles updates. A PHP script authenticates the user and verifies product ownership, fetches a list of files, and retrieves files. Since C++ library files tend to be huge, I found it was necessary to add a compression system, so the script returns a zip compressed file. Of course, you don't want the server to be constantly creating zip files, so it caches the file and updates the zip only when I upload a new copy of the file. There's also a cache for the info retrieval, which is returned in JSON format, so it's easy to read in C++.

For the front end, I took inspiration from the Github settings page, which I thought looked nice:

github.thumb.png.005b32b6527a54c6524357f76b4487e8.png

And here's what I came up with. Projects will show when they are outdated and need to be updated (if a file in the template the project came from was changed). Each of the sections contains info and links to various topics. There's a lot there, but none of it feels extraneous to me. This is all made with the built-in GUI system. No HTML is used at all:

Image1.thumb.png.db23b1f4711f589ae806f27d90ab0697.png

The Invision Power REST API is extremely interesting. It allows authentication of accounts and purchases, but it can be made to do a lot of other things.

None of that is very important right now, but it does provide some interesting ideas for future development of the game engine.

  • Like 4
 Share

29 Comments


Recommended Comments



I think this is interesting. It would probably be possible to display the full forum contents in the application, with a reply box that acted more like a chat system, like Discord but organized like a forum to facilitate in-depth discussion. It is possible to do the same thing with the marketplace / downloads system, which was my original plan, but I'm not going to pursue anything like that until the amount of content we have ready demands it.

Anyways, I think that is as far as I will take these experiments for now. It is cool to see it working. But the real reason for all this is license management.

  • Like 4
Link to comment

A discounted annual, I have to say that I will only be a spectator of this great engine. But for sure there will be some marketing to attract potential use

Link to comment
53 minutes ago, Genebris said:

I hope you don't ask for credit card inside the client. I don't trust any software besides Firefox.

No, purchases only run on our site, and the server does not store CC info at all. PayPal issues a "token" that is associated with only this domain, and can't be used from any other site.

  • Like 2
  • Thanks 1
Link to comment

For installing files, I found what works really well is to download all files to a temp folder, generate a bat file that extracts everything into the "Program Files/Ultra Engine" folder (or wherever the destination is, and then run the .bat file with admin privelges with Shell execute. There's no need to create an application that has admin privileges. We can even have an option to open the folder the .bat file is in and do a manual install, so the user never has to agree to give the application admin rights, if they want, and they can inspect the bat file to see exactly what it does before running it.

  • Like 2
  • Thanks 1
Link to comment

This is very nice. I can just drop a file on the server with my FTP program, wait about 60 seconds, and the client shows that an update is available.

  • Like 1
  • Thanks 1
Link to comment
On 8/2/2022 at 12:32 PM, Josh said:

Some more shots. All of this is fully working now:

Untitled.thumb.png.587036540cfccba11df76b82fc17e034.png

Untitled2.thumb.png.ab9d9003b52432e62ba26effc0fb5683.png

Will only one subscription be available, or can I buy the full version at a time?

Link to comment
1 hour ago, Cromartie said:

Will only one subscription be available, or can I buy the full version at a time?

If you buy my company.

  • Like 1
  • Haha 1
  • Sad 1
Link to comment

@Cromartie There was a very detailed discussion here about this:
https://www.ultraengine.com/community/topic/60986-ultra-engine-pricing/

Basically, Steam is no longer a viable marketplace for desktop software, and I have to adjust to that reality. If I were to release Ultra Engine with the same terms as Leadwerks, it would make a fair amount of sales the first month and then just completely stop. I would rather not release Ultra at all and keep it for my own projects than to release it like that.

In the long run, the subscription model is the only thing that works. That's not as simple as just charging a monthly fee for the same thing you had before. A subscription product needs to have ongoing development with frequent releases and a long roadmap with no big U-turns. Remember L3DT? Unwrap3D? C4 Engine? They all used the buy-once model and they're all stagnant now. Even if you do paid updates every year, it still sucks because then you have year-long periods with no new features, since you have to postpone them all for the upgrade.

  • Like 2
Link to comment

The world is the way it is, nothing is free even if they want to convince you of that. The business model implies that a good product receives updates in exchange for money. Money motivates the developer, and it is the only way to motivate him because nobody is going to do things for free.

Link to comment
4 hours ago, Josh said:

@Cromartie There was a very detailed discussion here about this:
https://www.ultraengine.com/community/topic/60986-ultra-engine-pricing/

Basically, Steam is no longer a viable marketplace for desktop software, and I have to adjust to that reality. If I were to release Ultra Engine with the same terms as Leadwerks, it would make a fair amount of sales the first month and then just completely stop. I would rather not release Ultra at all and keep it for my own projects than to release it like that.

In the long run, the subscription model is the only thing that works. That's not as simple as just charging a monthly fee for the same thing you had before. A subscription product needs to have ongoing development with frequent releases and a long roadmap with no big U-turns. Remember L3DT? Unwrap3D? C4 Engine? They all used the buy-once model and they're all stagnant now. Even if you do paid updates every year, it still sucks because then you have year-long periods with no new features, since you have to postpone them all for the upgrade.

OK, thanks a lot for your reply!

Link to comment
3 hours ago, Yue said:

The world is the way it is, nothing is free even if they want to convince you of that. The business model implies that a good product receives updates in exchange for money. Money motivates the developer, and it is the only way to motivate him because nobody is going to do things for free.

I didn't write anything about something free.

Link to comment

I ended up using tar to extract files, which is now built into Windows. Some behavior tar has that annoyed me at first is that it retains the original time stamp of a file when it is extracted. In other words, if you extract a tar file, the extracted file will show whenever it was last modified, BEFORE it was compressed. I would normally expect this to show the date/time it was extracted from the tar.

However, I found that if I retain the original time stamp when creating projects, we can more accurately test if a project template file is newer than the generated project's files. In Leadwerks, if you uninstalled the application and reinstalled it, all project templates would appear newer than the files in your projects, so any changes would be overwritten (with a backup copy of the file in the same folder).

Now, if you use tar.gz files for your project backups, you can retain the time stamps and everything will stay in sync with the editor very nicely.

  • Like 2
Link to comment

I switch from ZIP to tar.gz for the compressed downloaded data because ZIP files weren't storing the right timestamps. In PHP 8.0 you can set the time stamp inside a ZIP file, but this site won't currently work with PHP 8. Tar I guess is built around unix time stamps so it works much better.

This is pretty nice because the application files themselves and your project file are all stored with the original time stamps.

However, there is one potential problem. 

  • You create a project at 8 AM.
  • I upload an update at 9 AM.
  • You modify a file at 10 AM.
  • You download the update at 11 AM

In the situation above, your project won't show as being out of date because your modifications at 10 AM (independent from time zone) came after the updated file was uploaded.

Template updates aren't very common, and overall I think this is the simplest and best choice.

Link to comment

However, the PHP Phar class does not preserve the original file modification time, and I can't find any way to do it. I can't even find anything mentioning the problem. It's pretty telling of the tech industry as a whole that all the discussion is about reading tar files and there's virtually nothing about writing them.

So I created a little utility to change file times, and now the whole system works:

#include <iostream>
#include <string>
#include <sys/utime.h>

int main(int argc, const char* argv[])
{
	if (argc < 3) return -1;
	std::string path = argv[1];
	uint64_t timestamp = atoi(argv[2]);
	struct _stat64 filestat;
	if (_stat64(path.c_str(), &filestat) != 0) return 1;
	__utimbuf64 utm;
	utm.actime = filestat.st_atime;
	utm.modtime = timestamp;
	if (_utime64(path.c_str(), &utm) == 0) return 0;
	return 2;
}

 

Link to comment

I just hope this time that you don't put game scripts and assets in the Core Template like you did in Leadwerks. Also you will still allow us to mute warnings that our project is out of date or make it less intrusive.

When I create a project from a blank template, I should only get files needed to run the app successfully. I don't want Monster Lua scripts or Tree models if I'm making a tic-tac-toe game.

Besides my early years with Leadwerks, I did manual version controlling. 

Link to comment

Well, in Ultra C++ has entity components, so there is not such a need to merge C++ and Lua projects together. Also, since we can now load files from a URL the default templates do not have to contain all the files for examples to run, since they can just be loaded off of github with a URL.

I wanted to see how this system would handle header files. These are a strange case because each one is very small, but there can be thousands of them. I tried testing with the Leadwerks header files. They're only 19 MB, but uploading 1700 individual files via FTP is not feasible. I waited 20 minutes and it's still calculating the job size, or something like that.

I think I can make it so a zip file will get extracted automatically, so I can upload all headers in a single zip any time they change.

Link to comment

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...