Wojak Posted December 7, 2011 Share Posted December 7, 2011 Na attempt of creating a traffic resource from scratch – not random, but just something to add some spice to the maps I think I solved the biggest problem (a relatively cheap way of syncing them undependably of any client), but it needs some tweaks and a user friendly (idiot proof) user interface in map editor Link to comment
Castillo Posted December 7, 2011 Share Posted December 7, 2011 Nice one, are you going to release it? Link to comment
12p Posted December 7, 2011 Share Posted December 7, 2011 Good job. But I hope you won't release it, in fact. Link to comment
Jaysds1 Posted December 7, 2011 Share Posted December 7, 2011 lol, it's his choice, unless you can convince him to not release it. Link to comment
12p Posted December 8, 2011 Share Posted December 8, 2011 I didn't say "DON'T RELEASE IT", I just said I hope he won't. It's OBVIOUSLY his choice, jay. Link to comment
karlis Posted December 8, 2011 Share Posted December 8, 2011 unlike complete gamemodes i think this should be released,after all its more of a tool for better maps in general, and adds possibility to be creative. good work. Link to comment
diegofkda Posted December 8, 2011 Share Posted December 8, 2011 unlike complete gamemodes i think this should be released,after all its more of a tool for better maps in general, and adds possibility to be creative.good work. I think that too, it's not a simple good script, it's a tool that should fix Community questions. Link to comment
Wojak Posted December 8, 2011 Author Share Posted December 8, 2011 to release it, I need to add the proper editor interface, and maybe some exported functions and events and of course testing... (currently i tested it with two players online including me) I can just say that it will not be released in 2011 Link to comment
karlis Posted December 8, 2011 Share Posted December 8, 2011 you could implement a accelerate release on a sharp turns so bots can make the turns without going away from road. Link to comment
Wojak Posted December 8, 2011 Author Share Posted December 8, 2011 thank You for the idea, I've implemented it and it's a bit better, but every vehicle has a diferent mass (and inertia) so they react diferent on the curves (i don't want to over complicate it though) Link to comment
12p Posted December 8, 2011 Share Posted December 8, 2011 That doesn't really matter, and gives the impression of "realism" (if every vehicle would turn exactly as the others, would be VERY unrealistic, drivers are not all clones of the same person). Link to comment
karlis Posted December 8, 2011 Share Posted December 8, 2011 (edited) i didn't test it, and there's some probability i left in some silly bug, but this could improve the driving alot by emulating float control. local controls={} local realcontrolvalues={} local controlframecount={} function emulateAnalogControl(ped,control,float) if not controls[ped] then controls[ped]={} end if not realcontrolvalues[ped] then realcontrolvalues[ped]={} end if not controlframecount[ped] then controlframecount[ped]={} end realcontrolvalues[ped][control]=getPedControlState(ped,control) and 1 or 0 controlframecount[ped][control]=1 if float then controls[ped][control]=float else setPedControlState(ped,control,false) controls[ped][control]=nil realcontrolvalues[ped][control]=nil break end end addEventHandler('onClientRender',root,function() for k,ped in pairs(controls) do for n,control in pairs(ped) do local tempavg1=(realcontrolvalues[k][n]*controlframecount[k][n]+1)/(controlframecount[k][n]+1) local tempavg2=(realcontrolvalues[k][n]*controlframecount[k][n])/(controlframecount[k][n]+1) if math.abs(tempavg1-control)abs(tempavg2-control) then setPedControlState(ped,control,true) realcontrolvalues[k][n]=tempavg1 else setPedControlState(ped,control,false) realcontrolvalues[k][n]=tempavg2 end controlframecount[k][n]=controlframecount[k][n]+1 end end end) PS: higher fps=more accuracy Edited December 9, 2011 by Guest Link to comment
Wojak Posted December 9, 2011 Author Share Posted December 9, 2011 i didn't test it, and there's some probability i left in some silly bug, but this could improve the driving alot by emulating float control.--script-- PS: higher fps=more accuracy I know it's not a bug, but I don't like the look of a double for loop in onClientRender handler function and the idea of running it on all clients at once... for me: more operations per second = lower FPS (I think not only for me) If i find it necessary, i will come up with somthing more efficient (less accurate, but hardly noticeable) btw, where is the "ped" table? btw2, thank you all for positive comments Link to comment
karlis Posted December 9, 2011 Share Posted December 9, 2011 ped is a table in main table, which contains all controls that you're going to handle. if you're using this of accelerate and brake buttons, with 10 peds syncered per player, it'll be 20loops only. and, as you see you're not forced to call the func for all players, just the syncer. Link to comment
Wojak Posted December 9, 2011 Author Share Posted December 9, 2011 i'm quite happy with the small vehicles behavior, however the big, heavy ones will need some more attention (they just need to take the curve sooner) i think i will also test some other vehicle types (boats and trains) My test server should be open tomorrow at 18:00 Warsaw time (search for "wojak" in the server browser) Link to comment
karlis Posted December 10, 2011 Share Posted December 10, 2011 is test over, i kind of forgot Link to comment
Wojak Posted December 10, 2011 Author Share Posted December 10, 2011 it's on! it should be on for 2 howers from now (even if I'm not on line) Link to comment
karlis Posted December 10, 2011 Share Posted December 10, 2011 so i tested it, and indeed the problem is nothing else then sync and bandwidth. with even few cars the syncing is bugging out seriously, no velocity seems to be applied at all. Link to comment
Wojak Posted December 10, 2011 Author Share Posted December 10, 2011 from my perspective, when other player was the suncer, the velocyty was synced, but updated every half second i think it would look better on dedicated server, and the only thing that need to be synced manualy are left and right controll states Link to comment
qaisjp Posted December 24, 2011 Share Posted December 24, 2011 How is the editing interface? You should make it similar to how rcg has made it, except the waypoints is only shown at the spawn point and when you click on the spawn point it shows all the waypoints connected to it. Link to comment
Wojak Posted December 25, 2011 Author Share Posted December 25, 2011 How is the editing interface? You should make it similar to how rcg has made it, except the waypoints is only shown at the spawn point and when you click on the spawn point it shows all the waypoints connected to it. I'm considering creating an independent tool for making the paths, I think it will be esier to restrict some element propertys that way, but the maps will be in the standard map editor format though. Link to comment
Stijger Posted March 4, 2012 Share Posted March 4, 2012 It really looks Awesome dude, how is the progress going on this? (oh and love the Hunter Bot also) Link to comment
Wojak Posted March 5, 2012 Author Share Posted March 5, 2012 It really looks Awesome dude, how is the progress going on this? not as fast like I would like, but forward recently I've designed the GUI layout of the interface, and started to script the buttons (i want to sync the GUI in all clients, so it looks like the patch creator may be more complicated than the interpreter part) Once the patch creator is done, i can get back to the interpreter, and it should be down hill from there Link to comment
Stijger Posted March 5, 2012 Share Posted March 5, 2012 Glad to hear you are still working on it. If you ever need a tester or anything, just let me know. Would love to help in any way possible . Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now