XNA Creators Club Online
Page 2 of 2 (35 items) < Previous 1 2
Sort Posts: Previous Next

New Tutorial: Role-Playing Game Tutorial #2 - Re-using the Tile Engine

Last post 12/17/2009 10:58 PM by Jarryd Hoffman. 34 replies.
  • 3/26/2009 3:07 AM In reply to

    Re: New Tutorial: Role-Playing Game Tutorial #2 - Re-using the Tile Engine

    Sorry I'm just going to clear this post. I've had a hard time with this tutorial. I'll be back when I've completed Nick's Tile Engine Series.

    http://nickgravelyn.com/archive/#tileengine

    This tutorial cover more in under an hour than this tutorial. Not hours of renaming variables, functions and classes.
     
  • 4/15/2009 2:47 AM In reply to

    Multiple Quest Lines

    Hey all...has anyone extended this starter kit to support multiple quest lines?

    Are you willing to share your findings or perhaps even write a tutorial?

    I've got an idea for an RPG that I'm considering using the kit for...but I think it's linearity is a bit limiting.

    I expect to dig in and figure it out myself...but I guess there's no harm in asking around and benefiting from the findings of others.

    Thanks
    --Chapel
  • 5/5/2009 11:48 PM In reply to

    Re: New Tutorial: Role-Playing Game Tutorial #2 - Re-using the Tile Engine

    Just to document in case anyone else hits the problem I did, when you change the readerText += ", RolePlayingGameDataWindows" and string typeText = type.FullName + ", RolePlayingGameDataWindows"; lines, you need to change the name to the disk directory where the projects are, not the project name within Visual Studio.

    If you just create them and go, you'll be fine. But if you do like I did and rename the projects inside Visual Studio after you create them, you may have the exact problem where it can't load your map data.
  • 5/7/2009 2:20 AM In reply to

    Re: New Tutorial: Role-Playing Game Tutorial #2 - Re-using the Tile Engine

    Hi,

    I got through the tutorial, errors and all, but it's working.  I have one question about the XML files.  Is there any documentation that explains the XML schema and the layer numbers.  The collision layer I can figure out easily enough, but the other layers are confusing.  What do the numbers mean?  I tried changing them in Map001, but nothing seemed to happen.  Do these correspond to images in an array?  If so, which array, or arrays?  Any help would be great!

    One more question:  I've gone through every bit of code in the project, and I can find nothing that parses the XML files.  It appears that it all happens behind the scens using the ContentReader and Content Manager, but I can find no information on how these work, specifically in relation to this project.  I've read what I can find on MSDN, only understand about a third of it, but none of it explains how the code works through processing an external file.  What I read mentions that you can use various content types, explains that the purpose is to separate the art assets from the programming, but nothing that explains how I can push in an XML file (or another file type) and have the code just understand what's going on.

    The RPG code uses the ReadObject<T> method to read the different elements, but how does it know what the elements are ... unless the schema is set, in which case there has to be some documentation somewhere, and I'm missing something.

    I would appreciate any help that anyone can provide.

    Thanks!
  • 5/7/2009 8:18 AM In reply to

    Re: New Tutorial: Role-Playing Game Tutorial #2 - Re-using the Tile Engine

    I'm kinda stuck.

    I've gotten through most of the tutorial, having finished almost all of the "Bringing the tile engine under control" section. However, this last section is confusing, "Finally, add calls to load the new map and to TileEngine.SetMap, passing in the new map and the new portal, if any:"

    This leads me to believe the following code should be placed within the setmap function in the TileEngine.cs document, but the function is void and within the code there are two return statements. In addition, portal entry and new map are declared as arguements within the function call.

    So my real question is, where does the code following this step go, and is that all the code required? I've only just recently completed the 2d tutorial and had never used C# before so bear with me.


    EDIT: I figured it out. In case anyone else comes across this issue, the text replaces text already in the document. The code is within the function "MoveIntoTile."
  • 5/23/2009 9:22 AM In reply to

    Re: New Tutorial: Role-Playing Game Tutorial #2 - Re-using the Tile Engine

    hi everyone I don't know if this is a stupid question or not but I need someone's help if they can....I was able to complete the tutorial just fine up intil the point where i run the game to see the map one...I actually get this error and I noticed no one else had it so i am wondering if I didn't something stupid or if I am missing something simple...heres the error: this occurs under the Map.cs file in this line of code:

     

    foreach (MapEntry<Portal> portalEntry in map.PortalEntries)

     

    {

    portalEntry.Content = map.Portals.Find(

    delegate(Portal portal)

     

    {

     

    return (portal.Name == portalEntry.ContentName);

     

    });

    and the error is: Object reference not set to an instance of an object.

    Can anyone tell me what I might be missing cause i just can't find it...

    thanks

  • 7/13/2009 11:36 PM In reply to

    Re: New Tutorial: Role-Playing Game Tutorial #2 - Re-using the Tile Engine

    I got an error from the XML file:

    Error    1    There was an error while deserializing intermediate XML. Cannot find type "RolePlayingGameData.Map".    C:\RPGs\RPG2\RPG2\Content\Maps\Map002.xml    3    10    RPG2

    (also Map001.xml)

    the first 3 lines of the file I believe are okay (did not mess with them):
    <?xml version="1.0" encoding="utf-8" ?>
    <XnaContent>
      <Asset Type="RolePlayingGameData.Map">

    I downloaded XNA 3.1 but am using a 3.0 game project
    Is this a subproject name?
  • 8/20/2009 5:58 AM In reply to

    Re: New Tutorial: Role-Playing Game Tutorial #2 - Re-using the Tile Engine

    Hi, this is a great tutorial, thanks alot :D

    Im having a little problem right before "Hooking it up"

    Here is the error:

    Error    1    The name 'Session' does not exist in the current context


    And here is the code:

    Error 1            // check for anything that might be in the tile
                         if (Session.EncounterTile(mapPosition))



    Do i need to import a bit of the code from Session.cs to the TileEngine or something?

    Thanks in advance

    No matter, i just read it wrong, i was supposed to replace that :)


  • 10/25/2009 3:06 AM In reply to

    Re: New Tutorial: Role-Playing Game Tutorial #2 - Re-using the Tile Engine

    I need some help. when I downloaded it and opened it, I came up with millions of errors and it won't let me figure out anything. it tells me a file has moved when it did not and it tells me that roleplayinggameengine or something like that is wrong and all this other stuff. I need a video tutorial on how to do this.
  • 12/17/2009 10:58 PM In reply to

    Re: New Tutorial: Role-Playing Game Tutorial #2 - Re-using the Tile Engine

    I got though it, With very small error's such as Namespace, and a content error, all fixed,
    nice work man..!
Page 2 of 2 (35 items) < Previous 1 2 Previous Next