Delta Engine
»
General
»
Showcase
»
MainMenuSample by BFoX
Joined: 8/22/2011(UTC) Posts: 170 Location: Moscow
Thanks: 3 times Was thanked: 2 time(s) in 2 post(s)
|
Hi I create Main Menu Sample. Appreciate MainMenuSapmle in COnten Manager Public project. Sorry for the bad refactoring =) there's no time to do better.cant build in launcher How fix it ? Quote:Info: Starting build. Received client data: 8 files to compile, 0 build files cached. (MainMenuSapmle ) Info: Sending 1 updated client compiler file to the build service: MainMenuSample\MainMenuSample.csproj (MainMenuSapmle ) Info: Received and updated 1 compiler files (8.00 KB) (MainMenuSapmle ) Error: Aborted build, failed to execute build service: Unable to add required 'Delta.PhysicsEngines' implementation. There are no settings for it, but the implementation is required by the code! (MainMenuSapmle ) Edited by user Saturday, January 7, 2012 10:13:06 PM(UTC)
| Reason: Not specified File Attachment(s):  MainMenuSample.rar (32kb) downloaded 7 time(s).bfox attached the following image(s):  Screen1.png (62kb) downloaded 27 time(s). Screen2.png (40kb) downloaded 22 time(s).You cannot view/download attachments. Try to login or register. |
Russian game developer. Давайте делать игры в команде. Идет набор. |
|
|
|
Medals:  Joined: 8/20/2011(UTC) Posts: 1,421 Location: Hannover
Thanks: 18 times Was thanked: 97 time(s) in 92 post(s)
|
Hey BFox,
thanks for the Sample. Kirsten (Artist on the Engine Team) has written a Main Menu today as well with some really good coding practices (she is a artist, not a programmer, but was able to figure it out with help of the Tutorials and Tests ^^). It will be included in the next nightly release and the tutorial will also be beautified in the future (currently uses the default theme, but a custom theme would even be better).
But I will also checkout your example.
|
|
|
|
Medals:  Joined: 8/20/2011(UTC) Posts: 1,421 Location: Hannover
Thanks: 18 times Was thanked: 97 time(s) in 92 post(s)
|
Looks like you put a lot of work into your sample. I think some things are a bit overly complicated, maybe take a look at the new TestSimpleMainMenu tutorial Kirsten added today in Delta.Scenes.Tests. Here is a short snippet on how to create the GameScreen (because you were asking about Open and Close in another thread): Code:
// Add simple main menu button to start the game
Button startButton = new Button
{
LocalArea = Rectangle.FromCenter(0.5f, 0.35f, width, height),
Text = "Start Game",
};
startButton.Clicked += delegate
{
new DummyGameScreen().Open();
};
Add(startButton);
And in the DummyGameScreen class a simple constructor is provided to get back to the main menu: Code:
public DummyGameScreen()
: base("<SimpleGameExample>")
{
// Add simple text on top where this game is coming from
Label infoLabel = new Label
{
LocalArea = Rectangle.FromCenter(
0.5f, ScreenSpace.DrawArea.Top + 0.025f, 0.5f, 0.05f),
Text = "This is the SimpleGameExample sample game!",
};
Add(infoLabel);
// Add Back-Button like in all other screens
Button backButton = new Button
{
LocalArea = Rectangle.FromCenter(0.5f, 0.80f, 0.25f, 0.05f),
Text = "Back",
};
backButton.Clicked += delegate
{
Close();
};
Add(backButton);
}
That is pretty much all there is to be done. The Tutorial also covers a Credits screen and an Options screen plus an Exit button in the main menu. As I said above we will improve the graphics later too.
|
 1 user thanked Benjamin for this useful post.
|
|
|
Joined: 8/22/2011(UTC) Posts: 170 Location: Moscow
Thanks: 3 times Was thanked: 2 time(s) in 2 post(s)
|
Originally Posted by: Benjamin Nitschke (DeltaEngine)  Looks like you put a lot of work into your sample. I think some things are a bit overly complicated, maybe take a look at the new TestSimpleMainMenu tutorial Kirsten added today in Delta.Scenes.Tests. Here is a short snippet on how to create the GameScreen (because you were asking about Open and Close in another thread): Code:
// Add simple main menu button to start the game
Button startButton = new Button
{
LocalArea = Rectangle.FromCenter(0.5f, 0.35f, width, height),
Text = "Start Game",
};
startButton.Clicked += delegate
{
new DummyGameScreen().Open();
};
Add(startButton);
And in the DummyGameScreen class a simple constructor is provided to get back to the main menu: Code:
public DummyGameScreen()
: base("<SimpleGameExample>")
{
// Add simple text on top where this game is coming from
Label infoLabel = new Label
{
LocalArea = Rectangle.FromCenter(
0.5f, ScreenSpace.DrawArea.Top + 0.025f, 0.5f, 0.05f),
Text = "This is the SimpleGameExample sample game!",
};
Add(infoLabel);
// Add Back-Button like in all other screens
Button backButton = new Button
{
LocalArea = Rectangle.FromCenter(0.5f, 0.80f, 0.25f, 0.05f),
Text = "Back",
};
backButton.Clicked += delegate
{
Close();
};
Add(backButton);
}
That is pretty much all there is to be done. The Tutorial also covers a Credits screen and an Options screen plus an Exit button in the main menu. As I said above we will improve the graphics later too. Great! Thank you. I found my mistakes and learned how to do. My example is a really complicated, but there are interesting solutions that I made for myself. Maybe useful to someone. |
Russian game developer. Давайте делать игры в команде. Идет набор. |
|
|
|
Delta Engine
»
General
»
Showcase
»
MainMenuSample by BFoX
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.