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 guys. As you know from my status, I am working on RakNet multiplayer in LE. And I am having a few problems. I have taken a picture of the errors. It crashes the client whenever I add players. I followed the RakNet tutorial exactly I think at least. I tried a few things but I can never seem to fix unhandled errors. I know a lot of you in the community have had experience with RakNet and any help would be greatly appreciated.
  2. I just finished uploading the framework so that some friends can help out with the content and scene. I already have the overall theme and game put together, I just have to make them, and in this case get help with converting models, creating materials, and so forth. The framework is going extremely well. I've been working on it more than I should be to be honest but I did spend most of the day on the important matters. Plus it's Sunday for crying out loud. Anyways, I've changed several things about the framework. Here is a brief overview: Configuration is now available in the engine. This provided the gateway to the rest of the features I had plan for the framework, such as key/mouse binds, and generic configuration information for both the "engine" and "game." The key/mouse bind configuration file looks similar to: forward=w backward=s left=a right=d jump=space leap=lshift+space crouch=c | toggle fire=leftmouse aim=rightmouse grenade_toss=middlemouse | release grenade_cook=middlemouse debugphysics=f6 | toggle use=e It's fairly straight forward but the configuration file can contain basic instructions, such as "release" and "toggle." The configuration class itself provides the rest of the support. Examine the following, which is now accessible to Lua: if input:hit("leftmouse") == 1 then -- fire logic end if input:hit(input.get("use")) == 1 then -- use logic end if input:toggle("crouch") == 1 then -- do crouch end The engine configuration is managed with: config.get("resx") The game configuration is managed with: game.get("difficulty") One last feature I've added is a way to change between behaviors. These behaviors are strictly Lua, a hybrid, and strictly C/C++/C#/BlitzMax. If you provide the file "engine.lua" into the root of the project, the framework will only execute that LUA file after creating the graphics context and managers (config, input, game, etc.). The "hybrid" is a mix of the two. The framework calls upon specific Lua files at specific times. They could be looked at like "hooks." The Lua files are located at: "/scripts/dice" Examples are "update.lua" and "flip.lua." The framework also now handles scenes. It allows Leadwerks to process the scenes at the moment but then each entity in the scene to turn into an actor by the framework. This way you can get any actor: local actor = engine:getactor("myEditorAddedActorName") actor:translate(vec3(0,0,0)) actor:setkey("health", 20) Actors have their own Lua files and due to the structure described above we should be able to swap Lua files on the fly. The plan I will be attempting is similar to the following: local actor = engine:getactor("myactor") actor:setscript("newscript.lua") actor:runscript() I assume it will work, but who knows. Since per entity/actor scripts work the flexibility with the framework is fairly polished. I'm starting on default controller mechanics, soon to get into third person characters, and so on. Once my buddies can help me out I'll have more to test mechanics. Everyone should also check out Scarlet Thread Studios work, it looks to me like an RTS/TPS style framework, similar to Diablo series. Slight modifications can turn that into an RTS, FPS/RTS, and so on. Same with Pixel Perfect's engine Neutrino, which utilizes EKI One, and is turning out fantastic. I've bugged him to lease it but he isn't budging. Sorry everyone, lol. Just playing, Pixel. MG, always awesome work. Thanks for joining up to help with the content. Macklebee, hoping you'll come aboard and help me out with Lua. I'm really not in the mood to fully learn Lua at the moment. I plan to stick with hard-coded mechanics, lol. Read the above, it explains how to force the framework to let Lua control the main loop. Figured that would be your expertise. Awesome hangout session. I never planned to make it, thought it was out of my schedule, so it was kind of unexpected, lol. I had to register with Google+ and everything. It was fun, meant to talk about more, and to everyone else instead of just Josh, but I had to go AFK; turned out to be too long. I hope I'm invited to the next hangout but I don't have a camera. Thanks for reading.
  3. I thought I'd spend a little more time on this integration, using the laptop whilst watching the Olympics. The next phase was to automate the routines for NPC update and compacting the code routines. Ultimately, the idea is that after the scene is loaded, it will be parsed and flagged Dark AI objects, NPC's, Paths and Zones will be set up automatically via information taken from the relative lua scripts. Paths and Zones will be later, collision objects are done, so I was working on how to go about NPC's using this method. As some may have noticed I am using the FPSC Model Pack 53 characters. I converted about 5 or 6 characters to Leadwerks format and all the weapons for this exercise. I will eventually convert them all but I hand "prune" the bones of the rig and that takes longer than I want to spend at any one time on this side project. The FSM is still very basic but the first goal was to derive a current Animation state with each of those states having sub-FSM's to dictate the current behaviour based on the previous state and internal and external inputs. The framework is in place for the animation state which is derived by performing Boolean logic on returned values and strings from the Dark AI runtime and some stubs are in place nested inside for some basic behavioural sub-FSM's. First though I want to able to set up the scene and then place all the Dark AI objects, NPC's, Paths and Zones directly in the editor and then use the load routines to set all that up in an automagic way inside the application. The collisional objects were easy and are done with some simple tick box flagging functionality added to their property scripts. The NPC's a little more in depth , due mainly to the large amount of usable settings! lol. But I wanted to be able to place the model and then assign it some basic attributes to be read on load, this included what weapon to attach. So that was the basic NPC property script setup (wasn't that painful anyway). So using the test scene from Leadwerks 2.5x + DarkBasic's Dark AI [Part 2], and placing a few enemies and some friendly's to look after the player, this is the result of the current stage reached in the integration.
  4. Actors are now in place and working correctly. I actually made a small mistake yesterday and made meshes part of the actor. This incorrect because a mesh should extend an object and be it's own actor type (i.e. class EMesh : public EActor{};). This is fixed and therefore the actor creation has slightly changed, but the shortcut (EActor::Add("ActorName", "mesh.gmf")) still works as expected. Timer I need to start adding actors so there are multiple in-game types of entities. First, I need a timer, because I just love timers. Even if it was just a single timer I'd be happy. They are extremely useful. ETimer::SetTimer(1.0f, TRUE, FUNCTION); A better example: // .. function to execute by the timer void TickSpecial(void) { printf("Tick Special\n"); } // .. looping timer Timers.SetTimer(1.0f, TRUE, TickSpecial); // .. void EGame::Unload(void) { Timers.StopTimers(); } There is still more I want to add to the timers but this is a good start. I'd also like to move them to threads to support multiple timer tasks. Cameras Cameras are interesting and always seems to be a topic around Werkspace. Cameras in this engine/framework are Actors and this should be interesting. Since cameras will extend actors I already have translation and rotation. // .. automatically done but an example[/i] - 0 is the framework camera layer to fetch Cameras.Add("Camera_1", 0); Cameras.Rotate("Camera_1", vec4(0.0f, 1.0f, 0.0f)); Next was to just add helper functions that are provided by LE, such as zoom, project, unproject, etc: // zoom with interp Cameras.SetZoom("Camera_1", 1.0f, 1.0f); // project vector project = Cameras.Project(vec3(MouseX(), MouseY(), 1000.0f); I shouldn't have a problem from here having any type of camera "mode" I would like to have. I will begin working on these once I get to detailed mechanics. Cameras are now working, along with timers, and now it's time to take a break. I may keep pushing forward but shortly I have to return to my other projects until I have time to return. Until next time, and thanks for reading.
  5. Paul Thomas

    And, Hello

    There are several here who already know me, but for those who don't, my name is Paul Thomas. I've been programming for a long time now; I started when I was 16 (I'm now 30) with HTML, CSS, Javascript, and CGI/Perl. Hell back then there wasn't a lot of people who even used the internet at home, lol. At least in my area, I'm sure others, especially in California, were a lot further ahead at that time in terms of technology and the interest in the technology. Through the years I've learned multiple languages from strictly web-based to software based. My interest in computers when I was 16 was to make a game, but at the time I thought it would have been much easier to prototype the whole idea in a web-based browser game. I had completed the browser game, which was the original "Eternal Crisis," and worked nicely. My plan was to update the entire web-based system, polish everything, and officially advertise (I had invited friends to play the game). That's when I learned about a "fried hard drive" and eventually learned about "backup" and how to install a hard drive. Those whom already know me, know what Eternal Crisis is, and my Blogger shows some of the history on that project. I had taken that project, along with another, over to Unreal Engine 3 because it best suit the project. Along the years of learning that engine I was using LE for prototyping ideas and so forth. While I'm not working on my own engine (temporarily titled "3D Dice"), FPS/RPG framework for UE3, or R.A.T.S., I work on my framework for Leadwerks Engine 2.5. I've never shared this framework before, in fact it always felt like I had to pull it out of a shallow grave each time I added to the framework design and programming. I'm a notebook junkie, I plan out mechanics, structures, and so forth on paper, before going over to digital. Old habbits that die hard I guess. Now I felt like sharing the progress, which isn't a lot, but it's a great start to me. It's a great start to me because it actually runs, lol. The state of the framework isn't even close to the final planned and written design, but progress is progress. Always move forward until it's finished, even if you can only pick that project up once every two weeks (by then I/you should probably take a look at your workload and fix it instead of attempting such project schedules; however this isn't vital to me and rates low on my importance scale), if it's updated then progress is moving forward. This is also harder to work with if you don't plan your software before actually programming (unless it's routine for you with available libraries for shortcuts in development). As most programmers should know, the programmers "update" isn't as glamorous as an artists "update" as it's not about visual stimulation but overall program/software flow. In the case of my LE framework (obviously untitled) it's all about providing mechanics and how that is achieved is important especially in the case of LUA access and how everything works together; from configuration/data management, to input binding, and all the way down to AI. Until occupied again by my other tasks I will eventually share the entire framework structure and I will always be showing examples of syntax; cause that's what programmers do. Just to clear the obvious questions that may come from the community: Q) Do I plan to give away code, the framework, and be an open source kind of person? A) No, not really. First of all, you would have to wait, to anyone else at the moment the framework is as useful is a partially finished library. How long you would have to wait would depend on how much time I can spend on the framework and in all honestly it's not much at all (read above, and actually read). Q) Do I plan to sell or lease the framework? A) No, don't think so. I even think that's against Leadwerks terms since it could be deemed an "FPS Creator," which is definitely in the terms. Q) Is my framework really that great? A) Nah, I mostly ramble, and I'm actually writing this to share with long time friends here at Leadwerks. Some won't even visit anywhere else to communicate because they are so used to using Leadwerks for that; it is indeed where we all met. Q) Who are my friends? A) I have none, it was a lie. Now, about this framework. This "framework" isn't the same, exactly, as the framework that comes with LE. The framework that comes with LE handles some dirty work for you when it comes to creating the worlds, cameras for those worlds, shader effects, and helper functions. The framework I'm designing is technically similar to a game engine. I personally consider Leadwerks Engine as a rendering API with physics and this framework uses that rendering API and provides mechanics. The mechanics the framework provides is what makes up the detail of the framework. INI SQL Application Graphics Game The above are considered "managers" in that they only handle what they should be managing. The "INI" only works with INI files, such as a configuration manager. The "SQL" only works with SQLite3, providing helper functions for easier SQL management, and so forth. There are more planned managers than the above, but these are what are completed in terms of programming. The only real interesting portion to discuss about the framework is within the "Game" manager itself. The game manager provides two special classes/managers; "Object" and "Actor." Actor inherits everything about an Object. What defines an Object is a game entity that is never interacted with by the player. Objects are useful as it can be used for multiple purposes without consuming a lot of resources for each "component" or "plugin" I'd like to add onto the framework. For example, a Timer would be an Object. You don't interact with a Timer in a game, but there is a timer running in the background. Example: class ETimer : public EObject { public: ETimer(void); virtual ~ETimer(void); void Initialize(void); void SetTimer(float StartTime); void StopTimer(); }; While working with the framework you would do something similar to: // EGame::EObject // EGame::Objects EObject Objects; // .. ETimer Timer; Objects.Add("Timer", Timer); // .. ETimer Timer = Objects.Get("Timer"); Timer.StartTimer(0.0); // .. Timer.StopTimer(); // inherited by EObject Timer.Unload(); An Actor inherits everything that defines an Object. The difference between the two is that an Actor is something that a player could see, hear, interact with, or can move, rotate, and so forth. If you can see how this is all going, everything starts extending the Actor, such as the character, weapon, or items. Here are some examples of working with Actors in the framework: // EGame::Actors Actors.Add("oilbarrel", "oilbarrel.gmf"); // .. Actors.Rotate("oilbarrel", vec3(10.0f, 0.0f, 10.0f)); // .. Actors.Translate("oilbarrel", vec3(10.0f, 0.0f, 0.0f)); // .. EActor barrel = Actors.Get("oilbarrel"); // rotate with interpolation barrel.Rotate(vec3(1.0f), 0.1f); barrel.Translate(vec3(0.0f, 1.0f, 0.0f), 0.1f); // .. EActor Barrel; // new name Barrel.Name = "barrel01"; // new mesh Barrel.LoadMesh("oildrum.gmf"); Actors.Edit("oilbarrel", Barrel); A quick overview of an Actor: //EActor ID Name Tag Parent Location Rotation Mesh Sounds Particles Each Actor can also have children which are also Actors. This provides another version of parent/child relationships but also provides additional benefits which will be discussed in later blogs. The ID and Name variables are provided by Object and the Object provides more variables, but is listed for importance. When creating an Actor it is automatically tagged for unique identification. In the above example "oilbarrel" is actually stored as "oilbarrel_0" and simply incremented for each Actor that is created. This is identified by the Actors "Tag". The "Name" variable is a forced name, therefore searching for an Actor by the name, with more than one Actor having the same name, the first result is returned. Actors will be automatically created properly for each entity in a scene. The framework will be using a custom scene manager and handles initial Actor creation. Programmers/Scripters can then add to the Actors list with C++ or LUA like the above examples. class MyGame : public EGame { public: void Load(void); void Update(float DeltaTime); // .. void MyGame::Load(void) { Actors.Add("custom_actor", "mymesh.gmf", "force_tag_name"); EActor actor = Actors.Get("custom_actor"); EActor actorCopy = Actors.GetTag("force_tag_name"); actor.Translate(vec3(0.0f)); } void MyGame::Update(float DeltaTime) { EActor actor = Actors.Get("custom_actor"); // interp move with speed and threshold option actor.Move(vec3(10.0f), 1.0f, 1.0f, 0.35f); } }; In upcoming blogs, when I do get the time, I'll post up some videos. Those selected for the invite only alpha testing will get their information on how to use the framework. Friends of mine that didn't get an invite and are interested in alpha testing please private message me; I most likely didn't send you the information because I figured you were busy with your own project(s). Well, out of time. Thanks for reading.
  6. I'm looking at some old tower defense code I had and ran into a problem and was hoping someone could maybe help me out. I have an Actor class which has a model entity in it. I also have a Projectile class that stores a pointer to an Actor as it's target. The Update() method of the Projectile class gets the actors position via it's model and moves towards it. What can happen though is that the actor object can be killed while the projectile is moving towards it. I only delete actors in 1 spot in where I use: delete actor; actor = NULL; In my projectile Update() method I do NULL checks against the target actor but it seems to pass these checks and go into an LE function where the model is a <bad ptr> and bomb out. I'm deleting these actors and setting them to NULL (and in the destructor I free the model and set it to NULL) so not sure if I'm missing something. When the error happens and it breaks in the code I notice the target pointer address is still 0x0c917030. All the variables in the class are filled with garbage (not the actual values they were filled with) so it's like it's sort of deleting the class but doesn't fully set the pointer of the class to NULL and so it passes the if(_target) check. I can tell all of this when I mouse over it in VS. If it's truly NULL I would think it would just say NULL and not give all the details about the variables in the class so it leads me to believe it's not truly getting deleted, but besides calling the delete statement on it and setting to NULL I'm not sure what else to do. The code is long and complex, but any general tips around deleting objects and why they might not get "fully" deleted?
  7. ..what are my options regarding slicing vector container, apart from using for loop, performance wise ?
  8. Is there anyway I can stop a sound playing when using EmitSound in C because unlike Lua and BMax it doesn't return a soundSource? I want the source tied to a moving entity created at run time so it makes sence to use EmitSound but I need to be able to have it loop untill I choose to stop it. How does it even get freed? Does this only occur when the entity it's attached to is freed?
  9. Hello all, I am having a go at vehicles again, and unfortunately I lost my old project files, so I am starting from scratch, yet one thing in blocking me. When i press A or D to turn the wheels left or right, they stay there and I am having trouble getting a working way of making them turn back. I have looked at the driver.lua file, and that's what I am basing it off, yet it does not seem to work. Here is my code. // Steering if (KeyDown(KEY_A) && (steerangle<=40.0f)) { steerangle+=0.7f; SetSteerAngle(veh, steerangle, 0); SetSteerAngle(veh, steerangle, 1); } else { if(!KeyDown(KEY_A) && (steerangle>0)){ if(steerangle>0){ steerangle=steerangle-4.0*AppSpeed(); } } } if (KeyDown(KEY_D) && (steerangle>=-40.0f)) { steerangle-=1.0f; SetSteerAngle(veh, steerangle, 0); SetSteerAngle(veh, steerangle, 1); } else { if(steerangle<0){ steerangle=steerangle+4.0*AppSpeed(); } } I had done this once before, but forgot. Can anyone give me some pointers to get this working? Thanks in advance,
  10. Does anyone use Code Blocks... I moving from BlitzMAx to C++ I know big jump... I'm really like the Code Blocks IDE, but I can't seem to configure it for LeadWerks.. Probably because I'm such a noob. Can anyone help? Thanks, Eric
  11. If you are thinking about using Dark AI as a cheap option for an AI solution and are wondering how to use both LE2.5x and Dark AI together then I suggest the best way to think about how to interface the two, is to think along the lines of how EKI One works, where you have two parallel but identical worlds running at runtime and the interface is the channeling of information between "identical twins" with one twin in the "AI world" and the other in the "Game world", that is what one "twin" is doing in the "AI world" the other is mirroring in the "Game world", the interface merely opens a line of communication between them so they know what each other are up to. The "Game world" is the physical world in which the player interacts, but the "AI world" is merely a "ghost world" that overlays it. Sounds more complex than it really is. Most of the commands for Dark AI relating to collision objects can be used, except the couple that relate specifically to DBobjects and levels. None of the debug commands are of use as they will probably rely on a DX7/DX9 drawing context and not an OpenGL one like LE2.5x. The good news, the other 128 commands should all work via some good interfacing, which will require a good working knowledge of the LE API and a good understanding of what those Dark AI commands actually do. Although there are some automatic behaviours from which information can be retrieved and used in the interfacing to LE, the best option I would think is to create NPC types/classes and use FSM's in conjunction with the Dark AI command set to create behaviours, it gives more control and should allow a higher level of complexity in behaviour. Just remember, you get what you pay for! You can download a demo of Dark AI working in DarkBasic Pro here, should give you some idea of what to expect. Of course, NPC entities (and objects) can all be tied to the integration with lua scripting allowing placeholder placement in the editor, with settings and values passed to the application for each when loading the scene. As I said this was just an hour and half's work, an experiment to see if it could be used. Blog entry: http://www.leadwerks...-dark-ai-daile/ Demo of DAILE WASD to move the player, mouse look, mouse wheel to zoom in and out. Note: There is no physics collision between the player and the obstacles, this is intentional and was used to check the virtual boundaries worked with the NPC's (that is, although the player could pass through them the AI had to plot a course around). NPC1-3 : Freindlys that will follow the player and defend him. NPC4 : Enemy that defends the circled zone when the player enters it. NPC5-6 : Enemies that are set to chase and attack (and search for) the player and his allies. NPC7-15 : Neutrals who will just move about.
  12. I am currently working with EKI One, working through its format and structure, getting to grips with the lua behavioural scripting side and trying to brush up on my c++ skills, actually brushing up on my c++ skills is an overstatement as I don't actually have any to brush up! .. lol, I have also been going through my Blitzmax code and trying to compile all the game mechanic functions and methods into a single .mod, trying to keep things tidy. Whilst going through my **** drive, I mean, my well organised storage drive, I found some DarkBasic/DarkGDK stuff, which included the Dark AI library. I have never really used DarkGDK, although I did start out a few years back with DarkBasic. So I wondered (as you do), could it be utilised in LE2.5? Having never used Dark AI (which came in a bundle, that I have never used either, but it was a bargain lol) I knew that R.T.F.M. would be in order. If it relied solely on DBobjects and inherent DarkBasic functionality then probably not. I spent half an hour looking through the commands, and an hour later had it working in an LE context. So to answer the question, it seems you can. I'd have upped a better quality image but I am told "You can upload up to 7.74K of files " Its all a work in progress, and probably will remain that way as its certainly nowhere near the solution that EKI One is, but as an exercise it wasn't a bad use of a few hours. I will post a demo in the showcase later for those interested. EDIT : Demo posted here : http://www.leadwerks...-ai/#entry45564
  13. After the first hour and a half I spent on this little exercise, I followed it up with another couple of hours. The basic integration now has an animation FSM. All still pretty crude and basic but a template to build on at some later date. The NPC's Entity script controls the models animation routines and gun attachment, the c++ application interfaces with the Dark AI library, and then uses messaging to communicate with the NPC Entity via lua script. Again this was just more experimentation and practice for me using c++ to build up techniques that will be beneficial later. Special thanks to Pixel Perfect for pointing out the error in my ways with regard to text strings in c++. Anyway this is the result, I just threw in some values for speed and animation blending off the top of my head just to test the FSM functionality, it will need those tweaking, thats for sure. I'd have posted some pictures, but I seem to only have 7k of space left in the blog section, not sure why, as it was over 200MB last time I did an entry here and not just a link to an entry on my off site blog.
  14. I'm about to attempt to create a simple model in Maya 2013 and texture it using vertex coloring. What I want to do is be able to procedurally texture the model via code and a shader using vertex painting. In Maya I will define the color of the vertex's and then supply the textures in the shader at runtime. For example a 2D plane model: x = a vertex x---x---x | \ | / | x---x---x | / | \ | x---x---x I want each of the verts to have their own color that I can assign a texture to in runtime. In this thread I'd like to ask if anyone has been able to do this successfully from Maya? Any other advice?
  15. Josh. In LE3D, will it be possible to load models etc in a background thread. In Leadwerks3D we have the LoadXXXX command which loads an assets and attaches it for rendering in the same command. That makes background loading hard to do. Would it be separated so LoadXXXX just loaded the asset, and we then could Add the asset when its time for rendering, background loading would be easy in LE2. How will that be in LE3D?
  16. Hey I finished my explosion class and I think it's ok,so I will show it here :] http://www.youtube.com/watch?v=HrnU8z6Jptw&feature=youtu.be (it will work in a few minutes)
  17. Hello everyone, I have a beginners problems with C++ enums and switch. My header has in the public section the following: enum TextPosition { Center, TopLeft, TopRight, BottomLeft, BottomRight }; TextPosition textPosition; Now the CPP initializes the textPosition variable in the constructor. #include "aLabel.h" aLabel::aLabel(void) { textPosition = aLabel::TextPosition.Center; } However during a switch case I get the message Unexpected type "aLabel::TextPosition". case aLabel::TextPosition.Center: What am I doing wrong here? Thanks in advance for the help.
  18. Hi, I'm trying to draw a weapon model using HUD, but I have a problem. My weapon model goes through walls. like this: If I clear the depth buffer before drawing the weapon model, the model doesn't go through walls, but this method can't use render lights because the depth buffer is already cleared. Any solutions to fix this problem?
  19. Hey, I am currently trying to sort out animation for my character, and I need a way of letting the animator know that the player is turning. Here is my code - TVec3 PivotRotation=Vec3(0); //Camera looking mx=Curve(MouseX()-GraphicsWidth()/2,mx,6); my=Curve(MouseY()-GraphicsHeight()/2,my,6); dx=Curve(MouseX()-GraphicsWidth()/2,dx,28); dy=Curve(MouseY()-GraphicsHeight()/2,dy,28); MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2); camrotation.X=camrotation.X+my/10.0; camrotation.Y=camrotation.Y-mx/10.0; cam2rotation.X=cam2rotation.X+dy/10.0; cam2rotation.Y=cam2rotation.Y-dx/10.0; RotateEntity(pivot,camrotation); RotateEntity(campivot,Vec3(camrotation.X,camrotation.Y,0)); EntityParent(camera,campivot); PositionEntity(mesh,EntityPosition(player)); So any suggestions on how I can specify if it is turning? Thanks in advance.
  20. Hi all, I'm new to C++ and having a bit of trouble compiling the basic LEBuilder Gamelib project. I added all the include/search directories and now I receive these build errors: Also note: I haven't changed anything to the files. The Error occurs on the last line in the .cpp; RunClass(main). ||=== main, Release ===| C:Programmingprojects_codeblocksbasic_frameworkmainsourcesrcmain.cpp||In function 'int main(int, char**)':| C:Programmingprojects_codeblocksbasic_frameworkmainsourcesrcmain.cpp|32|error: expected ';' before 'app'| C:Programmingprojects_codeblocksbasic_frameworkmainsourcesrcmain.cpp|32|warning: statement is a reference, not call, to function 'main'| C:Programmingprojects_codeblocksbasic_frameworkmainsourcesrcmain.cpp|32|warning: statement has no effect| C:Programmingprojects_codeblocksbasic_frameworkmainsourcesrcmain.cpp|32|error: 'app' was not declared in this scope| ||=== Build finished: 2 errors, 2 warnings ===| the RunClass() definition in Application.h namespace GameLib { #define RunClass(UserApp,...) int main(int argc, char* argv[]) { /*chdir(__VA_ARGS__);*/ UserApp app(argc,argv); app.Load(); app.Run(); return app.GetResult(); } the .h #pragma once #include "GameLib.h" // GameLib #define APPNAME "main" #define APPVER "0.0.0.0" class main : public Application { public: main(int argc, char* argv[]); // Constructor void RenderActive3D(); // Overridden 3D rendering void RenderActive2D(); // Overridden 2D rendering Cube cube, ground; // Create cube and ground void Load(); // Overridden scene loading and population stuff Material material; // Material for cube and ground DirectionalLight sun; // Create sun }; the .cpp #include "main.h" main::main(int argc, char* argv[]): Application("data",APPNAME" "APPVER) { // TODO: Add stuff here which is done once per application launch } void main::Load() { game.scene.cam.Move(0,0,-2); sun.Turn(Vec3(45)); material.Load("Models/CobbleStones/CobbleStones.mat"); cube.Paint(material); ground.Paint(material); ground.Scale(Vec3(10,1,10)); ground.SetPosition(Vec3(0,-2,0)); } void main::RenderActive3D() { if(Keyboard::I****()) Quit(); double n=AppSpeed(); cube.Turn(n,n*2,0); } void main::RenderActive2D() { Draw::Text(50,50,"%0.0f",FPS()); } RunClass(main);
  21. Hey guys, I have been working on creating a GUI system to work with, and I realised that none of the drawing commands work for me. DrawText,DrawRect,DrawLine, any of them, and I am not sure why. I am using framework, but I tried it manually without success. None of it is rendered. The only thing I ever got working was rendering an image, but even then it needed me to set alpha blending, but when it set it back to none after, it didnt show up. Any suggestions would be helpful.
  22. When using a Third Person view, how do you guys approach the problem of moving the character at the correct speed that syncs with the feet's. I was thinking of make some kind of measuring of the distance between the feet's and then calculate the movement speed from that. If that works it would solve the move speed for run also. Or is this the wrong way to approach this problem? Any better idea.
  23. I am looking into a few things at the moment, and one of them involves object selection. First off the bat, is there any command relevant to selecting an entity? I am eager to be able to select an object and tell it to do actions. But maybe only specific objects, no grabbing any old object. It makes it a bit more complicated but any suggestions would be very helpful. Thanks in advance, DH.
  24. I was experimenting a lot of different setups to make the Raycast default Leadwerks car physics works more real. So far i didn't got the results i expected. Will implementing Real Wheel car physics from Newton make this works better? Or are there some kind of tricks i can make to improve the raycast car? I need to make a demo with Transmission (Manual or Automatic), and improve the physics a bit. Right now this setup is what i'm using mostly: suspensionlength=0.1 springconstant=66.0 springdamper=020.0 mass=1.3 This makes it a decent driving experience, still when car turns i feel like it rises to the wrong side (as contrary to real physics). Maybe somebody have a better setup to try, or some ideas to point me out. Anybody was able to add a transmission or a more realistic engine like physics to the LECAR? Thanks a lot in advance.
  25. Hi, i want to convert my sceneLoader C source to c++ and hit a wall with retrieving the lua state for using its transparency script settings ... this is/should all be frameWork. The entities in question are not handled within ProcessScene(), are the usual suspects firepit, waterplane and the atmosphere but loading fine first time around. from the engine.log Loading script "c:/devlab01/le23sample/vs2008_proto_arena_01/media/engine/models/props/firepit/firepit.lua"... Lua error: c:/devlab01/le23sample/vs2008_proto_arena_01/media/engine/models/props/firepit/firepit.lua:25: attempt to index field 'transparency' (a nil value) I init lua like this : // -- // Set Lua framework object SetGlobalObject( "fw", fw ); // Set Lua framework variable BP lua = GetLuaState(); lua_pushobject( lua, fw ); lua_setglobal( lua, "fw" ); lua_pop( lua, 1 ); // ... i brute force reLoading in the main loop like this : // -- // Prepare App for new sceneLoad if( KeyHit(KEY_F5) ) { FreeFramework(fw); fw = CreateFramework(); // Set Lua framework object SetGlobalObject( "fw", fw ); // GfxSetup // -- SetBloom( true ); SetHDR( true ); SetGodRays( false); SetSSAO( false ); SetAntialias( true ); SetReflectionElements(ENTITY_MESH | ENTITY_MODEL | ENTITY_TERRAIN); playerIndex01.~cController(); // -- // recreate layer_world for new framework TLayer _layer_main; TLayer _layer_background; TLayer _layer_transparency; _layer_main = GetFrameworkLayer(0); _layer_background = GetFrameworkLayer(-1); _layer_transparency = GetFrameworkLayer(1); // Set its global vars for lua ... SetGlobalObject ("main.world", _layer_main ); SetGlobalObject ("transparency.world", _layer_transparency ); SetGlobalObject ("background.world", _layer_background ); playerIndex01.SetCamera( GetLayerCamera(_layer_main) ); playerIndex01.CreatePlayer(); // -- scene.~cScene(); scene.Load( "abstract::SceneParaTropique_GTownCamp.sbx" ); // add camera from scene PositionEntity( playerIndex01.GetCamera(), scene.GetCameraPos() ); RotateEntity( playerIndex01.GetCamera(), scene.GetCameraRot() ); // add controller from scene camera PositionEntity( playerIndex01.GetPlayer(), scene.GetCameraPos() ); } As you can see i even tried to pass framework layers with "SetGlobalObject" - however, i just want to assign/get the previous lua state back to use fw.transparency etc ... hint&help appreciated
×
×
  • Create New...