Results 1 to 5 of 5

Thread: Drawing/displaying problem

  1. #1
    Squire
    Join Date
    Sep 2006
    Location
    Germany
    Posts
    13

    Question Drawing/displaying problem

    Can anyone help me?
    my friend (and I) have programmed a lil text based(console) game.
    now he wanted to use graphics and so we used ClanLib.
    but before we paint all images we had the idea to use Clanlib fonts
    to draw the text in a "normal" window so thats possible that we can change it slowly.
    but on some PCs the displaying is not correctly and the screen glimmers and does not show everything coreectly..
    can anyone give us tips how we can solve that problem ?
    if you want i can post parts of the code....
    the binary for windows you can find here:
    http://nanosoft.na.funpic.de/downloa...olife.0.84.zip
    and the old console version can be found here:
    http://nanosoft.na.funpic.de/index.php?page=downloads

    thank everyone who'll help us...

  2. #2
    Squire
    Join Date
    Sep 2006
    Location
    Germany
    Posts
    13

    Question

    Can really nobody help me ??

  3. #3
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Bergen, Norway
    Posts
    588

    Default

    If you provide a *small* source example that produces this effect, it much more likely someone can help you.

    With a binary, its near impossible to tell what can bes wrong.

  4. #4
    Squire
    Join Date
    Sep 2006
    Location
    Germany
    Posts
    13

    Default

    Hi
    here is a small piece of the code:
    Code:
    int main()
    {
    init_CL() ;
    //This line directly above is only not in reallity here. it should show that clanlib is already initialised
    func_init_all_vars();
    srand(static_cast<unsigned>(time(NULL)));
    cls();
    app.font->set_color(CL_Color(0,0,0));
    //con.setTitle("Nano Life (c) by NanoSoft inc. NL 0.8");
    app.window->set_title("Nano Life (c) by NanoSoft inc. NL 0.84");
    app.window->flip();
    CL_System::keep_alive(10);
    app.font->draw(0, 0, string("******************************************** Version 0.84 ********************************************"));
    app.window->flip();
    //app.start_sound("beep.ogg");
    app.font->set_color(CL_Color::blue);
    app.font->draw(380, 30, string("NanoLife wird geladen:"));
    the CL init code is here

    Code:
    try
    		{
    			CL_SetupCore setup_core;
                CL_SetupDisplay setup_display;
    			CL_SetupGL setup_gl;
    			CL_SetupSound setup_sound;
    			CL_SetupVorbis vorbis;
    			//CL_SetupMikMod mikmod;
    			CL_SetupGUI setup_gui;
    			
    			window = new CL_DisplayWindow("NanoLife", 1024, 768);
    			window->set_fullscreen(1024,768, 32);
    			window->hide_cursor();
    			window->set_buffer_count(2);
    			font = new CL_Font("Arial", 30);
    			tastatur = new Keyboard;
    you can review the complete source HERE
    But i'm sure nobody will read it. it is a bad coding style a very much code.over 20000 lines of source (without comments, ther aren't so much)

  5. #5
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Bergen, Norway
    Posts
    588

    Default

    Basically it seems you're missing the point that you have to redraw the entire screen on every update. Make a main loop that clears the screen, redraw all text that should be visible, do a keep_alive and flip(). Repeat until user quits.

Similar Threads

  1. bow problem
    By rabidwolf9 in forum Dink Smallwood HD
    Replies: 0
    Last Post: 12-23-2004, 08:28 PM
  2. Problem
    By Dorian1 in forum Dink Smallwood HD
    Replies: 2
    Last Post: 08-26-2004, 04:42 AM
  3. Problem
    By Wishchrono in forum Dink Smallwood HD
    Replies: 1
    Last Post: 08-24-2004, 06:57 PM
  4. Problem
    By in forum Other RTsoft Games
    Replies: 2
    Last Post: 06-09-2003, 06:12 PM
  5. FQ Problem
    By in forum Funeral Quest
    Replies: 5
    Last Post: 08-18-2002, 10:28 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
  •