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

Notification

Icon
Error

2 Pages12>
Options
Go to last post Go to first unread
Offline mc-kay  
#1 Posted : Wednesday, August 14, 2013 8:40:12 PM(UTC)
mc-kay

Medals: Admin

Joined: 8/24/2011(UTC)
Posts: 138
Location: Hannover

Thanks: 1 times
Was thanked: 12 time(s) in 7 post(s)
A new sprint release of Milestone 4 Saturn has finally arrived.
Download links for GitHub and CodePlex are on http://DeltaEngine.net/Download

Note 1: This is a OpenTK only release, other platforms will come soon.
Note 2: You may have problems running a sample game if there is already a "Content" folder, in this case just delete it an try again.
Have fun testing ThumpUp

Edited by user Friday, August 23, 2013 9:41:26 PM(UTC)  | Reason: Not specified

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

Offline internetfreak  
#2 Posted : Wednesday, August 14, 2013 8:48:55 PM(UTC)
internetfreak

Joined: 12/19/2011(UTC)
Posts: 529

Thanks: 10 times
Was thanked: 16 time(s) in 15 post(s)
Thanks for the release. Does that post also mean that the new website is released, so it's the version I can see now?
Anyway, I'll now grab the code and then look what I can manage to do after digging in a bit to learn the differences :)

Btw, I just saw I'm quoted on the main page, very nice from you (I mean the complete DE staff ;) ). One hint, I'm quoted two times with the same quote and can you maybe give me the source of my quote because I cannot find the source where I left it, I just want to reread the complete post where the quote comes from :)
Mein Blog: www.internetfreak.net

- Inoffizieller DeltaEngine-Supporter und Tutorialschreiber -
Offline internetfreak  
#3 Posted : Wednesday, August 14, 2013 9:48:36 PM(UTC)
internetfreak

Joined: 12/19/2011(UTC)
Posts: 529

Thanks: 10 times
Was thanked: 16 time(s) in 15 post(s)
Ok, I tried to get started with the new release but unfortunately I don't get it how I have to proceed. Because there's no empt game template anymore I started with the LogoApp Sample.
First, NuGet couldn't get the dependencies automatically even after several rebuilds so I had to install the Packages manually
Second, how am I supposed to start? I see that you run "new Program().Run()" but where is the place to define my game logic? In the previous release we were able to use the Run() method but now it seems to be internal so there's another way to get started, but how?
Third, if I only run the necessary code to run the game, I get a NullReferenceException. Since I heard already from benjamin that the online content is currently broken I used "new DiskContentLoader" before, but then I ran into another exception where the app is trying to write into protected memory

Maybe I'm only doing something wrong but I'm completely clueless how to proceed since it seems that there are many changes since 0.9.8.2 (honestly, it' a bit too much now, each release changed something so I had to learn again. Please don't change too much, I want to help with tutorials but when I'm supposed to relearn it again with every release, it's a bit hard to write tutorials :) )
Mein Blog: www.internetfreak.net

- Inoffizieller DeltaEngine-Supporter und Tutorialschreiber -
Offline mc-kay  
#4 Posted : Wednesday, August 14, 2013 11:41:12 PM(UTC)
mc-kay

Medals: Admin

Joined: 8/24/2011(UTC)
Posts: 138
Location: Hannover

Thanks: 1 times
Was thanked: 12 time(s) in 7 post(s)
Just compiled the source code version from CodePlex on my home PC without any errors, do you have "Allow NuGet to download missing packages during build" enabled under "Options -> Package Manager -> General" in Visual Studio?
The Entity system is a bit confusing when using it the first time, so as a kickstart here is super simple one-file app that shows you a blinking colored rectangle that change his color when clicking the left mouse button:
Code:

using System.Collections.Generic;
using DeltaEngine.Commands;
using DeltaEngine.Datatypes;
using DeltaEngine.Entities;
using DeltaEngine.Input;
using DeltaEngine.Platforms;
using DeltaEngine.Rendering;
using DeltaEngine.Rendering.Shapes;

namespace DeltaEngineApp
{
	internal class Program : App
	{
		public Program()
		{
			new GameCode();
		}

		private static void Main()
		{
			new Program().Run();
		}
	}

	internal class GameCode : Entity2D
	{
		public GameCode()
			: base(Rectangle.Zero)
		{
			Add(new ColoredBoxThatChangeHisColorWhenClicking());
			Start<ColoredBoxBlinkingHandler>();
		}
	}

	internal class ColoredBoxThatChangeHisColorWhenClicking : Entity2D
	{
		public ColoredBoxThatChangeHisColorWhenClicking()
			: base(Rectangle.Zero)
		{
			coloredBox = new FilledRect(Rectangle.FromCenter(Point.Half, new Size(0.2f)), Color.Yellow);
			new Command(ChangeColorOnMousClick).Add(new MouseButtonTrigger(MouseButton.Left,
				State.Releasing));
		}

		private readonly FilledRect coloredBox;

		private void ChangeColorOnMousClick()
		{
			coloredBox.Color = coloredBox.Color == Color.Yellow
				? coloredBox.Color = Color.Blue : coloredBox.Color = Color.Yellow;
		}

		public void Blink()
		{
			coloredBox.Visibility = coloredBox.Visibility == Visibility.Show
				? Visibility.Hide : Visibility.Show;
		}
	}

	internal class ColoredBoxBlinkingHandler : UpdateBehavior
	{
		public override void Update(IEnumerable<Entity> entities)
		{
			if (!Time.CheckEvery(0.25f))
				return;
			foreach (var entity in entities)
				entity.Get<ColoredBoxThatChangeHisColorWhenClicking>().Blink();
		}
	}
}

For the case that you still can't execute this code I attached my solution so you can try to figure out whats wrong.
Hope this helps ThumpUp
File Attachment(s):
DeltaEngineApp.zip (774kb) downloaded 1 time(s).

You cannot view/download attachments. Try to login or register.
Offline Benjamin  
#5 Posted : Thursday, August 15, 2013 1:17:13 AM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
The new website is coming online in a few hours. There will also be some extra releases in the next days and weeks to fix remaining issues and add all the other frameworks.