Jump to content

Bytecroc

Members
  • Content Count

    48
  • Joined

  • Last visited

Community Reputation

7 Neutral

About Bytecroc

  • Rank
    Advanced Member
  • Birthday 07/07/1962

Profile Information

  • Gender
    Not Telling
  • Location
    Germany Baden-Württemberg
  • Interests
    Much

Recent Profile Visitors

2,653 profile views
  1. Bytecroc

    Key down

    For C++ this is possibly a suggestion for the problem with some missing key functions http://www.leadwerks.com/werkspace/topic/14370-is-there-a-scan-code-function/
  2. Textures are paintet with a program like Paint or Gimp and much more or Texture Generators for Walls Floors. With Blender you give them a UV map
  3. 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.
  4. 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.
  5. 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 OK, I am dead. Night should be dark but not only black.
  6. This gives you an overview how slow lua is against C/C++ http://benchmarksgame.alioth.debian.org/u64/which-programs-are-fastest.html
  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; }
  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 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. For Keyboard Input I can not found a way to get german umlaut like "ä,ö,ü,Ä,Ö,Ü,ß" also the Left- and right- Alt Key I am missing in the Keylist. I miss in the API- Reference a function to get the scancode from a keypress.
  14. For C++ programmes it would be good to have some other import and export files. Why not use the assimp imort library, the some import and export files could be used. http://assimp.org/
×
×
  • Create New...