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
  • Ultimate Action Game Controller

Forums

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

Categories

  • Streams and Events
  • 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. Hi, is it possible to use the depthbuffer for postprocessing effects? I looked at all the existing postprocessing shaders and saw, all of them only use the color-texture, which is retrieved by uniform sampler2D texture1; I also found, that texture2 contains some kind of a cobblestone texture but all the other slots seem to be empty. Also I saw, it is possible to push a Vec4 Uniform to the shader by (C++): myShader->SetVec4("foo", Vec4(0,0, 1, 1)); (GLSL): uniform vec4 foo; but I didn't find any way of pushing an arbitrary texture as a uniform.
  2. My friends are telling me that I am playing "Spacewar" all the time, and it is quite annoying for them. It did take some time before I realised that it was my Leadwerks C++ project I was developing on that was the cause of it. I wish there was a way to disable Steam notifications, because I am constanly iterating compile-run-compile. I would suggest something like #define __STEAM_DISABLE__ at the top of App.h Also would like to know how I could disable the console as end-users could get distracted. At least when publishing a game.
  3. I found a free model I can play with of nice quality. I have the following situation: Like you can see the models initial rotation is wrong, it should be facing the direction of brush. This code can fix the rotation for me: ship->SetRotation(90,90,0, true); But then I have issue with ship movement: if(window->KeyDown(Key::A)) { ship->Move(-move_speed,0,0); } if(window->KeyDown(Key:)) { ship->Move(move_speed,0,0); } if(window->KeyDown(Key::S)) { ship->Move(0,0,-move_speed); } if(window->KeyDown(Key::W)) { ship->Move(0,0,move_speed); } Movement would be in the wrong then directions. I could also adjust this but obviously it's not the right way. I am aware you can rotate it in some 3D software like blender, but I'm trying to avoid it right now. and generally what would be best practice for such cases?
  4. Although my project compiles after I added 'pthread' and 'X11' to linker in build options, the Code::Blocks IDE is unable to find the declarations of the 'Leadwerks' namespace. For example: window = Leadwerks::Window::Create("MyGame", 200, 150, 1024, 768, Leadwerks::Window::Titlebar); When pressing LMB on 'Create' and choosing "Go to deceleration ..." the action results an error. My version of Code::Blocks is 13.12, the default install on Ubuntu 14.04. I did not find any 'special' way to add the files to IDE, their path is clearly in the include. Should I add what's inside /home/myuser/Leadwerks/Include/ to the project files or anything like that?
  5. I'm very new to developing on the Leadwerks engine so I was wondering what the best approach would be for designing 2d levels. Preferably, I would like to be able to design the 2d levels in the leadwerks editor, but would also need control of the level objects from C++ since there are some dynamic aspects. Looking at the API alone, its not quite clear to me what the best direction is for developing 2d games. Does anyone have any thoughts on the best approach for developing 2d games?
  6. Hello! I think that you should add another thread specifically for tutorials. We can see that the community is growing in numbers daily, and we could use something like this. I feel like it would keep the General Discussion thread neater, and would make it easier for someone new to locate help (besides the default text documentation).
  7. Object* extra is not described. What is it? Also Parameters talks about 'hookname' which isn't among the parameters. Please make correction in Documentation
  8. I've been trying to wrap my head around how Steam Lobby works by looking at the docs, forums and the Spacewar example that comes with Steam but it's beyond my skills. Was hoping someone could help. To start, the Steam Matchmaking & Lobbies page says the following: I then looked at the Steam Spacewar example and this is how it uses it: // ask steam to create a lobby SteamAPICall_t hSteamAPICall = SteamMatchmaking()->CreateLobby( k_ELobbyTypePublic /* public lobby, anyone can find it */, 4 ); // set the function to call when this completes m_SteamCallResultLobbyCreated.Set( hSteamAPICall, this, &CSpaceWarClient::OnLobbyCreated ); I kind of understand that the function OnLobbyCreated gets called when the CreateLobby function eventually succeeds. But I had to look into what m_SteamCallResultLobbyCreated was. That resulted in these two lines in SpaceWarClient.h // callback for when we're creating a new lobby void OnLobbyCreated( LobbyCreated_t *pCallback, bool bIOFailure ); CCallResult<CSpaceWarClient, LobbyCreated_t> m_SteamCallResultLobbyCreated; That CCallResult and whatever's going on after it completely lost me. Pretty sure that's a template but that's over my head. And what it has to do with CSpaceWarClient, which itself is a giant class, is past me. But for kicks, here's CCallResult in the steam_api.h header. //----------------------------------------------------------------------------- // Purpose: maps a steam async call result to a class member function // template params: T = local class, P = parameter struct //----------------------------------------------------------------------------- template< class T, class P > class CCallResult : private CCallbackBase { public: typedef void (T::*func_t)( P*, bool ); CCallResult() { m_hAPICall = k_uAPICallInvalid; m_pObj = NULL; m_Func = NULL; m_iCallback = P::k_iCallback; } void Set( SteamAPICall_t hAPICall, T *p, func_t func ) { if ( m_hAPICall ) SteamAPI_UnregisterCallResult( this, m_hAPICall ); m_hAPICall = hAPICall; m_pObj = p; m_Func = func; if ( hAPICall ) SteamAPI_RegisterCallResult( this, hAPICall ); } bool IsActive() const { return ( m_hAPICall != k_uAPICallInvalid ); } void Cancel() { if ( m_hAPICall != k_uAPICallInvalid ) { SteamAPI_UnregisterCallResult( this, m_hAPICall ); m_hAPICall = k_uAPICallInvalid; } } ~CCallResult() { Cancel(); } void SetGameserverFlag() { m_nCallbackFlags |= k_ECallbackFlagsGameServer; } private: virtual void Run( void *pvParam ) { m_hAPICall = k_uAPICallInvalid; // caller unregisters for us (m_pObj->*m_Func)( (P *)pvParam, false ); } void Run( void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall ) { if ( hSteamAPICall == m_hAPICall ) { m_hAPICall = k_uAPICallInvalid; // caller unregisters for us (m_pObj->*m_Func)( (P *)pvParam, bIOFailure ); } } int GetCallbackSizeBytes() { return sizeof( P ); } SteamAPICall_t m_hAPICall; T *m_pObj; func_t m_Func; }; Not sure if that's enough info. I'm still searching the Steam forums for help too. Thanks for looking.
  9. Hey, I think the camera pick is no longer working properly, other people also have this issue. This is the code i tried it with: if (wd->KeyHit(Key::E)){ Vec2 mousepos = wd->GetMousePosition(); if (cam->Pick(mousepos.x, mousepos.y, pickinfo, 0)){ if (pickinfo.entity->GetKeyValue("tag") == "dbutton"){ //pickinfo.entity->SetKeyValue("tag", ""); System::Print("Entity picked, distance: " + String(pickinfo.distance)); pickinfo.entity->Hide(); } } } My problems are: The pick is only working if I'm so close to the object, that I'm touching it. And the pickdistance is everytime -1 Hope you can fix that. Btw: I tried picking csg boxes and models (Yes, I attached a empty lua script to these boxes). If you need more info here is the full thread in which some people and me discussed this.
  10. Hey , Is there any possibility to play a animation sequence without much effort, or do I have to create my own animation manager? And how should my animation manager look like? I thought about simply editing the current animation frame (like: I set the animation frame first to 1 and every 300ms or so I will switch to the next.)( and should I do this in a extra thread maybe?) - Mex
  11. Hey, Is it possible to move a camera in a direction defined in a Vec3 (a rotation)? Because camera->Pick doesn't work for me i would like to try now world->Pick Tried it like this: if (wd->KeyHit(Key::E)){ Vec3 oldCamPos = cam->GetPosition(); cam->SetInput(cam->GetRotation().y, 5); if (wrd->Pick(oldCamPos, cam->GetPosition(), pickinfo)){ if (pickinfo.entity->GetKeyValue("tag") == "dbutton"){ //pickinfo.entity->SetKeyValue("tag", ""); System::Print("Entity picked, distance: " + String(pickinfo.distance)); //pickinfo.entity->SetPosition(pickinfo.entity->GetPosition().x, pickinfo.entity->GetPosition().y - 2, pickinfo.entity->GetPosition().z); } } cam->SetPosition(oldCamPos); } I think now of the problems with my code is that SetInput uses physics, so my camera object won't go through objects, right? Anyway i have no good idea at the moment, hope anybody can help Lua code is also accepted Btw this is exactly what i want:
  12. The problem with tmpnam is solved, but now " undefined reference to symbol 'XGetWindowAttributes' ". Build log:
  13. Hey, I'm trying to create a simple class where i wan't to store much variables (int string float vectors entitys, anything.). But i noticed when i try getting some variables i need to first create a new instance of the class (no idea if i can say it like this, but here's an example for a getter function) i do this: Vec3 getRunnerSpawn(){ return RunnerSpawn; } (the above class is called "GameManager") and to get the vector i need to do this: GameManager gm; gm.getRunnerSpawn(); but i don't won't to create a new instance, because then i would need to create a new instance for every class where i need to use this function. Anyone an idea?..
  14. Trying to compile any C++ project generated by the Project Manager always gives an error saying " the use of `tmpnam' is dangerous, better use `mkstemp' ". I'm using Ubuntu 14.04 as operating system, Code::Blocks 13.12 as IDE and g++ 4.8.2 as compiler.
  15. When trying to use the guide below in order to use the CrtDbg Library for detecting memory leaks, I found, that it showed me leaks beyond count. I then tried it on a fresh c++ project (created from the wizard within the Leadwerks-Editor), and noticed, that the leaks were there even on this new project. The guide I followed: http://msdn.microsoft.com/en-us/library/e5ewb1h3(VS.80).aspx I noticed the includes and define were already in Leadwerks.h so the only thing one needs to do, is call the following line: _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); Also, the Output sadly didn't show, in which files and line-numbers the memory got allocated (Although I defined "_CRTDBG_MAP_ALLOC" and tried various different things). I therefore also tried Visual Leak Detector (http://vld.codeplex.com/). From what I saw, a lot of the memory seems to be allocated during various LW-functions, like the context-syncing, loading of the map or rendering, etc. Did I do something wrong? Do these tools maybe measure the memory too early? What really bothers me is that I can't really check my own code for memory leaks this way, as I simply wouldn't find them amongst the ~2000 (the exact count varies) number of leaks that are already there. Does anyone have a suggestion, what to do here? P.S.: Visual Leak Detector worked fine with LW2.5
  16. Hey, I noticed (in 3.0 and 3.1) that Time::GetSpeed() doesn't return really useful values. When i opened some programs in the back (my computer is slower) I can run much faster and when my computer is very fast i run very slow. Here's the code i used: playerMovement.z = (window->KeyDown(Key::W) - window->KeyDown(Key::S)) * Time::GetSpeed() * moveSpeed; playerMovement.x = (window->KeyDown(Key::A) - window->KeyDown(Key:)) * Time::GetSpeed() * strafeSpeed; PS: if you activate vsync (context->Sync(true)) you can also run faster and when you disable it (more fps) you will run slower. Does somebody else has these problem's and do josh know about this? Or should i create a new bug report?
  17. Hey, I already created some triggers with leadwerks 3.0 but now in 3.1 i have one problem. It says: invalid type conversion at this line: currEnt->AddHook(Entity::CollisionHook, (void*)onCollision); heres my App.h: #pragma once #include "Leadwerks.h" using namespace Leadwerks; class App { public: Leadwerks::Window* window; Context* context; World* world; Camera* camera; App(); virtual ~App(); void onCollision(Entity* entity0, Entity* entity1, float* position, float* normal, float speed); virtual bool Start(); virtual bool Loop(); }; and the important part of my App.cpp [...] //The onCollision function void onCollision(Entity* entity0, Entity* entity1, float* position, float* normal, float speed){ } [...] //and in App::Start [...] list<Entity*>::iterator iter; for (iter = world->entities.begin(); iter != world->entities.end(); ++iter){ Entity* currEnt = (*iter); cout << "Entity loaded: " + currEnt->GetKeyValue("name") << endl; if (currEnt->GetKeyValue("name") == "runner_spawn"){ runner_spawn = currEnt->GetPosition(); } if (currEnt->GetKeyValue("name") == "death_spawn"){ death_spawn = currEnt->GetPosition(); } if (currEnt->GetKeyValue("name") == "runner_mesh"){ runner_mesh = currEnt; } if (currEnt->GetKeyValue("name") == "death_mesh"){ death_mesh = currEnt; } if (currEnt->GetKeyValue("name") == "void"){ currEnt->AddHook(Entity::CollisionHook, (void*)onCollision); } } [...] if you need more code i will give it out, but i think that should be enough Thanks, Mex
  18. Hey. I havent bought leadwerks but i had one question. Can i use code::blocks for compiling the games or does it only work with visual studio 2013? I have visual studio for free because of my school but code::Blocks is faster to install.
  19. Hello, here faced such problemoy.Napisal few lines of code and skills zapuslil issued a mistake here.
  20. I have been working with the Terrain component in Leadwerks 3.0 outside of the Leadwerks Editor and I was wondering if anyone else has done any programming with the Terrain component in this manner. If so, I was wondering what might be the best way to go about manipulating the Terrain component. Possibly what the different methods in the terrain component do as well as the other components in the Terrain.h file. I am looking to render a 2-d array of Perlin Noise to a Texture object and then using this texture as a heightmap for the terrain. I have already incorporated libNoise into Leadwerks, I just have to write an interface for it to work with the Leadwerks Terrain component.
  21. Hey I would like to know if VS2013 is needed for leadwerks or if VC++2010 can be used too?
  22. It would be awesome when the engine allow us to prepare and change the map when we want to do it, to create some kind of background loading. (when using threads) For now a map will be loaded and changed with Map:Load() thats not optimal in my opinion because the map will be prepared and loaded with one function. But I would like to have a api function that allow me to trigger a prepareLoad() function that stores the mapfile in the RAM and a api function like Map:PushChangeMap() that allow me to do the mapload once the map was prepared. That would be great so we can use a CollisionTrigger (Like the last room in the Level) to do a Map:PrepareLoad(). And the Player dont know that the map is loaded in the Background. With an other CollisionTrigger (Like the last door in the room that give access to next level) I wanna push the Mapload (obviously the map was prepared before) with Map:PushChangeMap(). I think this would increase the mapload a lot and give the player an other game experience than always see a loading screen.
  23. Hello, the value returned by Window::GetMousePosition() is only changing when scrolling downwards: Leadwerks::Vec3 mspos = Leadwerks::Window::GetCurrent()->GetMousePosition(); printf("%d\n", mspos.z); It does never change when scrolling up. Thank you. PS: I am using Leadwerks 3.0.
  24. Hello, when trying to release an Leadwerks::Source my program immediately crashes with error code 1: Loading: Sound* buffer; buffer = Sound::Load("Sounds/Weapons/" + name + "/fire.wav"); source[sND_FIRE] = Source::Create(); source[sND_FIRE]->SetSound(buffer); buffer->Release(); buffer = nullptr; Playing: // Play source if (source[sND_FIRE]->GetState() == Source::Playing) { source[sND_FIRE]->Stop(); } source[sND_FIRE]->SetPosition(entity->GetPosition(true)); source[sND_FIRE]->Play(); Deleting: for (int i = 0; i < NUM_SOUNDS; i++) { if (source[i]) { if (source[i]->GetState() == Source::Playing) { source[i]->Stop(); } source[i]->Release(); // Crashes here source[i] = nullptr; } } The last thing Leadwerks writes to console is "Open AL: AL_INVALID_OPERATION". I noticed exactly the same behavior when trying to play a sound that is already playing. I attached the sound used in the example above. A screenshot of the object after the crash: source[0] is the object on which the crash occurred.
×
×
  • Create New...