Results 1 to 3 of 3

Thread: Graphic Memory Handeling

  1. #1

    Default Graphic Memory Handeling

    Hi, i just rescently stumbled over this Novashell and it looks very promising for me. Im searching for quite a while a free, robust and easy to use Game Creation System with heavy scripting support and the features of this toolset are great, it shows that this toolset was designed from someone who has knowledge about how something does work and really thought about the design of a toolset. Also after a friend of mine showed me Novashell and that it uses Lua, it instandly got my attention because im searching quite long for a 2d engine that fits my needs. I nearly lost hope and began to suspect that i had to create the toolset myself (while i can program i dont have much interest in creating a engine and tools from scratch because it would take me 2-4 months just to lay down and understand how a game engine works, even with librarys like SDL)
    So i have some very specific questions about this toolset that may or may not could be the doom for my project but i have to ask them none or less:

    1) How is the texture loading be handled?
    Does it load all textures at start into the Video Memory or does it load and unload the required textures at mapchange and/or do i have control over loading and unloading textures or does it have some sort of dynamic loading? Im planing to create an adventure-like sandbox RPG with many pre-rendered levels (it will play in a modern city, so tileable graphics are nearly out of question exept in some rare cases), mixed with fullscreen closeup scenes for special events (like visual novels, a background and one or multiple closeups of characters with simple animations).
    A Testscene graphic for a level i've created is already 2048x2048 wide (without a second Layer). So im properly can say that the game will be very, very graphic intensive and if all grahic data will be loaded at start, i could easily run into big trouble there that i do not want.

    2) More a question out of curiosity : it possible to run movies like Bink or Theora?
    If yes, can i run them in a layer with scripted effects or events over it (for example a movie as background for the menu or with ingame subtitles)?

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

    Default

    1) How is the texture loading be handled?
    Does it load all textures at start into the Video Memory or does it load and unload the required textures at mapchange and/or do i have control over loading and unloading textures or does it have some sort of dynamic loading?
    Textures are loaded and handed off to Clanlib's CL_Surface (which attempts to place them in video memory) on a need-to-use basis, and then will sit there cached out. I'm not really sure how much automatic texture optimization/handling is done inside of GL itself... anybody?

    I assume if you kept loading things it would eventually lag out and die. Would be a simple thing to add a ClearTextureCache() or something though to the script command, or with a bit more work, kill textures that haven't been used in 10 minutes or something like that.

    The way things are setup in Novashell, they will just reload the texture when it is needed, instead of crashing or something. (in theory.. )

    In case you're looking at the C++ code: Shared map textures are handled in a global HashedResourceManager() object, and textures used in Entity profiles are loaded and cached in the VisualProfileManager() object.

    2) More a question out of curiosity : it possible to run movies like Bink or Theora?
    This isn't currently supported. If this is added, it should be done in a crossplatform way, for instance, we don't want to use a windows media player object or anything.
    Seth A. Robinson
    Robinson Technologies

  3. #3

    Default

    Sorry if didn't understand that completely but thats how i understood that:

    Novashell at this point does not free any textures (for example textures that only the last map used) but in theory reloads texture if they are needed, for example a new map uses new textures and it will load them? And at this time there is also no real possibility to manage texture memory manually with LUA-scripting, while i dont know how fool proof this can get (for example unloading needed or used textures could crash the engine), so once loaded textures stays there till the engine restarts or the game is closed?
    That would imply that for example the main menu textures are loaded and then always stays in the memory, just eating up place?

    Thats is very unfortune for me because of the nearly non-tileable nature of my project. I wanted to do some kind of Baldurs Gate like level graphics. that implies that i just need the really big textures just for one map that just could be loaded and unloaded during mapchange and some textures are just used on a "needed base" like character portraits of NPCs (i would never need all character portraits in a bar of all NPCs at once when just talking with the bar man for renting a room).

    Im fully aware that this way my game also takes many hard drive space but fortunately there are very good compression techniques like png and zip out there that reduce the disk space but that wont work for video ram. 2048x2048 24 bit textures for example eats up 12MB in the video memory (i dont know if they get conerted in Novashell, in SDL you can convert Surfaces in the display format with the command SDL_DisplayFormat(), so they can eventually eat up more then 12MB, if your Display runs in 32bit) but on the disk i can compress them down as png to 6mb loseless or use jpg that would even in maximal detals just need arround 2-4mb (that would be perfect for static backgrounds with no transparency).

    Well, i didn't touched the C++ code jet but i think i will definitly take a look at it some time.
    Last edited by Haimon; 01-19-2009 at 03:10 PM.

Similar Threads

  1. Video Memory
    By EdK in forum Official ClanLib SDK Forums
    Replies: 2
    Last Post: 06-14-2008, 08:39 PM
  2. Big memory leak in CL_PNGProvider::save
    By FluXy in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 05-01-2008, 03:12 PM
  3. newbie memory management
    By celtx in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 11-09-2007, 12:13 PM
  4. SiS graphic error
    By Scriptiz in forum Novashell Game Creation System
    Replies: 7
    Last Post: 06-10-2007, 07:15 PM
  5. Memory Leaks
    By in forum Funeral Quest
    Replies: 9
    Last Post: 03-06-2007, 11:00 AM

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
  •