Thread: SDL taking too many resources

  1. #16
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    Yes bubba, I wouldn't go through all 1200 line of code either, but I would do a find for stuff like SDL_LoadSurface. Since the RAM is being eaten up so fast the code is probably loading too much stuff somehow. When you are only loading the first level from scratch its unlikely to be a problem with old stuff not being cleaned up correctly.

  2. #17
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    SDL_LoadSurface
    You mean SDL_LoadBMP(), or, if the OP is using SDL_image, IMG_Load(), right?

    @Mavix: if you don't have any objections to posting your code (for example, you might not want to release your game's source code), you may as well post it. It's possible that someone will look at it. Right now you're not going to get much more help.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  3. #18
    Registered User
    Join Date
    Sep 2006
    Posts
    98
    Thats why I have decided to do it in c# instead. I have a basic understanding of c++, but for now I'l focus on c#. I'l learn c++ when I go collage, which is still quite far away.
    Also, I always indent my code. I'm neorotic about it. I cant stand, or read, code that isnt indented.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problems compiling this SDL app
    By Rider in forum C++ Programming
    Replies: 3
    Last Post: 03-27-2007, 12:22 PM
  2. SDL and MinGW Studio
    By Vicious in forum Tech Board
    Replies: 0
    Last Post: 07-30-2004, 09:59 PM
  3. SDL and Windows
    By nickname_changed in forum Windows Programming
    Replies: 14
    Last Post: 10-24-2003, 12:19 AM
  4. sdl in c++
    By Klinerr1 in forum C++ Programming
    Replies: 8
    Last Post: 07-07-2002, 07:46 AM
  5. Please help me
    By teedee46 in forum C++ Programming
    Replies: 9
    Last Post: 05-06-2002, 11:28 PM