Jump to content

ZioRed

Members
  • Posts

    1,133
  • Joined

  • Last visited

Everything posted by ZioRed

  1. I think technically they are global, but the compiler does not "know" them out of the .cpp itself. If you really really need global variables (*argh* I find them very bad in OOP design) you should declare and initialize them in the .h file, then where you need to access them you will include that file. But since global variables (and global functions) are definitely not OOP, I think a more elegant way would be to add those variables into a class. EDIT: well, I tried now to declare a variable in a .h out of the class declaration and the compilation failed, so it seems you should add them to a class.. sorry, there's still something I need to recall from the past, didn't use C++ from long time, so probably the other guys could be more specific and clear. Here is: http://www.learncpp.com/cpp-tutorial/42-global-variables/
  2. In the editor it would be cool if we could play the actual scene loaded too (by adding another Play button), instead of only being allowed to run the full (compiled) project. I think this is a must have feature especially for level designers, currently he has to wait for the programmer to add the code/script to load the new scene (compile and send the EXE to the designer).
  3. In the editor, when you have a camera selected, it would be very useful to have a floating window where you can see the actual camera render preview. It would help to position the camera exactly as you like without having to play/stop ten times to adjust the view. Also another useful feature would be to add a command in EDIT menu to align the current view to an objected selected in the scene (and reverse, that is align an object to the current view).
  4. Personally I would move the camera towards the target (player) until no collision is detected (if it ends up to be too close to the character then would switch to 1st person as well) and also at defined close position I would switch the material of the character to use an alpha transparent shader so you won't have the view blocked by your own character. It's not something I did in LE till now (but may be I will give it a try) but this is something I'm used to do elsewhere.
  5. What is the GUI library you're using in the screenshot?
  6. PDB files contain debugging information, since it is OS specific (and most of us haven't these files in our OS) then you're having these warnings. But you can completely ignore them, if you don't want these warning when building in debug configuration then you can try to add the following line in your "main" file to disable only this warning: #pragma warning (disable : 4099) I don't know if this workaround works only on VS, may be it is.
  7. So it was a bug, I though it was me doing something wrong here
  8. It's not a problem with animated characters since I had same issue with primitives. I hope it will be changed so that we'll not be forced to have an empty script or having mass. Also having a callback for each entity is definitely not needed, it would be much better to have an Entity::Find to search for an entity by name among all the currently active entities (indipendently from having loaded a map or instanced through code), but leaving a callback to be called after the map has been fully loaded (that is all its entities loaded, not one by one that is unuseful if we had a generic Find).
  9. Yes I printed to console the values of move and mass and they're correct but PhysycSetPositions does not change the position there
  10. I have a prefab for my player like this: http://imageshack.us/f/46/leplayerprefab.png/ "Player" in the hierarchy is a pivot, while the SKIN_MESH is the barbarian .mdl, with mass 0, since the real physics properties are set on the pivot. The prefab is loaded of course through Prefab::Load and I'm trying to use PhysicsSetPosition and PhysicsSetRotation to move it around by key presses: float move = 0; float turnspeed = 2 * Time::GetSpeed(); if (App::instance->window->KeyDown(Key::Up)) move = 2; else if (App::instance->window->KeyDown(Key::Down)) move = -2; if (App::instance->window->KeyDown(Key::Right)) movement.y += turnspeed; else if (App::instance->window->KeyDown(Key::Left)) movement.y += turnspeed; Vec3 pos = model->GetPosition(); model->PhysicsSetPosition(pos.x, pos.y, pos.z + move * Time::GetSpeed(), 0.5); model->PhysicsSetRotation(movement.x, movement.y, movement.z, 0.5); ..but it does not move or rotate. I tried to use similar code with an entity created through code (like in the reference page) and it works there, so what is the problem? Cannot I use this code with a pivot having physics? Thanks
  11. Oh thanks Rick, I'm currently just making tests to see how LE3 works. Cool, because it's like a hack to create an empty script. Also the callback for each child of a model is pretty weird, I think it should be called only on the model root entity (and also the root of other models attached to it by the user in the editor, e.g. when you add a weapon to a character [it's not the case of barbarian since the weapon is inside the model itself]).
  12. I have a map with only 2 cubes, one for the ground and one in the middle of it (no camera, light or anything else, I'm creating the camera through code). When I add the hook to Map::Load to cycle through the loaded entities, it isn't called at all for the cubes. Here is the code: void SceneLoaded (Entity* entity, Object* extra) { string text = entity->GetKeyValue("name"); std::stringstream ss; ss << "Entity: " << text; Print(ss.str()); } Map::Load("Maps/start.map", SceneLoaded); It seems that the callback is not called for any primitives, since I noticed that if I add a directional light, a camera or a model then the callback is called for only these kind of entities. Am I doing something wrong? Are you having this issue too? Also the callback (when gets called) is called for each child of an entity, so in example for the barbarian model the above code prints: Entity: SKIN_MESH Entity: BarbarianPelvis Entity: BarbarianLThigh Entity: BarbarianLCalf Entity: BarbarianLFoot Entity: BarbarianLDigit110 Entity: barbarian_knee_pad_L Entity: BarbarianRThigh Entity: BarbarianRCalf Entity: BarbarianRFoot Entity: BarbarianRDigit111 Entity: barbarian_knee_pad_R Entity: BarbarianSpine1 Entity: BarbarianSpine2 Entity: BarbarianSpine3 Entity: BarbarianRibcage Entity: BarbarianLCollarbone Entity: BarbarianLUpperarm Entity: BarbarianLForearm Entity: BarbarianLPalm Entity: BarbarianLDigit11 Entity: BarbarianLDigit12 Entity: BarbarianLDigit13 Entity: BarbarianLDigit21 Entity: BarbarianLDigit22 Entity: BarbarianLDigit23 Entity: BarbarianLDigit31 Entity: BarbarianLDigit32 Entity: BarbarianLDigit33 Entity: Barbarian_weaponL Entity: barbarian_shield Entity: barbarian_arm plate_01_L Entity: BarbarianRCollarbone Entity: BarbarianRUpperarm Entity: BarbarianRForearm Entity: BarbarianRPalm Entity: BarbarianRDigit11 Entity: BarbarianRDigit12 Entity: BarbarianRDigit13 Entity: BarbarianRDigit21 Entity: BarbarianRDigit22 Entity: BarbarianRDigit23 Entity: BarbarianRDigit31 Entity: BarbarianRDigit32 Entity: BarbarianRDigit33 Entity: Barbarian_weaponR Entity: barbarian_sword_03 Entity: barbarian_arm plate_01_R Entity: barbarian_shoulder pad_03_R Entity: BarbarianNeck Entity: BarbarianHead Entity: bon_gob_war_jaw Entity: bon_gob_war_face Entity: barbarian_helmet_02
  13. I didn't succeed to use VS2012 because of error "LNK2038: mismatch detected for '_MSC_VER'" related to Leadwerks.lib (don't know if I'm the only getting this error, but since I have also VC++2010 installed then I'm currently using it for LE), so I had two choice: go back to the old VS2010 or change project properties/general/platform toolset to "Visual Studio 2010 (v100)". As soon as you succeed to compile the project in Visual Studio you will be able to run from LE editor too.
  14. @panz3r: there is nothing wrong in your request, and I agree that network should be in any nowadays engines, as well as a GUI system in example... but the fact that there isn't still (read Josh's post: we haven't attacked that area yet), does not imply that it will not be added at later stage since it was there on LE2 and hopefully LE3 has more features and not lesser than LE2, I think you have only to wait for it to be fully implemented and released (but I am with Rick on this topic, I'd prefer to better use RakNet than Enet). From here it seems should cost about 103k $ (if I read correct: 50k for the first platform [say Windows] and 17.5k for each additional [Mac+iOS+Android]), that is definitely not peanuts... I remember that it took me few hours to integrate RakNet on LE2 (and I am not a C++ expert), so it should definitely be straight-forward to import it for an experienced C++ guy.
  15. oh nice you're talking about it, I'm waiting for my dev-kit too... they early said would be shipped along April, now May, I hope it will not be delayed again cause I'm too excited to put my hands on it and play with their SDK.
  16. When I start the New Project wizard to create a project, the Project Type list is empty so I cannot create any project: I tried to redownload and reinstall but no luck (it's installed in BOOTCAMP and I'm using it from Parallels Desktop as VM, going to try rebooting in BOOTCAMP). EDIT: even in bootcamp the list is still empty for me.
  17. ZioRed

    Unit Testing

    @Furbolg: About the shape I think Josh's is more usable, in case you need to apply the same shape to more models you'd need to manually create more shapes. Personally I find the current model more usable. YOU should need to know WHEN your object will be released, not whatever method of another class. Just my opinion...
  18. ZioRed

    Unit Testing

    Oooohhhh classes, my loved classes! Cannot wait to play again on LW! I hope you're going to send a newsletter to the current users when it'll be the time to remember us to buy the upgrade, my memory has some leaks most of time
  19. Is it reasonable to expect a beta release (at least for LE2 customers) before the end of the current year? Since few months ago I switched to iMac platform (yes, sad but true I'm starting to love OSX at least as much as Windows that is turned off from that age, and 80% of my current jobs are for iOS and [very] little Android) I'm more excited to try something on this (to me) new platform besides the game engine I'm using at this very moment.
  20. Looks cool, I will give it a try as soon as I succeed to repossess my iPad from my daughter, she even sleeps with it in her hands... probably I'll need to buy new one for me btw I'm curious if is it built in pure ObjC on XCode or are you using an official engine.
  21. Who am I to rebut on this? Of course, it's my vote too, VS2010 (both C# and C++) forever and ever
  22. ZioRed

    Basics

    Cool, thanks for sharing a pathfinding tutorial, I'm sure it will be very useful to many people (including me)
  23. ZioRed

    S-M-R-T

    For some strange reason you're still believing that the goal of a custom editor script is a workaround to the editor itself or the pipeline or both, which is absolutely not. The only reason why custom editor scripts exist in any piece of software is to extend the features to a very specific need, it's not a workaround to the software's developer pipeline or such. Take this as example (even if Niosop already made it clear in his first post): some days ago I changed many times the structure of my scene while prototyping (in another engine, I don't want to advertise it), I changed it so many times that the result was that I created an editor script where I set a couple of parameters to automatically and randomly create the map at all from walls to floors in an indoor scene. This was so specific that of course couldn't be thought or developed by the engine's developer (in terms of development cost against the amount of times/users would use it), but luckily the engine allowed me to completely extend the editor so I could achieve my own needs for that project. It's only an example, but many others could come in mind, not mentioning the chance of business that a customizable editor could bring to a capable licensee who make scripts for editor to help make things easier while prototyping or scene/entities creation. There should be something I'm missing in your reluctance...
  24. Yeah for consistency I find static methods probably the best solution (like it is in LE.NET for LE2), because however I probably will write my own OOP classes for my works with Ctors and properties to replace the weird Create/Load and Get/Set methods
  25. ZioRed

    Greetings

    As usual you are slandering here everything you don't use and without good reason. I am not paid by Unity but I never saw slow games on them, AngryBots that is their demo example (where they use many shaders) and is free of charge on Market runs quite good, I tested it on Android both a smartphone and a tablet and never had significant slow render. I'm sorry that you still didn't learn to not defame Besides this, Aria welcome in "our family", I'm very interested and excited to see what you guys will come on the Android platform with LE3
×
×
  • Create New...