-
Posts
564 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by Laurens
-
-
Thought I'd share this bit of code with you I found quite useful. It basically checks if your game has already been started to prevent players from going bananas on your executable. If your game has already been started, it brings it to the front.
const bool Application::IsOnlyInstance(const std::string title) const { HANDLE h = CreateMutex(0, true, title.c_str()); if (GetLastError() != ERROR_SUCCESS) { HWND hWnd = FindWindow(title.c_str(), 0); if (hWnd != 0) { ShowWindow(hWnd, SW_SHOWNORMAL); SetFocus(hWnd); SetForegroundWindow(hWnd); SetActiveWindow(hWnd); } return false; } return true; }
Title refers to the caption in the window's title bar so you do need to call this after having called SetAppTitle(...).
From GameCode: http://code.google.com/p/gamecode3/
Cheers!
-
Ouch, good point. The last SourceForge upload is even slightly older.
-
I'm inclined to say yes based on a quick glance over the documentation. It just requires a fair amount of glue to have it play nice with Leadwerks. Is there anything in specific you are stuck with?
-
I'm an advocate for throwing exceptions in constructors as well. After a constructor has been called, the object should be in a fully usable state and not in some unusable zombie state that requires more methods to be called for proper initialization.
A try-catch clause does not result in more code either. More like the same as an if-then-else.
-
Here's one on NetBeans if you're interested: http://www.leadwerks.com/werkspace/page/Documentation/LE2/tutorials/_/programming/cpp/c-netbeans-and-leadwerks-r53
-
Yeah but since he expressed a concern regarding loading hundreds of assets beforehand, I think we can safely assume he meant different assets, in which case there is no possible way to properly load them in a separate thread.
-
You mean someone answered this? I would surely like to know how because as far as I know, you need to include the Lua headers in your application and pass them the state Leadwerks maintains. Last time I checked, there was no built-in command for it.
-
Thanks for the insighful replies both. After consideration I have indeed decided to only define the public API in the requirements, leaving implementation up to the developer. Got positive feedback from the team so I'm happy :-)
Thanks!
-
Hi,
I am currently involved with a project unrelated to Leadwerks (or even game development) building a generalized framework for developing all sorts of business applications. It basically provides a set of classes that define companies, employees, customers, products and orders. I have written requirements before but this was for actual applications where I could see how use cases made sense. Now with this library, I am at a loss as to how to properly define the functional requirements.
For instance, a functional requirements for an application might be:
The system shall register the new user when the username and password textbox have been filled out and the user selects the submit button.
But how would one define such a requirement when building a library?
The system shall define a Customer-class with the following properties:
- Username
- Password
That seems like I am steering to an implementation way to much as opposed to actually defining a requirement. Would it be ok (or even mandatory) to define the public API in the requirements when working on a library instead of an application considering your main actor is a developer?
I hope I have made myself clear! If anyone can offer any insight that would be greatly appreciated :-)
Thanks!
-
I don't think even paid webhosts allow remote clients to connect to their MySQL DB directly. If you meant through a PHP (or something) script running on the server, you can check this out: http://www.free-webhosts.com/free-mysql-database.php
Alternatively, just get some free HTML-only host and upload an SQLite DB to the server. Make sure you have anonymous write access to the file and you should be good to go.
-
By the way, there's more reasons for multithreading:
- fetching online highscore and...
- refreshing master server and..
- joining multiplayer games!
It's a pain in the buttocks if game freezes for few seconds when you are "refreshing master server list" or "joining game".
Multithreading +many. I would love to be able to call on Leadwerks from different threads. Since streaming terrain is on the roadmap I suppose you can't get around it anyway.
-
I highly recommend getting "Game Coding Complete (Third Edition)". It walks you through creating a tried and true client-server architecture that supports instant replay by routing all game events (move, rotate, fire for example) through a central event manager. It allows you to write all these events to file and replay the game simply by pushing the events from file back into the event manager.
DirectX is used as the graphics library so it does require some minor modification building it around Leadwerks but that is no big deal.
-
I can see that working for general projects but I tend to prefer Redmine because it's focussed on software projects, featuring a bug tracker and SCM integration for instance.
-
Great!
Fees aside, would a product created using Leadwerks require you to include any PhysX banners/credit/mention of some sort?
-
Voted for Bullet because of the same reasons Brent and Lumooja have already pointed out on the condition that the engine will still support the large scenes we can currently have, vegetation-wise.
EDIT: Voted before reading the other 3 pages of this thread. I am only OK with PhysX as long as it does not lead to any additional licensing fees, which is not completely clear to me right now. Under what terms is PhysX used in Leadwerks?
-
How's that possible? Because even LE2 has it's own namespace LE.
Are you sure you put your own functions into your own namespace also?
I do not remember this being the case when I made this feature request, the 8th of november of last year
-
You will probably want to read this: http://leadwerks.com/werkspace/index.php?/topic/3093-attention-labici/
-
None, it just bogs down my gaming machine and doesn't offer any real protection over NoScript and generally simply knowing where to click and where not to click.
-
Welcome
-
If you have an ATI card you can just get the iZ3D drivers.
-
Not really a feature but I would like to see all functions neatly encapsulated in a namespace. My function names sometimes collide with LE functions.
-
Whenever a client is authoritative there is going to be cheating so I would avoid it at all cost. For example, mixed mode could easily be cheated by modifying the client to never send the "hit" message.
You can solve it quite easily by not using physics and just do simplified calculations by "hand" (which several modern MMO's such as WoW, Lord of the Rings Online and EVE Online seem to do) but Lumooja's solution is of course far more elegant
-
If you don't call FreeEntity at the end of your program it is not really an issue since the OS will reclaim the memory your game used anyway. If you don't call it when entities go out of scope while your game is still running it will cause memory leaks.
Cheers!
-
If LUA scripting is disabled in the evaluation kit then no, it won't be possible. If it is not bundled with Engine.exe to start a game from scripts, then no, it won't be possible.
Leadwerks is worth every penny though, twice. If you are serious about creating a game then I would recommend you purchase the engine. Besides, there is only support for licensees, and it's hard to go without when you're new to the engine
Cheers!
Furious Frank Demo 0.03
in Showcase
Posted
Good stuff MG, ran flawlessly