Kent747 Posted March 23, 2003 Share Posted March 23, 2003 masking is a way of using logic And Or and Nots to store more data in a variable and combining that with shifts for example you could store 255 booleans into a short. by using an OR this is the mask 000000 or a boolean then left shift (assuming true) 000001 or another boolean (assuming its true) 000110 if thereis a false the next would b 001100 i'd suggest reading on this elsewhere its kinda a low level topic.. learned a lot about it in my assembly class... its an easy way to compress data.... alot of programs use flags this way i believe the common dialog control makes use of this, which makes me think its possible in vb... Kent Link to comment
Gtatari Posted March 23, 2003 Share Posted March 23, 2003 ahh i see. well if thats possible in vb, ive not learned of it Link to comment
Gtatari Posted March 23, 2003 Share Posted March 23, 2003 here we go, this looks about right: http://www.logicalexpressions.com/vbtip02.htm masking in vb! - i think. you know more, see if thats correct Link to comment
Kent747 Posted March 23, 2003 Author Share Posted March 23, 2003 yup thats the idea.... its pretty ingenious when it works though its typically done to put one smaller simple data type into another larger simple data type emphasis on simple... wont work for arrays or custom types... i think the way to go with this is to find a control that is polymorphic... im sure its out there for vb and i doubt it'd be a huge overhaul of their code.. either way its necessary Link to comment
Gtatari Posted March 23, 2003 Share Posted March 23, 2003 or just use C heres i thot: write a quick c program that handles all the internet related stuff, and have the MTA VB program interact with that.. the C program is like a control in a way. this way you would have uber-fast no lag sending becuase its in C, and you have the MTA program working as it should. the only thing is, im not sure if you could do that type of interaction. im pretty sure its possible.. since MTA is interacting with GTA3 Link to comment
Kent747 Posted March 23, 2003 Author Share Posted March 23, 2003 thats perfect.. hopefully somebody could forward this to the dev guys... then implementing the "Circle" method we debated on, would be cake.. and extremely fast.. I think the hardest part is getting GTA3 to make cars/peds for the whole city... since by normal routine gta generates them as you move through the world... could possibly call whatever function generates those w/ "hotspots" placed in a gridlike manner... these would act like players to the Server's game.... but not actually be players.. just something to trigger the function call to generate cars/peds Im sure there is a better way... its just something that hasnt really come up either.. Link to comment
Gtatari Posted March 23, 2003 Share Posted March 23, 2003 ya. there almost always is a solution even if you have to spend 10 hours debugging. so you saying that the server keeps track of all the cars.. and based upon what part of the grid your on, it spawns the cars the server has there? still the whole display buffer thingy. if you think this is a good idea (i do, but no need to rush into it, perhaps after MTA is futher in dev), but anyway, try PM'ing IJsVogel see what he thinks about it (if you do, explain both threads) Link to comment
Kent747 Posted March 23, 2003 Author Share Posted March 23, 2003 as far as the display buffer goes, the only way around that may be to change that number on the server version.... also there has to be something in gta to say a certain car must always be displayed.... (look at the cop vigilante mission for example..) regardless of whatever other traffic is going on... that car IS displayed.... server may have to do that w/ a bunch of cars?? iuno exactly how that would work... the dev team would need to figure that one out.. because they actually understand how the game works. I'll look into socket programming in C, i actually haven't tried that before.. i'd like to learn it.. i'll need it if i ever get to writing the netcode for the game im working on... all i have now is a 3d opengl engine that displays any number of models facing any way.... don't have any physics code to actually move them around... i can fire the idea to IJsVogel, however im not sure exactly how to explain the whole concept... Kent Link to comment
Gtatari Posted March 24, 2003 Share Posted March 24, 2003 oic. i know what you mean about the car always beeing shown. heres my theory: it makes the buffer 31.. so when it loads traffic there is a maximum 31 cars.. one is reserved for the criminal. good luck with ur game, make GTA4 Link to comment
Kent747 Posted March 24, 2003 Author Share Posted March 24, 2003 yeah.. and if the display buffer can be changed, could it be set to a really large number?? It'd make the game on the server run like poop but the server could basically be running just for the purpose of making the game playable.. (doubt a dedicated version can ever be written.. as its so interdependent on code already written in GTA3. i dunno there may be other options possible... Link to comment
Recommended Posts