Jump to content

Bytecroc

Members
  • Posts

    56
  • Joined

  • Last visited

Posts posted by Bytecroc

  1. I must make first a few tests, identify models from map and vegetation from map if this is possible.

    I need also different spawn points for the camera, it would be the best I implement a developer class for programming and grab them out for release versions.

    In this map I used I have not set a camera and no player, only the map itself.

    I posted that only for C++ users which have that same problem and did not find anything in the search function.

    But anyway thank you for help and suggestions.

  2. I worked the half day on that problem and I think I  give the information to everyone who also has this problem with fog.

    In the Editor fog looks a little bit like fog.

    Without implementig fog in C++ source, no fog is visible in C++.

    Loading a map after craeting a camera only a touch of a color is visible in the very far, and fog is not working as it should.

    I mean with map not a terrain, I loaded a map with only a plattform and some prefabs.

    I have not tested with terrain.

    So load a map before creating a camera. Nothing works correct if you not do that.

     

  3. First I load a prefab I saved "2 sliding doors, with slidingdoor.lua script", the first prefab works as it should.

    I loaded the prefab and it did not work.

    I duplicate the existing prefab in the editor and did not work.

    I checked all entries, all perfect.

    I looked in flowgraph editor all perfect ... but wait, it looks only perfect.

    The duplicated prefab lays directly over the first and when I click the first prefab the Tab from the first are on top

    when I clicked on the second prefab and look in the flowgraph the second Tabs are on top and it looks they where connected.

    I move the tabs around and they are not connected, they are both in the flowgraph but the second was not connected.

    After I connect them it works.

  4. what did you understand to animate something ?

    I often read something in the web of animations, and see the whole scene was meant.

    Something like let us roll a ball over a parkour or something.

     

    Or in OpenGL Tutorial something like, now let us program some animations

    and the result is moving some static objects around.

     

    in this case programming is needed.

     

    But only animating a model in it's movement or gesture is done by an rigging and skeletton or keyframe animation software

    like Blender, Fragmotion, 3D Studio Max, Milkshape Anim8tor and much more.

     

    If your friend must animate some character with an animation software only, then no programming is needed, but must he also move the characters inside a scene for a movie, then yes, but ask him if C/C++ is needed or if a script language or something else is used.

  5. OK, I was not informed about the speed of LUAJit or better I have not recognized that there is a difference to LUA.

    LUA was for me a interpreted script and so automatically slow.

     

    This let me think about some tests I will made in the near future.

    And possibly a BASIC to LUA converter.

  6. Nice game!

     

    Now what could be better.

    Pressing ESC should not immediately quit the game. I am too often press it to go out of the inventory or crafting window and the game quits.

    Starting with rain ? Rain should have a better quality.

     

    OK, now starting again and hope I did not press ESC wink.png

     

    OK, I am dead.

    Night should be dark but not only black.

  7. If you are not sure if C++ is the right language

    then the only thing is what you can do to find out if it's the right language

    --> do it.

    go to this side, it's the best side to learn the STL

    http://www.cplusplus.com/reference/

     

    possibly you want to learn how a file would be opened and read some binary code from it

    go to fstream then fstream or ifstream and click read

    look here

    http://www.cplusplus.com/reference/istream/istream/read/

     

    you see examples for nearly each function in the STL library which is the base for C/C++ programming.

     

    start programming with console programs.

     

    To get a feeling for 3D programming you can try for the first the now free Blitz3D, it's outdated, but gives you a good feeling

    for 3D programming.

    And to switch to Leadwerks then is very easy.

     

    And don't let you suggest that you can not program an animation program, you can if you want.

    My first program (beside the small things I have done to learn 3D programming) was AnimB3D, not very successful but I have also stopped the development because Pacemaker and CharacterFX becomes free.

    And I would not say I am a professional programmer but I do what I want to do and not what other say what I can do or should do.

    But it's your choice if you do it or not.

    You can if you want, that's the truth.

     

    My first C++ program was a compiler or let's say converter that let me program C++ in BASIC Style, I did not like the == and the semicolon ; at he end of the line, I did not like curly braces { } to mark blocks, but to learn C++ was the only way to get the freedom

    to program what I want, today there is possibly the choice of C# but I stay with C++.

    So I go my way with BASIC to C++ but it's still C++ at the end.

    And you will find your way, if you say ony C not C++ is my way then you should go that way.

  8. I am also have buyed over a year ago the book from Anton Gerdelan Amazon Kindle.

    It's much better to understand than Object Oriented C++ OpenGL Tutorials.

     

     

     

    But I got surprisingly a job offered in Nov 2014 so I buyed also Leadwerks Pro, I do not use LUA, the C++ OO structure in Leadwerks is not that much complicate. There are some small examples in the API reference, compile them and look how they work.

    It's a good training.

     

    And LUA is not easier in my opinion.

  9. It's because english is not my natural language and I can not explain like I would do in my natural language what the problem 100% is.

    Sometimes there are hidden functions or functions I have not detected inside Leadwerks, and before I use WinAPI things I thought I ask in forum.

    For single key query there is GetKeyState() or GetAsyncKeyState() a better choice.

  10. Sorry that I reply that late, but I have had the problem in the past and Sync(false) solved not my problem.

     

    But NVidia Driver has swiched on in all programs VSync on.

    I put that off in NVidia Settings global.

    Possibly interessting for other users.

  11. Extended to translate also in ScanCode

     

    #include "App.h"
    using namespace Leadwerks;
    App::App() : window(NULL), context(NULL), world(NULL), camera(NULL) {}
    App::~App() { delete world; delete window; }
    unsigned long VKtoSC(unsigned long virtual_key)
    {
    return (static_cast<unsigned long>(::MapVirtualKeyEx(virtual_key, 4, ::GetKeyboardLayout(::GetCurrentThreadId()))));
    }
    bool App::Start()
    {
    window = Window::Create();
    context = Context::Create(window);
    Font* font = Font::Load("Fonts/Comic.ttf", 36, Font::Smooth);
    context->SetFont(font);
    font->Release();
    return true;
    }
    bool App::Loop()
    {
    if (window->Closed() || window->KeyDown(Key::Escape)) return false;
    context->SetColor(0, 0, 0);
    context->Clear();
    context->SetColor(1, 1, 1);
    //Display some centered text
    std::string text;
    std::string text2;
    int sc;
    BYTE keys[256];
    //GetKeyState(0);
    GetKeyboardState(keys);
    for (int i=0; i < 255; i++)
    {
     if (keys[i] & 0x80)
     {
      text = "VirtualKeyCode: " + String(i);
      sc = VKtoSC(i);
      text2 = "ScanCode: " + String(sc);
      //keys[i] = 0;
      //break;
     }
    }
    Font* font = context->GetFont();
    int screenwidth = context->GetWidth();
    int screenheight = context->GetHeight();
    int x = (screenwidth - font->GetTextWidth(text)) / 2;
    int y = (screenheight - font->GetHeight()) / 2;
    context->SetBlendMode(Blend::Alpha);
    context->DrawText(text, x, y);
    context->DrawText(text2, x, y+50);
    context->SetBlendMode(Blend::Solid);
    context->Sync();
    return true;
    }
    

    • Upvote 1
  12. Thank you Undac and Athos for your answers and suggestions,

     

    my WinAPI knowledge to replacing the windows wndproc with an own procedure is a bit to low

    but the WinAPI did have some nice functions I tested.

     

    This one works for the first.

    It registers all Keys and also the mousebuttons smile.png

     

    I think this are also not scancodes but I can make a list for each user to register his own keys.

    Or receiving letters for input messages, like in a chat.

     

    possibly replace the "comic.ttf" with "arial.ttf"

    #include "App.h"
    using namespace Leadwerks;
    App::App() : window(NULL), context(NULL), world(NULL), camera(NULL) {}
    App::~App() { delete world; delete window; }
    bool App::Start()
    {
    window = Window::Create();
    context = Context::Create(window);
    Font* font = Font::Load("Fonts/Comic.ttf", 36, Font::Smooth);
    context->SetFont(font);
    font->Release();
    return true;
    }
    bool App::Loop()
    {
    if (window->Closed() || window->KeyDown(Key::Escape)) return false;
    context->SetColor(0, 0, 0);
    context->Clear();
    context->SetColor(1, 1, 1);
    //Display some centered text
    std::string text;
    BYTE keys[256];
    //GetKeyState(0);
    GetKeyboardState(keys);
    for (int i=0; i < 255; i++)
    {
    if (keys[i] & 0x80)
    {
    text += String(i);
    keys[i] = 0;
    //break; //yes or no? The numbers for the right ALT Key and others are lower with break.
    }
    }
    Font* font = context->GetFont();
    int screenwidth = context->GetWidth();
    int screenheight = context->GetHeight();
    int x = (screenwidth - font->GetTextWidth(text)) / 2;
    int y = (screenheight - font->GetHeight()) / 2;
    context->SetBlendMode(Blend::Alpha);
    context->DrawText(text, x, y);
    context->SetBlendMode(Blend::Solid);
    context->Sync();
    return true;
    }
    

  13. I have had such problems with other programs and self compiled console programs in the past.

    I thought Win10 was the problem, but it was the Avast Free Antivirus.

    I think mostly problematic is there the deep screen modus.

    I swiched off the antivirus protection when I compile or will run something I have compiled.

×
×
  • Create New...