Welcome Guest! To enable all features please Login or Register.



Go to last post Go to first unread
Offline Michael Koch  
#1 Posted : Sunday, December 29, 2013 8:20:20 PM(UTC)
Michael Koch

Joined: 12/27/2013(UTC)
Posts: 41
Location: Regensburg

Thanks: 3 times
Was thanked: 1 time(s) in 1 post(s)
Hello All,

I'm just taking my first (small) steps with the engine. Thought I could write some sort of "report" of what I was doing. Maybe, it is helpful for other "greenhorns" just starting out, like me. Okay, here we go:

Ensure that you have installed DE from the 1.0 (2D only) installer to e.g. "C:\DeltaEngine.1.0\". Also, get the DE API key (for the online editor) and have VS 2013 Express installed (prior to installing the DE!).

Now, start the DE online editor, go to Project Creator, and create e.g. "MyFirstApp" from the "EmptyApp" template (this actually isn't all empty - there is some code in it, changing the window's background color periodically) .

The online editor creates a new folder in the VS projects directory (in my case, "C:\Users\MiKo\Documents\Visual Studio 2013\Projects\") and fires up VS2013 automatically with the newly created project already loaded. Also, note that the default content that is available online for this project (e.g. "Verdana12Font.png") has been mirrored locally now at "C:\DeltaEngine.1.0\OpenTK\Content\MyFirstApp\".

A VS project compile now populates (in my case) "C:\Users\MiKo\Documents\Visual Studio 2013\Projects\MyFirstApp\bin\Debug\". You can already run the application - it runs with the "background color changing" that has been built in by default as an example.

So, how about resizing the app window and showing a bitmap (png, actually), like in one of the given samples? Yep, lets do that...

In the online editor, go to "Content Manager -> Add content", and upload a fancy picture (png), for later testing. Note that this is also mirrored in "C:\DeltaEngine.1.0\OpenTK\Content\MyFirstApp\".
Also in the online editor, go to "Material Editor" and make (save) a new material "myMaterial" using (selecting) the previously uploaded image. I understand that the "sprite" we want to show later is a textured quad (or so) and will have the material applied then.

To change the application's window size to e.g. 512x512, see "DefaultSettings.xml" (in C:\DeltaEngine.1.0\OpenTK\Content\MyFirstApp\) and edit it to your liking. Then, drag this changed file into the online editor - to replace the content file stored there. When again starting the app from VS, it will not use this new screen settings YET, tho (see below).

In "program.cs", add another line to public Program(). Like so

public Program()
new ColorChanger(Resolve<Window>());
new Sprite(ContentLoader.Load<Material>("MyMaterial"), Vector2D.Half); // <-- NEW LINE

But for this to finally work, we need to add

using DeltaEngine.Rendering2D;
using DeltaEngine.Content;
using DeltaEngine.Datatypes;

and also add a reference to "DeltaEngine.Rendering2D.dll" (Add Reference -> Search -> find dll in "C:\DeltaEngine.1.0\OpenTK\")

Compile again and run the application from VS. Notice that now, upon first run, there is a "content" folder created in e.g. "C:\Users\MiKo\Documents\Visual Studio 2013\Projects\MyFirstApp\bin\Debug\". Among others, the "DefaultSettings.xml" is there, giving our app a e.g. somewhat smaller window size.

Next, go to the online editor again, select "App Builder", press "Start" to build your application remotely and get a setup exe in return - which will be stored for possible distribution and also be installed to "C:\Users\MiKo\Documents\DeltaEngine\DeltaEngine.Editor\BuiltApps\...".

-> Grats to your first app ThumpUp

What I noted during this first steps:

  • The startup window size seems to be standard first always, then switching to different size from "DefaultSettings.xml"
  • As noted above, the content is mirrored at different places (e.g. online, at engine installation folder and at project folder). There will be a reason for this (maybe, this can be changed, too), but one should be aware if large projects are done, IMHO.
  • In the online App Builder, older (removed) projects are still visible - trying to start a build fails, tho. Setup.exe can still be downloaded from the "Accounts->Projects" homepage, tho.
  • Searching the forum can be a bit inconvenient, as one needs to go to another page, then select "Forum->Search" from the main page menu (or I didn't find the right button, lol).


Wanna join the discussion?! Login to your forum accountregister a new account. Or Connect via Facebook Twitter Google

Offline elasto  
#2 Posted : Monday, December 30, 2013 7:14:40 AM(UTC)

Joined: 8/23/2011(UTC)
Posts: 245

Thanks: 6 times
Was thanked: 12 time(s) in 11 post(s)
Thanks for this - nice post ThumpUp
Rss Feed  Atom Feed
Users browsing this topic
OceanSpiders 2.0
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.055 seconds.