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
  • Road & Traffic infrastructure [Vehicle based path following]
  • 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

Product Groups

  • Software

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. Hey. I want to make a vehicle in C++, and I am having a bit of trouble figuring out the commands. I have looked at the lua example, but I am still having a bit of trouble. It is mostly the wheels i cant figure out though. Can anyone provide a bit of example in C++? Thanks in advance, DH
  2. DigitalHax

    Weapons

    Hey everyone. I am looking for creating a lua weapon script for long term use. I want to be able to have them loaded in the editor and picked up on the hit of a key. I have seen the power tutorial with gamelib to load weapons. But I am not to keen on using it. Now I understand a few people are developing something similar, like the lua weaponwerks. One example I know of is pixel perfects weapon system. Something like that would be just what I need. If anyone knows anywhere I can get started(i am not that great with lua) or provide some basis would be great. Thanks in advance.
  3. Hello. I was wondering how I would create something similar to the turret in half life 2. Specifically the aiming side. I want to have so when I move the mouse on the screen, it sets the a model to point to where I am pointing - including the distance so if I point really far, it will set the right angle. This is a bit of a tricky one, but I hope someone here understands me. Thanks in advance.
  4. I have the following code: [...] // Set graphics mode LEO::Engine engine(AppTitle,ScreenWidth,ScreenHeight); if( !engine.IsValid() ) { ErrOut( "Failed to set graphics mode."); return 1; } engine.AddAbstractPath( MediaDir ); // Create framework object and set it to a global object so other scripts can access it LEO::Framework fw; if(fw == NULL) { ErrOut("Failed to initialize engine."); return 1; } // Set Lua framework object engine.SetObject( "fw", fw ); // Set Lua framework variable LEO::Lua lua; lua.PushObject( fw ); lua.SetGlobal( "fw" ); lua.Pop( 1 ); LEO::Model skybox("abstract::environment_atmosphere.gmf"); [...] Leadwerks is installed to "D:\Leadwerks\SDK", which is what the "MediaDir" value contains. I'm trying to add a skybox to the test, and when it hits the line that loads the one provided with the SDK, I get an error message that says "can't open scripts/class". The console has the following text regarding this problem: So...what am I doing wrong now?
  5. Hey, I have been setting up a menu system, but and I want the mouse to dissapear when you hit esc. But I tried to refine my code, but in my code the mouse flickers and doesn't work. The basic concept of my code is, //Main Loop { If(menval == 0 { if keyhit esc { menval = 1 Menu = 1 } } else { If keyhit esc { Menval = 0 menu = 0 } if menu = 0 { //main code Hide the mouse } else { //menu code Show the mouse } } I hope someone understands what I'm doing wrong...
  6. Hey all, I have started some minor milestone development (Using vanilla C++) in which I have made a simple menu system where upon hitting escape, the mouse appears, and the control stops. I want to have some GUI (maybe a few buttons) appear. Now I don't know much on this topic, but I want people's opinion on it. What is the best gui for Leadwerks? Thanks in advance...
  7. Hey all, After programming for a few years I've noticed that the performance in my projects are low. This is mainly because of bad written code. Since I don't really like to keep that bad habit, I will need a bit of your help and advice. I do know how to code, but the problem is coding for performance. My goal is to improve the performance as much as possible. I've started coding in Game Maker - where you don't really have classes but objects. I haven't really been learning how to program in performance back then (neither coding clean actually, working with classes etc). So basically I *cough* might *cough* have had a bad start. In my project Ravage Online (the online FPS) I've only have 8 classes - I assume this is low for over 6000 lines of code (also building takes long, etc). Are many classes good to have when looking at performance and are they easy to use? Also, I'm currently programming in MVS2008 in C and C++. Are there any handy tools to record the performance/check your code for performance? Or are there any ways to check the performance using the Leadwerks engine? Then we have the big while loop. I used to put like every bit of code in there with barely any functions (I feel your pain). But writing functions all the time also fills up a lot of space before the int main - should I work with some more classes? I also noticed some people are sketching what they want to code - I would like to try this. Is anyone doing this as well? Does anyone have tips and tricks for that? At last: Do you have any tips, tricks and/or tools about coding clean/optimizing performance? I'm thinking about having a good start with a new project but don't want to end it up like Ravage, where the easiest scenes have a low FPS because of the code. You don't have to answer them all of course - I just need some advice with coding. Big thanks in advance! - Ivar / Evayr
  8. I was wondering how someone would go about packing things into password files. If I were to load all map files (models etc) into a packaged file would they still be able to access each other, and would I be able to put scripting in there and still have everything load perfectly? I am just not sure and want some clarification. Thanks in advance.
  9. How would one get Motion Blur working? Is it a shader that works on the whole screen? Or can it be applied to a single object / Material?
  10. void _stdcall EntityCollisionCallback( TEntity entity0, TEntity entity1, byte* position, byte* normal, byte* force, flt speed ) Is the position, normal, force parameters relative to entity0 or entity1?
  11. I started working on this today, got it working, and figured I'd share. I still have more work to do but this is a good start. Could use cleaning up but that's for later. SuperStrict Import "-lpsapi" Const PROCESS_QUERY_INFORMATION:Int = $0400 Const PROCESS_VM_READ:Int = $0010 Const PROCESS_VM_WRITE:Int = $0020 Extern "Win32" Function GetLastError:Int() Function OpenProcess:Int(dwDesiredAccess:Int, bInheritHandle:Int, dwProcessId:Int) Function EnumProcesses(pProcessIds:Byte Ptr, cb:Int, pBytesReturned:Int Ptr)="EnumProcesses@12" Function EnumProcessModules(hProcess:Int, lphModule:Byte Ptr, cb:Int, lpcbNeeded:Int Ptr) Function GetModuleBaseName(hProcess:Int, hModule:Int, lpBaseName:Byte Ptr, nSize:Int) = "GetModuleBaseNameA@16" Function TerminateProcess(hProcess:Int, uExitCode:Int) Function CloseHandle(hObject:Int) Function GetModuleFileName(hModule:Int, lpFileName:Byte Ptr, nSize:Int) Function GetModuleFileNameExA(hProcess:Int, hModule:Int, lpFilename:Byte Ptr, nSize:Int) Function GetProcessImageFileNameA(hProcess:Int, lpImageFileName:Byte Ptr, nSize:Int) EndExtern ' enumerate all processes ' Function EnumerateProcesses:Int[]() Local pProcessIds:Byte Ptr Local cb:Int = 1024 Local bBytesReturned:Int Local processes:Int[] pProcessIds = MemAlloc(cb) If Not EnumProcesses(pProcessIds , cb, Varptr bBytesReturned) MemFree(pProcessIds ) Return Null EndIf processes = New Int[bBytesReturned / 4] MemCopy(Varptr processes[0], pProcessIds, bBytesReturned) MemFree(pProcessIds) Return processes EndFunction ' get process name from process id ' Function GetProcessName:String(id:Int) Local hProcess:Int Local hModule:Int = 0 Local lpBaseName:Byte Ptr[1024] Local nSize:Int = 1024 Local processName:String = "" hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, 0, id) If hProcess = 0 Return "" GetModuleBaseName(hProcess, hModule, Varptr lpBaseName[0], nSize) processName = String.FromCString(lpBaseName) If processName = "?" Or processName = Null GetProcessImageFileNameA(hProcess, Varptr lpBaseName[0], nSize) processName = StripDir(String.FromCString(lpBaseName)) EndIf CloseHandle(hProcess) Return processName EndFunction ' EXAMPLE USEAGE ' Local pList:Int[] = EnumerateProcesses() If pList.length > 0 For Local i:Int = 0 To pList.length - 1 If pList[i] <> 0 Local pname:String = GetProcessName(pList[i]) If pname <> "" Notify(pname) EndIf Next EndIf
  12. I spent all day working on this, rewrote the code a few times, a couple methods weren't reliable enough, and this is basically my last chance (before reverting to the best method so far). I'm using a named pipe from BlitzMax to my DLL. The message is sent but once I send another message it crashes the DLL loaded application (I can't specifically say what that application is, but this application loads/binds the DLL). I need to this to be a continuous evaluation for sent messages only to stop once I manually close the handle. If what I'm doing isn't doing that, please let me know how to fix it. I'm not very good with C++ and I haven't had much practice having BMax use Win32 external functions, although I got this to work on the first try, I brush it up on hair pulling luck. C++/DLL side: void BeginPipe() { _beginthread(BeginPipeThread, 0, NULL); } void BeginPipeThread(void* pParams) { LPTSTR _PIPE_NAME = L"\\\\.\\pipe\\RhysPipe"; char Received_Buffer[256]; DWORD BytesRead = 0; HANDLE hPIPE = CreateNamedPipe(_PIPE_NAME, PIPE_ACCESS_DUPLEX, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, PIPE_UNLIMITED_INSTANCES, 256, 256, 10000, 0x00000000); if(hPIPE != INVALID_HANDLE_VALUE) { int Connected = 0; while(!(GetAsyncKeyState(VK_F8))) { Connected = ConnectNamedPipe(hPIPE, NULL); if(Connected == 1) { BOOL bRead = ReadFile(hPIPE, Received_Buffer, 256, &BytesRead, NULL); if(bRead != 0) { // write message for testing ofstream myfile; myfile.open("WriteTest.txt", ios::app); myfile << Received_Buffer << "\n"; myfile.close(); } } else { CloseHandle(hPIPE); } } } DisconnectNamedPipe(hPIPE); CloseHandle(hPIPE); } I execute "BeginPipe()" as this needs to be on a second thread to not freeze the application waiting for a message. And the BMax side: Const GENERIC_WRITE:Int = $40000000 Const OPEN_EXISTING:Int = 3 Const INVALID_HANDLE_VALUE:Int = -1 Extern "Win32" Function CreateFileA(lpFileName$z, dwDesiredAccess:Int, dwShareMode:Int, lpSecurityAttributes:Byte Ptr, dwCreationDisposition:Int, dwFlagsAndAttributes:Int, hTemplateFile:Int) Function WriteFile(hFile:Int, lpBuffer:Byte Ptr, nNumberOfBytesToWrite:Int, lpNumberOfBytesWritten:Int, lpOverlapped:OVERLAPPED) Function CloseHandle:Int(hObject:Int) Function CreateEventA:Int(lpEventAttributes:Int, bManualReset:Int, bInitialState:Int,lpName$z) EndExtern ' OVERLAPPED ' Type OVERLAPPED Field internal:Int Field internalHeight:Int Field offset:Int Field offsetHeight:Int Field hEvent:Int = CreateEventA(0, 0, 0, Null) Method Delete() If hEvent CloseHandle(hEvent) EndMethod EndType Global hFile:Int = CreateFileA("\\.\pipe\RhysPipe", GENERIC_WRITE, 0, Null, OPEN_EXISTING, 0, Null); Local buffer:Byte Ptr Local bytesWritten:Int Local MyString:String = "THIS IS A TEST FROM BMAX" buffer = MyString.ToCString() If hFile WriteFile(hFile, buffer, 256, bytesWritten, Null) EndIf Again, it works, but when sending a second message, it prints, and then crashes. Not exactly sure why but I'm too novice in C++. Any help would be appreciated.
  13. Does anyone know how to register a new MIME type and create an ActiveX control that calls a local DLL on the user's machine? I am not trying to download and call a DLL, just call an existing one. It should work on IE, FF, and Chrome.
  14. What is the difference between 'debug' and 'release' modes in VS 2008? Is it simply that release mode lacks the macro 'DEBUG' definition? If I remove this macro, am I getting a complete "release" DLL, or is it being slowed down by some other debugging stuff?
  15. I am trying to replace my instances of LoadMesh() in my program with LoadModel() to take advantage of the automatic LOD properties of a model. However, when my character is declared as a Model, the animations no longer work. The model resorts to the T-pose. If the character is declared as a Mesh, then the animations work fine. The Animate() documentation says this: It doesn't seem to be working out for me. I've tried various children of the model for animating and loading the animations.
  16. File Name: Custom control for rendering leadwerks and c++/cli windows forms. File Submitter: Von04 File Submitted: 22 Jan 2012 File Category: Tools This is a custom control which renders leadwerks to custom control using a custom buffer and a c++ window form application. It has been tested on 2008 and 2010 c++ express, 2010 visual studio professional and c# all versions. How to use: 1. Create a windows form application. 2. Add the LEControl.Dll file to your projects release/debug folder, whichever one your running. 3. Add Shaders.Pak, Scripts Folder, Engine.dll, Engine.Cpp, and Engine.h to your project directory. 4. Go to the Form designer and open up the Toolbox. 5. Right-click and select Choose Items. 6. After the Choose Items dialog appears (usually takes awhile) selecte the Browse... button. 7. Navigate to your projects Release/Debug folder and select LEControl.Dll. 8. A new control should now appear called LEControl. Click OK. LEControl should now be added to your toolbox. 9. Drag a LEControl onto your windows form. In the example, I renamed from lecontrol1 to Window. 10. Go to the new controls events (click the lightning bolt icon) and double click the Paint event. 11. The newly created function is now your leadwerks rendering loop. Add your code here that you would normally have inside your main loop. There is no need to add the actual rendering code, because the control sets that up automatically. Just enter code for modifying entites e.g. 12. Go back to the control events and double-click the Resize event. Inside the newly created function add the line: Window->ResizeBuffers(); This is assuming that you renamed your control Window. Otherwise add the line: lecontrol1->ResizeBuffers(); This will resize the custom buffer to match the size of the control. 13. See the Example.Cpp file to see how to #include "Engine.Cpp". 14. In your Form1.h file make sure your add #include "Engine.h" at the top of the file. 15. In the Form1 constructor add: Initialize(); RegisterAbstractPath("Your SDK Location Here"); before the line: InitializeComponent(); 16. After InitializeComponent() add the line: Window->InitializeLeadwerks(true); // Uses framework or Window->IntializeLeadwerks(false); // no framework 17. InitializeLeadwerks sets up leadwerks creating world and cameras for you. See the Form1.h file included with the zip pack for an example for accessing the different camera and worlds. 18. Run your form and that should be it. This control has been tested on c++ 2008 and 2010 express, 2010 Visual Studio Professional, and all years of C#. If you have any suggestions and encounter any bugs please post them here. Enjoy! Click here to download this file
  17. File Name: LEControl for rendering leadwerks on c++ windows forms. File Submitter: Von04 File Submitted: 22 Jan 2012 File Category: Tools This is a custom control for rendering leadwerks to a custom buffer using an opengl control on a c++/cli windows form. There is a sample project created with c++ 2008 express. The control was also tested on c++ 2010 express and professional versions and ran fine. This control has also been tested and works with c# windows forms. The sample project shows the custom control already attached to a form, but if you want to add the control to another form then follow these rules: 1. Add the LEControll.Dll file to your projects release/debug folder. 2. With your form project open, open the ToolBox and right-click. 3. Select Choose Items. 4. When the Choose Items dialog pops up (which usually takes a long time) select the Browse... button. 5. Then go to your projects release/debug folder and select LEControl.Dll. 6. A new control called LEControl should now show up and be checked. Click OK. 7. Now a new control is added to your Toolbox called LEControl. 8. Click and drag a LEControl onto your windows form. 9. Highlight your newly created control and select the event properties ( the little lightning bolt icon). 10. Go to the event called Paint and double click the empty value box. 11. Under the newly created function is your rendering loop. Add all code here that would normally appear in in your loop. Don't worry about adding the code for actual rendering of the world or the framework for the control already has this code built in. 12. Go back to the designer and find the Resize event. Double click. Inside the newly created function add line: lecontrol1->ResizeBuffers(); This is assuming you didn't change the name of the control. lecontrol1 is the default name of the control. 13. Please see the included example project for setting up the main forms constructor. There are some things I'm still working on and will update as needed, but this is definitely a working control. If you encounter any bugs please post them here. Click here to download this file
  18. Josh

    C++ Threads

    I am not new to multithread programming, but I have never done it in C++. I want to create a thread to execute a function, and be able to tell when the thread is finished. The code should run on Windows and OSX. If it can run on Android and iOS, that's great, but I don't expect it to. Where can I find a simple example that shows how to do this?
×
×
  • Create New...