About Store Forum Documentation Contact
Donations:
176$/mo



Post Reply 
Don't understand the need for the Intro file in Esenthel MMO
Author Message
Mastermind Offline
Member

Post: #1
Don't understand the need for the Intro file in Esenthel MMO
Bought the Esenthel MMO (source code) and trying to go through the code step by step and understand it all.

But I'm not sure if I understand what the intro file does or why it's there.

This is what is written in it:

Code:
/******************************************************************************/
State StateIntro(UpdateIntro, DrawIntro, InitIntro, ShutIntro);
/******************************************************************************/
bool InitIntro()
{
   return true;
}
void ShutIntro()
{
}
/******************************************************************************/
bool UpdateIntro()
{
   if(StateActive.time()>3 || Kb.bp(KB_ESC))StateSelectServer.set(1);
   return true;
}
void DrawIntro()
{
   D.clear(BLACK);
   D.text (0, 0, "Intro");
}
/******************************************************************************/

UpdateIntro, If I understand correct checks if Intro is active and if it's been active for more than 3 (milliseconds?) OR if the esc key is pressed then SelectServer is enabled.

The part inside DrawIntro is only showed for 3 ms which is practically impossible for the human eye to see anything.

So why does the Intro exist at all?
Why not just enable SelectServer from main instead the same way main enabled Intro ( StateIntro.set(); ).
04-07-2013 01:55 AM
Find all posts by this user Quote this message in a reply
gwald Offline
Member

Post: #2
RE: Don't understand the need for the Intro file in Esenthel MMO
It's a game state to display game intro so you can put your images in drawintro function . See game states tut for more info

My Blog
http://www.esenthel.com/community/showthread.php?tid=6043

I hang out at Esenthel IRC Channel
http://webchat.freenode.net/?channels=#Esenthel
04-07-2013 02:12 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Ozmodian Offline
Member

Post: #3
RE: Don't understand the need for the Intro file in Esenthel MMO
Hi Mastermind,

You are right. From what I know, the idea here is to demonstrate how an Intro could work. If you wanted to display your logos or some video, you would do that hear. For Esenthel MMO, there is not any kind of formal intro.

Please remember, most of these source code examples are here for learning. It is good practice to open an application with an intro rather than jumping straight into the menu screen.
(This post was last modified: 04-07-2013 02:15 AM by Ozmodian.)
04-07-2013 02:14 AM
Find all posts by this user Quote this message in a reply
Mastermind Offline
Member

Post: #4
RE: Don't understand the need for the Intro file in Esenthel MMO
ok, thanks smile
Almost feel a bit silly asking this question now in hindsight haha
04-07-2013 02:35 AM
Find all posts by this user Quote this message in a reply
Post Reply