Jump to content

Search the Community

Showing results for tags 'c++'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Blogs

  • Development Blog
  • Canardian's Blog
  • Beyond Civilization Blog Ext
  • Tyler's Blog
  • macklebee's Blog
  • B-Byrnes' Blog
  • Marleys Ghost's Blog
  • omid3098's Blog
  • Richardsimpo123456's Blog
  • DJDD's Blog
  • Rick's Blog
  • --
  • xtreampb's Blog
  • Economically Disadvantaged
  • klepto2's Blog
  • Old Blog
  • Chris Paulson's Blog
  • Davaris' Blog
  • nil
  • Rekindled Phoenix's Blog
  • Flexman's Blog
  • Kattemaksu Online
  • Marcousik's Creations Blog
  • EVE LBS Studio
  • Rendering puzzles
  • Screen Size Utility
  • Niosop's Blog
  • 1299 RTS Game Project
  • Blitzbat's Blog
  • gordonramp's Blog
  • Andy Gilbert's Blog
  • Marcus' Blog
  • JornAggror Blog
  • diedir's Blog
  • wayneg's Blog
  • Masterxilo's Blog
  • Dave Lee's Blog
  • peubuy's blog
  • OD Arts -Leadwerks Blog
  • The progression......
  • Ultra Software Company Blog
  • The Progression
  • Pancake's Blog
  • Test Blog
  • BLaBZ Blog
  • Pure³d's Blog
  • dreamhead Blog
  • RVL's Blog
  • DB's Blog
  • Toxin Games Development Blog
  • CombatHelo Blog (RSS Import)
  • Foolish's Blog
  • ZioRed's Corner
  • Toxin Games Twitter
  • Shard - Third Initiative
  • Shard's Blog
  • Soamp's Blog
  • Soamp's Blog
  • Laurens' Blog
  • JT`s warehouse district
  • Kennar's Blog
  • KiteFuchs' Blog
  • KiteFuchs' Blog
  • Rachel's Dev-Blog
  • Eagle's Blog
  • zaphos' Blog
  • please delete this blog
  • Afke's Blog
  • Richard Simpson
  • knowledgegranted's Blog
  • EdzUp(GD)'s Blog
  • aGameLife's Kelasel MMORPG Blog
  • tournamentdan's Blog
  • Beyond Civilization Blog
  • smashthewindow
  • AnniXa's Blog
  • AnniXa's Blog
  • Elemental Development
  • DigitalHax Blog
  • Aria's Blog
  • Strogg76's Blog
  • Clackdor's Blog
  • Leadwerks Project Status
  • simpleprogrammer's Blog
  • Pathfinding in LE.2.x
  • Naughty Alien's Blog
  • smashthewindow's Blog
  • Ali Salehi's Blog
  • Jardar's Blog
  • Chris Vossen's Development Blog
  • Scarlet Thread Studios' Blog
  • Kronos' Blog
  • Benton's Blog
  • ChrisV's Blog
  • tjheldna's Blog
  • shadmar's Blog
  • 3D Masons, LLC
  • Andy Gilbert's Enviro Models
  • ParaToxic's Blog
  • NarkLord's Blog
  • ChrisMAN's Blog
  • ChrisMAN's Blog
  • CGMan's Blog
  • The Game
  • Chris Tutorials
  • Leadwerks 3 Experience
  • An Alien Saga
  • klepto2 & Leadwerks 3
  • Inside the mind of eternal insomniac
  • josk's Blog
  • Shader Development in Leadwerks 3.1
  • 3D Coat : Column game making of
  • Einlander's Blog
  • Ginger George's Blog
  • I have a problem
  • Michael_J's Blog
  • nasamydifol's Blog
  • Digman's Blog
  • noesisGUI
  • SavageDogg38's Blog
  • Built from Ruins
  • Remaining Days
  • test_external_blog
  • The Hunt For Food Blog
  • Crazy Minnow Studio
  • CrazyMinnowStudio
  • Guppy's Blog
  • Playing Online
  • Evayr's Blog
  • DerRidda's Blog
  • Karl's Blog
  • whiterabbit's Blog
  • Tinyboss Games
  • abendkleider's Blog
  • sacguccireplica's Blog
  • Arena
  • Imchasinyou's Blog
  • xtom's Blog
  • Lua is better than you think.
  • mdgunn's Blog
  • Crime Closer
  • lxFirebal69xl's Blog
  • Wedmer's Blog
  • Lockdown, going forward.
  • Pump-Action Captain
  • Igor's Blog
  • Dead Anyway
  • Runenrise and more
  • reepblue's Blog
  • Slippy's Corner
  • LUA Musings
  • severjack's Blog
  • mikeporter's Blog
  • miko93's Blog
  • Megalocerous' Blog
  • lxFirebal69xl's Blog
  • aiaf's Blog
  • Lostghbear's Blog
  • echo $BLOG_NAME > blog_title.tmpl
  • johnadam111's Blog
  • Dwarf Beard
  • burgelkat's Blog
  • Charrua's Blog
  • peterpaul's Blog
  • joshmathews' Blog
  • Martin Kearl's Blog
  • Brutile's blog
  • tipforeveryone's Blog
  • Glushchenko Blog
  • Express Lab Games Blog
  • Blueapples' Blog
  • DooMAGE's Blog
  • Structura devblog
  • UltraEngine - Experiences, add-ons and other Stuff
  • martyj's Blog
  • Dragonfreak's Blog
  • Brutile's Blog
  • assigmenthelp
  • Case Study Assignment Help
  • How to deal with bad grade ?
  • How to deal with bad grade ?
  • GameDev Blog
  • devcjohnson's Blog
  • devcjohnson's Blog
  • THE WHAT? Blog
  • The Demurian Scribe
  • GUI Editor
  • GUI Tutorial
  • noob_shaders
  • The Seventh World
  • Phodex Games Blog
  • Leadwerks VS Source 2
  • Work in Progress - Scifi PBR Media
  • [C++] First Player game start
  • The Blog of Yue
  • Snowboarding Development Blog
  • Ocean: Rendering in Leadwerks 4
  • Game Ready Maps
  • Ultra App Kit (Advanced Custom Widgets)
  • Poking around
  • SALVATIONLAND
  • Blender tutorials
  • Usefull Scripts & Components
  • Thirsty Panther
  • Direct Macro

Forums

  • Software
    • General Discussion
    • Programming
    • Game Artwork
    • Showcase
    • Suggestion Box
    • Bug Reports
  • Addons
    • Extensions & Plugins
    • Components
    • Addon Development
  • Platforms
    • Windows
    • Linux
    • macOS

Categories

  • Tutorials
  • Games
  • Work in Progress

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location

  1. I just got the leadwerks game engine and was wondering if i needed to buy the Professional DLC to use C++, if not, how do I get started to enable C++ support? I code a lot in C++ and openGL in Visual Studios and would love to start using a game engine. Thanks for the help.
  2. I have been working on a menubar widget and it came out pretty nicely. I thought i would release it either for people to have an example of what would be possible with the widget's flexibility or just for people to use it. For now it only works in C++ since it makes use of CallFunction(). MenubarElement.lua !! Make sure when you create the widget you create it last so it will render on top !! It allows horizontal rules and submenus. How to use: (C++) Create the widget and fill the menu float scale = gui->GetScale(); mnuBarItem = Widget::Create("Name", 2 * scale, 2 * scale, 60 * scale, 26 * scale, gui->GetBase(), "Scripts/GUI/MenubarElement.lua"); mnuBarItem->SetObject("backgroundcolor", new Vec4(0.7, 0.7, 0.7, 1.0)); mnuBarItem->AddItem("Temp0"); mnuBarItem->AddItem("Temp1"); mnuBarItem->AddItem("@-");//create a horizontal rule(menu seperator) mnuBarItem->AddItem("&Submenu");//this will hold the submenu created next //create a submenu from the last added item in the list mnuBarItem->CallFunction("C_CreateSubMenuFromLastItem"); mnuBarItem->CallFunction("C_AddItemToLastSubMenu", "Sub0_A"); mnuBarItem->CallFunction("C_AddItemToLastSubMenu", "Sub0_B"); mnuBarItem->CallFunction("C_AddItemToLastSubMenu", "Sub0_C"); // mnuAccount->AddItem("Temp2"); Catching widget events ProcessEvent(Event event) { if (event.id == Event::WidgetAction) { if (event.source == mnuBarItem) { if (event.data == 0) { // } else if (event.data == 1) { // } //(event.data == 2) horizontal rule // else if (event.data == 3)//submenu { int item = event.position.x;//submenu itemidx if (item == 0) { // } else if (item == 1) { // } else if (item == 2) { // } } else if (event.data == 4) { // } } } } Also it needs a call to update somewhere in your loop. Which is just used to update some delay timing. mnuBarItem->CallFunction("C_Update");
  3. Very simply, where is the log file that shows what the console shows? I have a lot of console messages so I don't see the first part after the console cuts it off (even after scrolling up). After compiling, I have a project.log that I think Visual Studio generates and an update.log which is not it either. No other log files in my project folder or Steam Leadwerks folder. The one under AppData\Local\Leadwerks isn't it either.
  4. Hello everyone, I just playing around leadwerks c++ to learn engine. I've created a simple map with editor and save it under Maps folder. Once I try to load that map through cpp code and give path parameter as "Maps/sm.map", leadwerks can not find the map. Because engine is trying to load file at "../LeadwerksEngine/Projects/Maps/sm.map" It get fixed by adding project name to path as follows (Cube is project name) ../LeadwerksEngine/Projects/Cube/Maps/sm.map" However even so engine loads the map, engine can not load textures and etc within the map. Engine gives errors to read files with path on ../LeadwerksEngine/Projects/Textures/sometexture.tex" What did i make wrong? Could Anybody faced this problem help me?
  5. Hi all, I have problem compile a blank Leadwerks C++ project on ubuntu 16.04(64Bit) with CodeBlocs(ver.16.01). Before i used CB on Ubuntu 15.10 without problems. Strange is that after fresh install on ubuntu 16.04 I have to install also all dependecy libraries manualy (libgl1-mesa-dev...etc) even it is installed from Steam. After installation of libraries that linker wanted i got: g++ -o ../../SpaceWars.debug ../../Source/App.o ../../Source/main.o /media/mbarhon/53229DC13D856ACD/mbarhon/Steam/steamapps/common/Leadwerks/Library/Linux/Debug/Leadwerks.a -ldl -lopenal -lGL -lGLU /media/mbarhon/53229DC13D856ACD/mbarhon/Steam/steamapps/common/Leadwerks/Library/Linux/libluajit.a ../../libsteam_api.so -lX11 -lpthread undefined reference to `Leadwerks::FileSystem::StripAll(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' and this repeats for every line contain any function or varible from namespace Leadwerks. I tried to change a linker settings (directory of leadwerks lib ), but without success. Maybe I forgot to install some lib? I'm little stuck at this moment. Have someone any idea where can be the problem?
  6. Hi there, since Code::Blocks IDE is quiet unstable, buggy and occasionally freezes, especially on Linux (Ubuntu 16.10+) I have to look for another multi-platform IDE for C++. Now I mess with CodeLite IDE and it looks promising. It's possible officially support this IDE? - create a basic workspace and project, or is there someone who have some experience with this IDE in combination with Leadwerks? :-) Thanks :-)
  7. Hi, I was lately thinking about converting all my code from Lua to C++. Without knowing the size of my project, do you estaminate this is something taking very long, like more then 2 months, or is this something you could do within a week (I maybe have about 60-80 scripts) if you are working hard on it? Furthermore do you see any advantages in doing this (or better said is it worth the time) and I am not talking about speed, I much more mean the libraries that C++ offers and the more precice debugging. Thanks for your ideas and Merry Christmas.
  8. Hi guys, I'm trying to get the hang of drawing a GUI but falling rather short on actually getting anything to draw correctly. Right now I can create a button, but it only renders for a single frame when i hover the mouse over it and un-hover. So this leads me to believe that I need to perhaps render it every frame? Here's a test example: #include <Leadwerks.h> using namespace Leadwerks; int main( int argc,const char *argv[] ) { Window *window = Window::Create( "Some game", 100, 100, 400, 400, Window::Titlebar ); Context *context = Context::Create( window ); GUI *gui = GUI::Create( window ); Widget *button = Widget::Create( "Some Button", 100, 100, 100, 100, gui->GetBase(), "Scripts/GUI/Button.lua" ); button->Enable(); button->Show(); while( !window->Closed() ) { //button->Draw( 100, 100, 100, 100 ); context->Sync( true, 60.f ); } context->Release(); window->Release(); return 0; } Now, if I uncomment the Draw function I get an exception thrown on the following line. Thanks in advance for any help. EDIT: Just found this useful thread: https://www.leadwerks.com/community/topic/16487-understanding-new-gui-widgets/ Would calling Button::Redraw() every frame be the right way to go about this? And while I'm here, is there also a way to hook the event of button press in c++ or does it have to be done with lua?
  9. Probably a very simple question but if I have Light* light = DirectionalLight::Create(), how can I access shadowstagerange[4] via C++ code? I have some shadows acting weird and I think this could help, per Josh's suggestion here: https://www.leadwerks.com/community/topic/12573-directional-light-cast-shadow-distance-and-camera-zoom-important-issue/?do=findComment&comment=90577 If anyone's curious, this is what I'm looking at (shadow cutting off suddenly in a side-scroller). I already tried camera->SetMultisampleMode(32) and world->SetLightQuality(2) and setting various light ranges but nothing helped. Moving the camera left or right moves that edge left or right. If I move the camera closer, it doesn't change anything but if I move it back, the shadow gets shorter, so it's tied to the camera and/or light somehow.
  10. If I use the Boost library in my C++ code, will it break anything in Leadwerks? Cheers! -Caolan
  11. Hi guys, Trying to get your take on the correct usage of the Image class. I'm trying to change the image of a widget using SetImage(). It seems that the documentation is incomplete, missing the Image class (unless I've missed it :S). Through trying to use this class, I've noticed that Image::Load() has been commented out in Window.win32.h (perhaps it was not finished?). I instead tried something like: wstring str = L"Materials/GUI/button1.tex"; Image *image = new Image(); image->Initialize( str ); Which exited my program after attempting a run, not sure why. Log:
  12. Lately I've been getting heaps of seemingly random errors. I traced a few of these problems to memory leaks which is why I started using smart pointers. But still I get random "Access Violations". Sometimes it will be inside a Leadwerks function and other times it will be in mine. I can stop the program and run again without cleaning the solution and it will crash somewhere else or it wont crash at all. Seems to be random and the only thing I think it could be is memory leaks. I'm not sure what else could cause random errors like this. Has anyone had similar problems or know of possible other causes / solutions?
  13. I just want to verify the way the physics commands should work. I'm assuming that Newton Game Dynamics uses real world equations to calculate the final force and velocity of objects. So if that's the case, what are the units of measurements that should be passed to each of the physics commands? If I set an entities mass to 100.0f, and say this is 100 kg, what should input into into "AddForce()"? m/s² or Newtons? It would make sense to be newtons because that's the measurement of force. And also "SetFriction()". Is this the friction coefficient or the force in newtons that has to be over come? Physics are not behaving the way I think they should in my game and I just want to make sure I'm feeding the commands the right values.
  14. In lua I would do this : --index which vary on each recurisive run. local mid=-dim..":"..-df..":"..dim..":"..df..":"..xfactor..":"..yfactor..":"..division..":"..factor..":"..orientation.x..":"..orientation.y..":"..orientation.z --create model if the index "mid" doesn't exist in table models if models[mid]==nil then model = Model:Create() model:SetRotation(orientation) models[mid] = model end
  15. Hi guys, I expected the new multiplayer system to be rather easy to use, as I've done manual connection and message sending before, but I can't seem to receive the connect message on the server end. I run the server application first, and then then the client application many seconds later, both on the same PC, but pMessage is always null. I'm also receiving a value in pPeer on the client end, so it seems like there is a successful connection. Can anyone see where I have gone wrong here? Here's what I have at the moment. Server: int main() { Window *pWindow = Window::Create( "Server", 100, 100, 400, 200, Window::Titlebar ); Server *pServer = Server::Create(); Message *pMessage; while( true ) { if( pWindow->Closed() || pWindow->KeyHit( VK_ESCAPE ) ) break; pMessage = pServer->Update(); if( pMessage == nullptr ) continue; if( pMessage->id == Message::Connect ) { cout << "Player connected to the game." << endl; } pMessage->Release(); pMessage = nullptr; } pServer->Release(); pWindow->Release(); return 0; } Client: bool App::Start() { m_pWindow = Window::Create( "Client", 100, 100, 800, 600, Window::Titlebar ); Client *pClient = Client::Create(); Peer *pPeer = pClient->Connect( "127.0.0.1" ); return true; } Thanks in advance.
  16. i am creating a server for my game (mmo). sending/receiving packets all work fine on a single client. now i like to extend the server to accept multiple clients. i have created a class called connections which holds all the info for a single client. put a new connection in the list with peer info whenever a new succesfull connection is made with the server. i then compare message->peer against connections.peer to read the messages from each client. but now my question is what do you guys advice? should i make a send/receive list for each connection to process the messages at a certain interval (connection thread maiby) ? or is Leadwerks::Server smart enough to keep its own send/receive list ? and is this enough ?
  17. Hi guys, Just wondering if it's possible to control an FPS player who has been placed with the level editor, with C++. I'd like to change things such as the player speed, footstep sounds, camera position (3rd person), etc. All things that I expect to be simple in practise, if only I could access the player entity. Is this possible or am I better off re-writing my own player class? EDIT: Also, while I'm here, since I only know a little about lua scripting, I have a couple questions regarding it. What is the script compiled into? What is its speed comparison to C++? Thank you.
  18. i get a Debug Assertion Failure when closing my app in C++ debugging shows the error occurs at the destructor of my class on this line: delete logTextArea; //same result //logTextArea->Release(); logTextArea is a Widget::TextArea() the debugger tells me the Expression: list iterator not incrementable. does Widget::TextArea have a bug in his destructor ? or is this error on my part somehow? i do not use any type of list in my code myself at the moment.. ------------------------------------- Solved i figured out that when releasing/deleting a Widget::TextArea you need to clear the kids list first, even when its just a blank TextArea who is not a parent of any other widget. the code below gives no assertion failure logTextArea->kids.clear(); logTextArea->Release();
  19. Just a quick question, I've been exploring the technologies of other engines and I've seen some very unique lighting techniques for global illumination in real-time. Is there any technology implemented within the Leadwerks to allow this feature, or is there any way to implement Nvidia's tech (Voxel-based Global Illumination, as seen in the Unreal Engine) through the use of their GameWorks SDK which requires direct contact to the OpenGL implementation (I believe, don't quote me on this)?
  20. I have been looking at the EmitEventHook void hookFunction(void* ptr) { // do whatever } System::AddHook(System::EmitEventHook, hookFunction); I can't figure out the correct type for hookFunction's parameter(s). Event* seems the most logical but doesn't appear to be correct, other hooks tend to have pointers to relevant objects. Anyone know the correct parameters?
  21. 'm using the C++ SDK and lua for small objects code. I need to create the entities from C++ and later use the bool Entity::CallFunction(const std::string& functionName, Object* extra) How to 'bind' on script lua to an entity ? it looks that Interpreter is using tolua++, but I can't figure how to load the .lua properly to the object // Create 100 special entity std::vector<Entity*> list; for (int i = 0; i < 100; i ++) { Entity* entity = new MyEntity(); entity->AddToWorldTable(true ); list.push_back(entity); } // Load special script (But not working, object not callable). Interpreter::NewTable(); Interpreter::SetGlobal("Script"); // Must Script. Don't change that, because the script are prefixed with Script:myFunction if (Interpreter::ExecuteFile("MyEntity.lua")) { System::Print("Error: Failed to execute script \"" + it + "\"."); } for (auto&it : list) it->CallFunction("OnSpecialFunction") Script Lua function Script:OnSpecialFunction() print self end
  22. I want to calculate the normal's from a height-map image by checking the neighboring pixels but I'm unsure on the correct way of doing it. This is the code I'm using below so far; unsigned int map_index = 0; for (int y = 0; y < map_size; y++) { for (int x = 0; x < map_size; x++) { unsigned int current_index = (y * map_size) + x; if (x == 0) { center_l = map[current_index]; } else { map_index = (y * map_size) + (x - 1); center_l = map[map_index]; } if(x == (map_size - 1)){ center_r = map[current_index]; } else { map_index = (y * map_size) + (x + 1); center_r = map[map_index]; } if (y == 0) { center_u = map[current_index]; } else { map_index = ((y - 1) * map_size) + x; center_u = map[map_index]; } if (y == (map_size - 1)) { center_d =map[current_index]; } else { map_index = ((y + 1) * map_size) + x; center_d = map[map_index]; } normal_buffer.x = center_l - center_r; normal_buffer.y = 2.0; normal_buffer.z = center_u - center_d; normal_buffer = normal_buffer.Normalize(); n_x[id] = normal_buffer.x; n_y[id] = normal_buffer.y; n_z[id] = normal_buffer.z; id++; } } "map" is just a collecting of floats representing the height for each vertex. I think there's another way of calculating the normal's for each vertex using the cross product of two vectors? But I'm not sure how to do this. Any help is appreciated.
  23. I've put together a quick shader that will show the object in wire-frame and draw lines to show the direction of each vertex normal. But the normal's don't seem to be acting correctly. Is somehow able to show me what I'm doing wrong? I have a feeling it something to do with the cameraprojection matrix, but unsure how to fix it. I used the info from this site; http://www.geeks3d.com/20130905/exploring-glsl-normal-visualizer-with-geometry-shaders-shader-library/ diffuse_shownormals.zip
  24. I've taken a look at the terrain.shader that comes with Leadwerks to see if I can modify it to my needs, but I'm not sure where to start. What I want is to texture a grid mesh of a terrain with multiple textures based and height and slope, and maybe even an alpha map. If someone is able to point me in the right direction or even a small snippet of code that shows how the height and slope can change where a texture is shown I'd appreciate it. Thanks.
  25. How can I manually change the min and max values of a models AABB? I've used the following code which seems to set the model->aabb okay but debugging the entity boxes doesn't show it and the model still disappears at the wrong times. model->aabb.min.x = -256.0; model->aabb.min.y = -256.0; model->aabb.min.z = -256.0; model->aabb.max.x = 256.0; model->aabb.max.y = 256.0; model->aabb.max.z = 256.0; model->aabb.Update();
×
×
  • Create New...