Jump to content

AggrorJorn

Members
  • Posts

    4,816
  • Joined

  • Last visited

Everything posted by AggrorJorn

  1. AggrorJorn

    so slow??

    Processor and memory are more than fine. The Video card is a little bit on the low side, but should still be good enough for decent results. Are you putting the barbarian on screen? Brushes with occlusion culling on?
  2. A casual minigolf game in its very very early stages V0.03 Improvements Camera jittering has been reduced by 90% - 95%. The game starts with level selection. Further known issues Bug during level switching has not yet been fixed Josh is working on it. [*]Boundries still absorb any bounce back forces. [*]Lightmapping sometimes looks weird. [*]Ball and scenery seem to completely ignore friction. Level csg has been set to scene collision type that makes movement smoother. Thanks to Shadmar for the Skybox and swaying shader (the flag). Latest: Old versions: 0.01
  3. I tried publishing my project but got the message that it failed to publish. I had no idea why untill I noticed that the editor said: exe coud not be found. I then came to the conclusion that I hadn't build a release exe yet. Maybe the error message should be adjusted to something like: Could not find the <projectname>.exe. Have you build your game in Release mode?
  4. Or perhaps this goes for entities, that you want to skip in Load callback... Anyhow, I can't find any information on it.
  5. @beo: sorry, I missread you post. You are correct. Just saw that as well. I think that is supposed to do exactly what we suggested, but it doesn't work since it is false by default.
  6. Your object wont get parsed in the Load function since it doesn't have a mass or script attached to it. Thus in order to do what you do, you first have to set mass or attach a script. Then it gets parsed via the callback and you can set a mass.
  7. Yeah indeed. All the tutorial could then be converted to these templates. Simply start it up the project manager and choose a template from a dropdownlist.
  8. When you create a new project, have a simple checkbox that allows you to set if you want to have Sample code ready. (The flying around code etc) Instead of an empty project you would also be able to choose a template First person character Third person character I would be happy to provide these templates and maintain them.
  9. I am posting as a result from this topic: http://www.leadwerks...o-c/#entry56549 When I load a map, I check if the object in a scene exists (in C++). CSG brushes are not loaded by default. Only with A script attached to it when the brush has a non zero mass. Now I have this trigger that doesn't need a script and also doesn't have a mass. In order for me to load it I have to attach an empty script to it in order for it to be loaded in. Can we have a merge (by default set to true) option that allows us to get brushes as entities when loading a map? This option is actually present but doesn't seem to affect loading behaviour.
  10. Vertices editing is not yet supported but it is on the to do list.
  11. Sweet, thanks Rick. Great idea to make the virtual OnCollide function. For the sake of this topic, this is what I have that works: [/code] //Inside LoadMap callback if(entity->GetKeyValue("name") == "Trigger") { trigger= new Trigger(entity); } //Trigger.h class Trigger { public: Trigger(Leadwerks::Entity* entity); ~Trigger(); Leadwerks::Entity* entity; }; //Trigger.CPP void CollisionHook(Entity* entity0, Entity* entity1, float* position, float* normal, float speed) { System::Print("-------------------------------"); } Trigger::Trigger(Entity* entity) { this->entity = entity; this->entity->AddHook(Entity::CollisionHook, CollisionHook); } Trigger::~Trigger() { this->entity->Release(); }
  12. So this is my current approach which I think is almost working. 1.Load map and see if trigger object exists. Make a new object of the Trigger1 class and pass information along. void StoreWorldObjects(Entity* entity, Object* extra) { if(entity->GetKeyValue("name") == "Trigger1") { trigger1= new Trigger(entity->GetUserData()); } } Inside the trigger (which inherits Leadwerks::Object) I do the following: void CollisionHook(Entity* entity0, Entity* entity1, float* position, float* normal, float speed) { System::Print("-------------------------------"); } Trigger::Trigger(void* userdata) { this->SetUserData(userdata); this->AddHook(Entity::CollisionHook, CollisionHook); } The trigger object is created. The Lua function can confirm collision Problem: the collision callback in C++ is not called.
  13. I didn't know that. Just tried it out and adding mass or adding a custom script works. Please consider adding this to the documentation for loading a map. I have to edit some tutorial information as well because I said it was not possible. http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/map/mapload-r510 I will deffinetly try out the ToLua tool. This knowledge has to get out to the people really. I can't be the only one trying to do this?
  14. Don't my class names also have to be prefixed with "XXX_" as well then?
  15. Sweet, thanks for post. I will try both of these solutions and see what works best for me. I think that many people will encounter this topic so this is tutorial gold. How can I retrieve the entity user data when the CSG brush is not an entity? At least, when I load the map with a callback, I can only get entities like pivots, models, lights etc, but not brushes. void StoreWorldObjects(Entity* entity, Object* extra) { //Prints out Lights, Models, Pivots but not CSG brushes. System::Print(entity->GetKeyValue("name")); }
  16. I found it. After recreating a new project and copying everything over I still got the error. Then I spotted something in a class: #ifndef ENGINE_INPUT #define INPUT I have my own class for handling input. The define segment doesn't define my class because I forgot to give it a different name. Coincidental, input is already used by the winuser.h, causing the error.
  17. Sometimes I get the most funny ragdolls. Here are 2 of them: Needs to pee: Honey, that dress looks fabulous:
  18. Yeah I tried it with no result. I have lost to much time allready so I am going to try and create a new project and add all the code manually.
  19. I have several csg brushes in my scene that are triggers. These triggers should communicate back to the AI, GUI, Networking etc in C++. I don't want to create these triggers by hand ofcourse.
  20. Thanks for the answers. Right now I do the following: I create a pivot and make the triggerbox a child of it. During the loading of the map I check every entities name. If it is a certain name then a C++ object is created at its position while the Lua object is being removed. In this situtation I have a class with a Shape file. The new C++ object has Collision Hook. This process is quite slow and looks a bit sluggish. Sometimes it is usefull for instance when you have a player start pivot and you want to create the player via C++. However with a CSG brush that I created in the editor this is not that easy. I have to make a class for that trigger, add a shape to it and make sure all properties from Lua are copied to the new C++ object. I might as well not use a csg brush at all and just a pivot since I have to create it by hand.
  21. Currently I have a trigger in my scene. The trigger has a script attached to it with the CollisionHook function If something in the game hits the trigger, then the Lua CollisionHook is called. But how can I send/call/invoke functionality in C++ from that part of the Lua script?
  22. Thanks for the answer guys. Unfortunately, it hasn't gone away. I tried the following steps. I closed visual studio. I did a hard reset on the last commit where everything worked. I closed GIT (just to be sure) I opened up visual studio I cleaned the solution and did a rebuild
  23. After doing a rebuild of my entire project I get several errors in the winuser.h. I have never touched that file nor have I updated the project via the leadwerks updater. I checked out an older version via GIT but the problem remains. Any idea what this could be? typedef struct tagINPUT { DWORD type; union { MOUSEINPUT mi; KEYBDINPUT ki; HARDWAREINPUT hi; }; } INPUT, *PINPUT, FAR* LPINPUT; WINUSERAPI UINT WINAPI SendInput( __in UINT cInputs, // number of input in the array __in_ecount(cInputs) LPINPUT pInputs, // array of inputs __in int cbSize); // sizeof(INPUT)
  24. Going to try this this weekend.
  25. Both the "Saving and Loading" and the "Pathfinding" tutorial now have a tutorial page. So if you want to download the files that are used in the tutorial or you want to have direct access to the source code, follow the links below: Saving and Loading Pathfinding
×
×
  • Create New...