rincewind Posted March 26, 2005 Share Posted March 26, 2005 (edited) Hi, I added a preliminary simulation engine allowing missions on the globe to be executed. Currently there is only one type of mission implemented. That is VisitMission which goes to a particular point and returns to the starting point.If you want to try it out, grab the lastest SVN-checkout and in planetview use the console to execute the following command: Simulation.spawnVisit(, , , ) Latitude and Longitude are Geocoordinates in degrees. If you are unsure of what to put, just use thisSimulation.spawnVisit(0, 0, 51, -7)to have it pay a visit to my home town :-) After you are done playing with it, comment on the design of the Simulation stuff. Greetings, Rincewind Edited March 26, 2005 by rincewind Link to comment Share on other sites More sharing options...
Penta Posted March 26, 2005 Share Posted March 26, 2005 Long/Lat use pretty large degrees, in the 1000s of miles. Does the engine support minutes and seconds of Longitude/Latitude? Link to comment Share on other sites More sharing options...
rincewind Posted March 26, 2005 Author Share Posted March 26, 2005 Long/Lat use pretty large degrees, in the 1000s of miles. Does the engine support minutes and seconds of Longitude/Latitude?Just use floating point values. I know you have to do the calculations from minutes to fraction yourself, but it makes it a lot easier for the calculations Rincewind Link to comment Share on other sites More sharing options...
rincewind Posted March 29, 2005 Author Share Posted March 29, 2005 Update: For those interested, there is now an overmind AI as well. Admittedly, it's not very smart (just spawn an ufo mission to a random location on average once a day), but at least you no longer have to type to have something moving. Also, this shows off the lua scripting capabilities that guyver implemented. Take a look at ai.lua in data/scripts/ directory, should be pretty straightforward to edit if you want. Basicly the overmindCallback function gets called each game-tick with the number of seconds in gametime that have passed since the last call. Thats it for now, I'll try to keep you up to date on my progress. Rincewind Link to comment Share on other sites More sharing options...
red knight Posted March 30, 2005 Share Posted March 30, 2005 Excelent work you two... =d I need an update, that is for sure from the Prg department. GreetingsRed Knight Link to comment Share on other sites More sharing options...
SupSuper Posted April 1, 2005 Share Posted April 1, 2005 it seems that the "overmind AI" sometimes generates invalid longitude values, as i get this error from time to time. Link to comment Share on other sites More sharing options...
rincewind Posted April 1, 2005 Author Share Posted April 1, 2005 it seems that the "overmind AI" sometimes generates invalid longitude values, as i get this error from time to time.I couldn't immediatly see any error. I improved the exception text to report the actual number that caused it. Can you update and post a new screenshot once you get it again. Somehow it wouldn't show here... Thanks, Rincewind Link to comment Share on other sites More sharing options...
kamikazejay Posted April 2, 2005 Share Posted April 2, 2005 it seems that the "overmind AI" sometimes generates invalid longitude values, as i get this error from time to time.<{POST_SNAPBACK}>I couldn't immediatly see any error. I improved the exception text to report the actual number that caused it. Can you update and post a new screenshot once you get it again. Somehow it wouldn't show here... Thanks, Rincewind<{POST_SNAPBACK}> This is the exception I got. Hope it helps. Link to comment Share on other sites More sharing options...
rincewind Posted April 2, 2005 Author Share Posted April 2, 2005 it seems that the "overmind AI" sometimes generates invalid longitude values, as i get this error from time to time.I couldn't immediatly see any error. I improved the exception text to report the actual number that caused it. Can you update and post a new screenshot once you get it again. Somehow it wouldn't show here... Thanks, Rincewind This is the exception I got. Hope it helps.Thanks for the help. I fixed it. It wasn't even in the AI code, but in the low-level stuff inside geoposition. Thats what threw me off in the beginning. Greetings, Rincewind Link to comment Share on other sites More sharing options...
Beetle Posted April 13, 2005 Share Posted April 13, 2005 I just noticed that on my cosole: 19:10:22: [INFO] xenocommon.console - Lua error: ...ty/Xenocide/xenocidegame/data/../data/scripts/ai.lua:18: attempt to index global `StaticData' (a nil value) Unfrtunetly random craft doesn't show up now Greetings,Beetle Link to comment Share on other sites More sharing options...
rincewind Posted April 13, 2005 Author Share Posted April 13, 2005 I just noticed that on my cosole: 19:10:22: [INFO] xenocommon.console - Lua error: ...ty/Xenocide/xenocidegame/data/../data/scripts/ai.lua:18: attempt to index global `StaticData' (a nil value) Unfrtunetly random craft doesn't show up now Greetings,Beetle Hmmm, I assume when Simulation was switched to new Singletons, someone forgot to do the lua-registration in the constructor. I don't have my dev-machine here, so I can't look right now. rincewind Link to comment Share on other sites More sharing options...
Beetle Posted April 13, 2005 Share Posted April 13, 2005 Simulation is still old type singleton, strange becouse it works few days ago. Beetle Link to comment Share on other sites More sharing options...
rincewind Posted April 15, 2005 Author Share Posted April 15, 2005 Simulation is still old type singleton, strange becouse it works few days ago. BeetleI'll take a look at it tonight. Rincewind Link to comment Share on other sites More sharing options...
Recommended Posts