Results 1 to 2 of 2

Thread: Feature questions.. (visual profiles, minimap, multiple saves)

  1. #1
    Lesser Wizard
    Join Date
    Nov 2006
    Location
    California
    Posts
    101

    Default Feature questions.. (visual profiles, minimap, multiple saves)

    I'm looking over the list of features and it has a few items I had a question about:

    "Visual Profile system makes it easy to apply new looks and animations to entities without modifying the underlying game logic"

    What is this and how do you work with it in your project?

    "Parallax scrolling"

    How do you get this to work?


    "Mini-map system"

    Another "how does this work?" question.


    "Robust automatic save/load allows a fully persistent world"

    is there a way to have multiple saves? named saves?

  2. #2
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,377

    Default

    I'm looking over the list of features and it has a few items I had a question about:

    "Visual Profile system makes it easy to apply new looks and animations to entities without modifying the underlying game logic"

    What is this and how do you work with it in your project?
    A visual profile is an .xml file that let's you define the 'looks' of a sprite.

    In a game where you have 4 or 8 animation directions for idle, walk, run, etc, it gets very cumbersome trying to set all these animations on the fly. By putting them in an xml it's easier to deal with and share, without actually changing the AI code.

    The idea is you say "You're running left" to the engine, it and it will find the best matching animation and play it.

    For instance, if you open worlds\RT_TopViewRPGTest\script\char\top_troll\top _troll.xml, you'd see:

    Code:
    ..snip...
    <profile name="top_troll">
     
       <anim state="idle_left" spritename="idle_left" mirrorx="no"/>
       <anim state="idle_right" spritename="idle_left" mirrorx="yes"/>
       <anim state="idle_up" spritename="idle_up" mirrorx="no"/>
       <anim state="idle_down" spritename="idle_down" mirrorx="no"/>
    ..snip...
    Let's say you're running up left. (note, this applies to top/isometric games mostly, obvious side view wouldn't really have an up_left)

    If you're state is "walk", it would look for walk_up_left. If it's missing, it would choose walk_left. If there are NO walk_* visual defines, it would choose idle_up_left, if that's missing, idle_left, and so on.

    So even if you hand your enemy AI a profile that doesn't perfectly what it can do, things aren't supposed to break, it should just "try" the best it can.

    Btw, idle_left is not a random name, all the names for profile "top_troll" are specific engine keywords that the brains will recognize and use. (idle, walk, run, attack1, die, some others too..) Of course, you can also add your own custom names, but having some official names is useful so brains will know what they can use, and query to see if certain data exists or not easier.

    Visual profiles also define where the art is and things like rotation center, offsent (translation) and animation speed and direction, base rotation.

    There is an in-game editor for XML files but right now it only covers offset/translation. But this is very handy for getting sprites to correctly center over your collision box which would take forever if you had to keep restarting the engine to test the .xml changes.

    To use it, highlight something that uses one, and choose Modify Selected->Edit visual profile. It modifies the .xml itself when you click close.

    So in your script:

    Code:
    this:SetVisualProfile("~/top_troll.xml", "top_troll");
    	this:LoadCollisionInfo("~/top_troll.col");
    Is the only place that needs changing to change the troll into dink for instance. Collision data is not in the visual profile because it's more than a visual tweak.


    "Parallax scrolling"

    How do you get this to work?
    If you look at the tree view example, parallax scrolling is active. Double click a layer to see its properties, there is a scroll mod that let's you set the parallax scroll speed. I don't suggest setting it for any layers that have real collision. By default it's off for new maps. Because there are unlimited layers, you could do some pretty cool effects.

    "Mini-map system"

    Another "how does this work?" question.
    This isn't ready for a real game yet, but you can see how it works.

    Open a populated map and choose Mode->Map Info. You'll see a bunch of boxes. If you scroll out, more boxes will appear, because by scrolling out you're dynamically adding to the map (well, adding blank areas, they don't take space..)

    The red areas are places with actual data. Now choose Options->Auto thumbnail size, and enter 32 or maybe 64 for more detail.

    The map should now contain tiny thumbnails which are saved with the map and can be used for minimap data.

    The neat thing about this is the data can be built on the fly, so if a tree is "grown" in the game, the mini-map will be automatically updated with it. If you go cut and paste something and come back to Mode->Map Info, the changes should be reflected.

    "Robust automatic save/load allows a fully persistent world"

    is there a way to have multiple saves? named saves?
    There are unlimited named saves - in Novashell they are called "profiles".

    The default intro/intro_menu.lua only has one, called "Player" but there is really no reason you couldn't add more save slots.
    Code:
    GetGameLogic:SetUserProfileName(self.defaultProfileName);
    Is where the profile name is set. self.defaultProfileName is set to "Player" near the top of the .lua.

    Now, the only problem is there is no text-input functionality in the engine yet for a player to enter his own saves, and there is no way to scan a directory and let the player pick one, but the base functionality is there. For now, a "Slot" system could be used, and GetGameLogic:UserProfileExists() can be used to check if a slot is actually in use or not.

    GetGameLogic:ResetUserProfile() can delete a profile by name.
    Seth A. Robinson
    Robinson Technologies

Similar Threads

  1. Feature Request: Flood Fill
    By whisperstorm in forum Novashell Game Creation System
    Replies: 6
    Last Post: 04-09-2007, 05:37 PM
  2. Anyone using Microsoft Visual Studio Express with Clanlib?
    By killarkai in forum Official ClanLib SDK Forums
    Replies: 9
    Last Post: 12-24-2006, 03:16 PM
  3. Save feature...?
    By in forum Dungeon Scroll for PC and iPhone
    Replies: 2
    Last Post: 10-22-2004, 01:39 PM
  4. Feature request
    By Tuttle in forum Funeral Quest
    Replies: 5
    Last Post: 07-05-2003, 03:11 PM
  5. Feature Request
    By Fugazi in forum Funeral Quest
    Replies: 1
    Last Post: 11-25-2002, 04:44 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •