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

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline maritn  
#1 Posted : Thursday, December 22, 2011 3:10:25 PM(UTC)
maritn

Joined: 12/14/2011(UTC)
Posts: 18

Thanks: 6 times
I was trying to create a main menu for my test game (not done yet, but I wanted to start with some easy thingy first), but I don't seem to get it right. I took a look at the button / screen toturials, but I'm not sure where to implement it. My first idea was to create an extra MainMenu.cs which is called during the Program.cs execution instead of the Game.cs. Is it necessary / usefull to derive the MainMenu class from the DynamicModule class like the game file itself? Or is it better to implement the main menu directly in the game constructor?

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

Offline Benjamin  
#2 Posted : Friday, December 23, 2011 10:21:59 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)
It doesn't matter if you derive from DynamicModule or not. The only thing DynamicModule provides is an automatic call to the Run method (wherever you inserted it, the parent in the constructor is important).

The question here is why you are not using Delta.Scenes.UserInterfaces? Check out the tests in Delta.Scenes.Tests and you should be able to copy those/extend those into a fully functional main menu UI. You don't have to use those, but they will make your life much easier and all of the games currently being developed use this UI. There is no editor (but some of the teams have written their own) and the advanced controls are not all done yet, but the UI system is very powerful and easily extensible in the Delta Engine ThumpUp
thanks 1 user thanked Benjamin for this useful post.
maritn on 12/25/2011(UTC)
Offline maritn  
#3 Posted : Sunday, December 25, 2011 3:46:11 PM(UTC)
maritn

Joined: 12/14/2011(UTC)
Posts: 18

Thanks: 6 times
I tried them out, but they were all buggy in 0.9.1. Now I installed to latest nightly release (I think 0.9.1.6), and the demos work fine. I hope I can now derive a menu from them. :)

But I'm still not sure where the best place to put the menu code would be. Game constructor? Program.cs? An extra file?
Offline Benjamin  
#4 Posted : Monday, December 26, 2011 7:14:41 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)
Yes, sorry about that v0.9.1 had some issues. The v0.9.2 release is comming soon and will have them all fixed (as you can see with the Nightly Releases).

I would just create a new file MainMenu.cs, derive it from BaseScreen and put all the code there. Later you could refactor more and maybe create your own Screen base class for your game, etc. Let us know if you need more tips or samples.
thanks 1 user thanked Benjamin for this useful post.
maritn on 12/26/2011(UTC)
Offline maritn  
#5 Posted : Saturday, December 31, 2011 5:48:59 PM(UTC)
maritn

Joined: 12/14/2011(UTC)
Posts: 18

Thanks: 6 times
Am I doing anything wrong or are the tests even more buggy in v0.9.2?
Offline Benjamin  
#6 Posted : Sunday, January 1, 2012 10:38:49 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)
Which tests are buggy for you? I have not tested many unit tests this week because they were pretty stable in the nightly releases, but the SampleBrowser was improved and tested more. Maybe you ran into some other trouble?
Offline maritn  
#7 Posted : Sunday, January 1, 2012 5:01:56 PM(UTC)
maritn

Joined: 12/14/2011(UTC)
Posts: 18

Thanks: 6 times
All Scenes. (at least those I have tried yet)
Offline Benjamin  
#8 Posted : Sunday, January 1, 2012 5:35:46 PM(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)
Will test them again, probably had to do with other reported issues on the client side. Server fixes already have been made and projects can be created now again and the Launcher should also now work for everyone.
Offline Benjamin  
#9 Posted : Sunday, January 1, 2012 8:13:02 PM(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)
All fixed now in v0.9.2.1. The problem was a new last minute feature, which when initially searching for OptionalAssemblyPath caused WindowsInformation to be invoked and cause the Factory, etc. to be created, which needs OptionalAssemblyPath we want to find in the first place. When an existing Settings.xml was used, or OptionalAssemblyPath was already setup or if the dll is up to date (which is the 3 cases I tested) this does not happen. It did however happen on a fresh installation :(
Rss Feed  Atom Feed
Users browsing this topic
OceanSpiders 2.0, Yandex
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-2023, Yet Another Forum.NET
This page was generated in 0.078 seconds.