Jump to content

Charrua

Developers
  • Posts

    247
  • Joined

  • Last visited

Everything posted by Charrua

  1. Hi, much time from my last post I have been testing UAK and Leadwerks, al right from VS running release and debug versions and from Leadwerks editor. I decided to publish a standalone, just for testing and it crashes. I guess that the problem is when I try to call a map entity´s function from cpp. If I place de uak1.debug.exe in the published folder, the last System:Print i saw is: "scanning entities": System::Print("scanning entities ..."); for (auto iter = world->entities.begin(); iter != world->entities.end(); iter++) { Entity* entity = *iter; if (entity->GetKeyValue("name")!="") { System::Print(entity->GetKeyValue("name")); if (hasFunction(entity, "dayNightTest")) { System::Print(" found entity dayNight"); dayNight = entity; //dayNight->CallFunction("dayNightTest"); } } } The function "hasFunction" test if an entity has or not a particular function defined and I guess the problem is there, not shure and do not know why. I commented the line: dayNight->CallFunction("dayNightTest"); because the "dayNightTest" function only has a System:Print on it, for debugging purposes. bool hasFunction(Entity* e, string funcName) { if (e->component == NULL) return false; bool success = false; //Get the component table int stacksize = Interpreter::GetStackSize(); //Get the global error handler function int errorfunctionindex = 0; #ifdef DEBUG Interpreter::GetGlobal("LuaErrorHandler"); errorfunctionindex = Interpreter::GetStackSize(); #endif e->Push(); Interpreter::GetField("script"); //test if entity has a script if (Interpreter::IsTable()) { System::Print(" entity has script"); Interpreter::GetField(funcName); if (Interpreter::IsFunction()) //test if funcName is a function { System::Print(" " + funcName + " defined"); success = true; } else { success = false; System::Print(" " + funcName + " not defined"); } } Interpreter::SetStackSize(stacksize); //keep stack under control return success; } Link the complete project (zip file): https://drive.google.com/file/d/1OWD4I8zAEZsLyKPOAl53VNTACxwyj4yR/view?usp=sharing BTW, it creates slider for the many controls the dayNight prefab has, here a picture of it running: Thanks in advance Juan
  2. Starting to work with UAK and Leadwerks Testing sliders c++ side sending values to lua script "daynignt.lua"
  3. I got it vía kikstarter, I received a beta 4 months ago. It shows on steam (today) but is on "coming soon state", I have received steam and leadwerks key, but I don't have any download link. How do I access the official 1.0 release? Thank's
  4. congrats, yea, joints are very interesting, some time ago, with blitz3d+jv-ode i did some interesting things... some of them i try to re-do in leadwerks: cars, and some transporting bels, forklift etc. guess i upload that some where... utility_cars.zip
  5. congrats it is just two motorized hinges? or some vehicle feature? haven't had time to play with leadwerks new features...
  6. Yes, that's the point. And, here, money do not reach aceptable levels. I mean, yes third world but not the worst country mine, but our army has few resources and this kind of equipment is a must at first training stages. I and my friend did the development with our money, now waiting for burocracy to get some bucks
  7. Well, finally, a job done! This is the press note of the military news youtube channel: On July 26, the "Comandos" day here in my country (Uruguay, I know no one knows what or where it is, so from where I am, but is fine was te official inauguration of a Shoot Simulator I been working on. (Attached a cut, with the part in which the simulator appear, simply a flash ) I made it with the Professional Edition of Leadwerks as a standalone app. on Ubuntu 16.04 The systems uses some not traditional Game/Software hardware, made by me and a couple of people like me, who works in the metalurgical industry. We receive real guns, insert on them sensors and actuators to simulate the real behavior of them. An infrared laser on it, is detected by a couple of special cameras wichs only sees the ir dots of the guns, then with some math, I translate the IR camera coords space to Leadwerks 3D world projected and seen for us. Turn on a laser of one gun, read the coord seen by the cameras (if any) and repeat for each gun is made by a main microcontroller that is in comunication with the microcontrollers on each camera. The main micronontroller also reads the gun´s sensors to know when a shoot is done and if it is ok to simulate a shoot or not, based on it the gun was reloaded etc.. State changes and camera coordinates are transimted to de PC and Leadwerks do the rest Attached some pictures, some commented, with relevant and not so relevant things Juan simuladorDeTiro.mp4
  8. Hi Alien, I'm also somewhat lost.. going back, nice to hear about you.
  9. Yes, so excited to see it almost finished. Guess next month will be installed and working... And perhaps I'll see some money
  10. Not yet, but, if the project continues, it should be a next step or something to take into consideration. A 360 degrees detection system should be possible, but, more complex and expensive
  11. He he, me too! This video is of a couple of years when we build the demonstration prototype. test4.mp4
  12. It's more hardware than software, leadwerks part is to have something to shoot :). Guns have infrared lasers, a camera system detects where the gun is in the screen, then with some maths to translate corrds to leadwerks, a camera pick, and that's it. Simply put. Electronics simulate the gun behavior, and as you will see, I'm not an expert RECORTAR_20190410_105041.mp4 RECORTAR_20190410_104628.mp4
  13. drives were mounted but as ro, did a mount -o remount rw / then nano .xsessionrc delete the "shutdown..." line and voila... all is working again thank you very much
  14. well, now I have another problem, my bad i placed a shutdown line after gedit, to test if the systems shotsdown after gedit, and found that the system start and shutdown (no gedit) is there a way of intercept startup and open a terminal so I can delete the .xsession file? thanks
  15. well, if i place a .xsessionrc file with: then ubuntu starts, exec gedit and gedit open the pj01.sh file located in the above directory but if, instead of gedit i place ./pj01.sh then LE app do not start
  16. Thanks, I'll try it as soon as I get home.
  17. the thing now is how or from where I execute this script, because if i launch it from .config/autostart it start the leadwerks app, but do not shutdown the system my idea was that turning on the PC the app autostart and when quitting it, the system shutdown Is there other way to autostart an app?
  18. Ah, ok! yes, now, it shutdown if i run it from a terminal not if I use the .desktop shortcut this is the pj01.sh now
  19. thanks, but nope if i open a terminal and execute the pj01.sh script, the leadwerks app starts ok, and after it, simply the terminal again last line of leadwerks throws : AL lib: (EE) alc_cleanup: 1 device not closed then, the propmt. (and, no other command on the script seems to be executed)
  20. i placed a "ls" instead a shotdown, but nothing is executed after the leadwerks app
  21. thanks for answer i have this file in .config/autostart also works with: and the pj01.sh is: i write the line after exec, but after pj01 ends, system do not shoot down if I open a terminal, shutdown -h now, works ok i try other combinations but, due to my lack of knowledge on the subject... i somewhat lost and with the !bin/bash Juan
  22. Hi, it's been a long time from my last post here I'm finishing a Leadwerks program on ubuntu 16.04, not a game, is a 3d graphical interface for a "Shoot simulator" with real (modified) guns. I'm so novice with linux, so after some reading i got the application run at startup. This application is the only one which will run on this pc, so it should start at startup and the system should shootdown when quitting from the application. (after try and pray many times... ) Basically i end placing a .desktop file in .config\autostart directory with a exec command to the leadwerks script to run the project file, so simple once one get to know how I guess that, i can place a shootdown command on the launch script, but I did not find the way, all my readings point to: shootdown -h now (edit: i mean.. shutdown not shootdown) but, i guess i'm not doing, writting, placing it in the correct way. Some linux expert here? Thank's in advance Juan
  23. i do like the way the cars behave at low speed with leadwerks physics, but, as speed rises it shakes so much, so for omega i was using something like: self.entity:SetOmega(omega.x/(1+2*currentSpeed/maxSpeed),omega.y/(1+currentSpeed/maxSpeed),omega.z/(1+2*currentSpeed/maxSpeed)) this way, i use the omega practically unaltered at low speed and then as speed rises and goes near maxSpeed, the x,y,z components are modulated playing with the 1+2* or 1+1* or 1+5* i get more or less attenuation on desired axes. I do not play with your car, stiil, I will for sure, in the video it looks and behaves very well, but so much rigid at low speed (for me ) the x5 is still in my mind.. will try, thank´s for sharing all this stuff
×
×
  • Create New...