Jump to content

Joshua

Members
  • Posts

    44
  • Joined

  • Last visited

Profile Information

  • Location
    in the United States Somewhere

Joshua's Achievements

Newbie

Newbie (1/14)

12

Reputation

  1. Not sure if it is the best idea to revive this older thread however the template project has gone many architectural changes over the last few months. I wanted to get some exposure on the existing features before I continue to diverge with further support. The framework is pretty solid and clean. Any feedback is welcome. I have not merge modifications into master as this will be breaking so make sure to pull the develop branch at this time. The new project features the following: A new service called AppController which takes control of your applications execution pipeline from startup, running and shutdown. A lightweight dependency injection framework known as Container. Added sqLite dependency as a database storage option (no interface yet). Added squirrel script support (no interface yet). Added LuaTables++ to make lua script serialization and deserialization very simple. Cleaned up StateManager class, utilizing generics for state manipulation. Added an optimized Leadwerks isosurface generator with a modeler utility to help manipulate your voxel data. A fully functional and expansive entity component system with several example components. There are also two example entities that are available that use the existing components as an example. Cleaned up EventManager with a handful of sample events. A great example of their use can be seen in the StateManager.
  2. Cassius, you are absolutely correct. You do not need the interpreter code that comes within the app.cpp file of a new project. I think it is there in case you would like yo utilize lua within your c++ application. When I upgraded from 3.2 to 3.5 I replaced the app.cpp file with my own and have had no problems. Just for simplicity, here is a copy of my current app.cpp file. ** EDIT ** To preserve formatting, I posted my source file on dpaste. It can be found here: http://dpaste.com/2DWKQ6W
  3. I made a post a while back about using c++ and Leadwerks which can be found at the following link. I have been working on the project however, I just have not had the time to post my changes recently. http://www.leadwerks.com/werkspace/topic/12666-leadwerks-and-c
  4. If you want to get to your directory structure easily, you can open the Leadwerks level editor, Select 'File -> Project Manager. You then clan 'double click' on your project. A windows explorer window will open, at your projects root directory.
  5. I currently develop for Leadwerks 3.5 in VS2015. Visual Studio can open and work with previous .csproj and or .sln files with having to convert the project. Visual studio will also use the compiler for the previous version(s) as long as it is installed on your machine. Keep in mind that VS2015 will create a .vs directory within the same directory as your solution. If you are using version control, make sure to update your .gitignore.
  6. Whoops, my apologies. I run Leadwerks on my laptop, and do not alweays have it connected to the wifi so when I check at the time of my post, I must have still been running 3.4.
  7. To give you a little more information here, When you launch Leadwerks Game Engine from Steam, the level editor should show up. Under the File menu, you should see an option called ' Project Manager', or something similar. When yuou select that, you can use the create new project button to create a new project. After you choose to create a new project, you will be able to specify whether you want a Lua or C++ project, the directory you want to store your project in, The creator's name, Copyright information etc. When you confirm the creation of your new project, it will be added to the project list of the Project Manager. If you double click the project name, a windows explorer window will open to the directory of your project. Inside the Project's directory, you will find solution folders for Linux and or Windows. The .sln file under the windows directory is the solution you will open in visual studios.
  8. There are two ways I would approach a solution. 1. If you really want an Arc effect, you would want to use something like AddForce. You could calculate your normal vector, indicating the direction you want your player to go, multiply it by your desired force, to launch your player in the direction of your calculated normal. I had a test-case of this when I was first messing around with bullets. 2. If effecting your character controller through the use of physics methods do not work, you can always accomplish this manually, in the same way that you move your character controller. You could calculate your normal vector, like above, only this time, you would apply your desired force over time using some basic trig algorithms to calculate your arc movement. Your player could still move normally however, the arc movement would be added to your character controller movement every frame, until your desired duration of affect is over.
  9. After a long while of inactivity on the forums, I wanted to take the time and share my boilerplate and base game application, in c++, for the Leadwerks game engine. The source can be found here. This project uses V$ 2013, C++11 and Leadwerks 3.X. There are currently no external dependencies outside from the full version of Leadwerks Game Engine, on Steam. If you have any problems setting up the application just let me know. I will gladly assist in any way possible. You should be able to clone/download the repo, drag in the Leadwerks asset folders, and be on your way! What it includes: Base Game Object Input Manager State Manager Camera Manager Planned enhancements: Event Management Network integration with Steam Voxel Management Game Object Management Weapons and Bullets Several generic C++ containers much much more The planned enhancements are actually already complete, I am just taking them out from my existing game application, cleaning them up, and adding documentation. I look to push changes to the public-facing repository bi-monthly. I would love to get some feedback about what you guys and gals think, whether you are using it in your projects, and or what you think the template could use. I will be posting notes on my IndieDB blog as well to follow my releases. P.S. The current template contains a simple example, demonstrating the use of the Game Object, Camera Manager, and how to switch between Camera Behaviors.
  10. Zancie, before Leadwerks 3.1, there were a bunch of tutorials that incorporated C++ development. If I can find them, I will send them your way. If you want to develop primarily in C++, your main source of information would be in the Documentation->Command Reference section of the page. This can be found in the nav-bar at the top of the page. Every officially-supported feature/functionality will be there with C++/Lua code examples. On a second note, I am working on a project programmed entirely in C++ with Leadwerks that is going to encapsulate developing a game project in Leadwerks from start to finish. The project will feature a Camera system, a Screen/State system, a Resource system, networking system etc... that can be expanded upon and used for a variety of other projects. At the completion of the project, there will be accompanying documentation that will outline the development life-cycle of the project (not necessarily start-to-finish tutorials) however, information that people entering Leadwerks, or any game development suite can follow. On a third note, if you have questions, search the forums or ask existing developers. We are all very open and love to talk about game development and Leadwerks. I do stand-by my initial statement that a lot of development-related questions can be solved through researching the leadwerks API documentation. Happy Coding!
  11. Could you please share the code you use to create the new surface and add it to the model? There are some possibilities I can think of for the cause of your problem but without seeing this section of the source I would just be speaking without any real direction. I have been working with models and custom surfaces and may be able to help.
  12. Not currently. A static_cast would require the given cast object to be of a related class, ex, derived from Object to allow for up-casts or down-casts. I could allow my own game objects to inherit from the Object* class however, this is not entirely desired for my purposes. For example, I may want to pass in the current class instance to gain access to its contents for some kind of manipulation. Passing in the current class instance casted to an Object* to the thread entry point and casting it back to an instance of the appripriate class to call functions to interact with private or protected class variables is what I currently do, however I feel this is an unnecessary work-around. I think there should be a way in which I would be able to create a thread entry point from within a class which already has access to its private and protected members. For example. In my Scene class I have a std::vector of Chunk* objects. I want to be able to add/remove chunks from this std::vector in a separate thread because my scene can be from 1 to n chunks in size where n is limited to some finite number of chunks I want to be loaded at any given time. I want to be able to access the scenes std::vector directly, allowing me to add a new chunk without having to create a function outside the scope of my Scene class to add the chunk to the Scene std::vector.
  13. @Shadmar, your example above still uses a Free Function for the thread entry point. I am looking to use a Class Member Function as the thread entry point. Using a Class Member Function as the entry point for a thread would allow me to remove global scope variables from my source. It would also minimize the number of typecasting and the creation of new instanced objects needed.
  14. Did installing xterm on your system fix the breakpoint problems you were having in Code::Blocks? I have tried using Code::Blocks in the past on WIndows and Linux, even with xterm installed and was never really able to get good results while stepping through my source in Code::Blocks.
  15. How is it possible to use the Thread and Mutex objects with class object methods? I have only been able to figure out how to use the Thread and Mutex objects with free object methods. so instead of: Object* UpdateChunk(Object* obj) { mutex->Lock(); esChunk* chunk = (esChunk*)obj; chunk->Update(1.0f); mutex->Unlock(); return NULL; } // -------------------- // Updates the esScene. // -------------------- void esScene::Update(float deltaTime) { int index = 0; for(unsigned int x = 0; x < 2; x++) for(unsigned int z = 0; z < 2; z++) for(unsigned int y = 0; y < 2; y++) { if(m_chunks.at(index)->IsSetup()) if(m_chunks.at(index)->IsDirty()) { thread = Thread::Create(UpdateChunk, (Object*) m_chunks.at(index)); } //m_chunks.at(index)->Update(deltaTime); index++; } } // end void esScene::Update(float deltaTime) // ----------------------------------------------------------------------------------------- I can do this: Object* esScene::UpdateChunk(Object* obj) { Vec4* data = (Vec4*) obj; mutex->Lock(); esChunk* chunk = (esChunk*)obj; GetChunk(data.x, data.y, data.z)->Update(data.w); mutex->Unlock(); return NULL; } // -------------------- // Updates the esScene. // -------------------- void esScene::Update(float deltaTime) { int index = 0; for(unsigned int x = 0; x < 2; x++) for(unsigned int z = 0; z < 2; z++) for(unsigned int y = 0; y < 2; y++) { if(m_chunks.at(index)->IsSetup()) if(m_chunks.at(index)->IsDirty()) { thread = Thread::Create(UpdateChunk, (Object*) new Vec4(x, y, z, deltaTime)); } index++; } } // end void esScene::Update(float deltaTime) // ----------------------------------------------------------------------------------------- thread and mutex are global in this scope however, I would prefer to have them objects of the esScene class structure. I have tried to create a function pointer that resides inside the class, however, this option does not seem to work. It appears that I need an instance of the class in order to get the function pointer however, there seems to be a big difference in how object member functions and free functions are handled.
×
×
  • Create New...