2 questions to Dark Samurai, about ANET

Posted By: Tobias

2 questions to Dark Samurai, about ANET - 04/05/09 13:10

I am currently using the A7 multiplayer system for my FPS but am considering using ANET Pro, mainly because I need to HTTP download files. But I have some doubts about switching my app to ANET, these doubts are caused by comparing the ANET version of Georges MP demo with the A7 version from the lite-c tutorial workshop 25.

Both versions work fine, but the A7 tutorial version is much shorter in code and less complicated than ANET. Also, the players move smoother in the A7 version probably because of dead reckoning. I also have the impression that the A7 version needs less bandwidth than ANET.

So it looks as if my code would become larger and more complicated when I move my FPS to ANET Pro, and I would need to implement dead reckoning in script. So here is my suggestion, can you make an ANET version that mimicks the A7 MP commands? This would make code conversion much easier because then you only had to add "anet_" or something to the commands and it would just be search-and-replace. I think you would attract more customers this way. Also, it would be good when dead reckoning were already implemented in the ANET dll.

Second question, will it work when I use ANET for http file transfer only, but A7 for multiplayer? Or must I switch my multiplayer code completely to ANET when I use HTTP commands?
Posted By: Dark_samurai

Re: 2 questions to Dark Samurai, about ANET - 04/05/09 15:07

Quote:
Both versions work fine, but the A7 tutorial version is much shorter in code and less complicated than ANET. Also, the players move smoother in the A7 version probably because of dead reckoning. I also have the impression that the A7 version needs less bandwidth than ANET.


It's not more complicate (just look into the manual) but it offers you much more. I would compare it with MS PAINT and Photoshop. Paint is easy to use, but if you want to do something complex you will have to use Photoshop.
A DR Template is already finished and will be released with the new ANet version soon (only have to fix one problem, then it will be released).
The bandwidth thing is because the user who converted the AUM example sends the positions of the entities permanently. If you would use DR, you won't have this issue.

Quote:
So here is my suggestion, can you make an ANET version that mimicks the A7 MP commands?


session_open: enet_init_server()
session_close: enet_destroy_host()
sending things: enet_send_var/array/string
update entity: enet_send_pos/flags/skills/angle

You also have the EVENT CONNECTED,... look into anet_set_event().

As you can see, every function that is offerd by gamestudio is also implented in ANet. As I said before, look into the manual. The names of those functions are self explaining.

Quote:
Second question, will it work when I use ANET for http file transfer only, but A7 for multiplayer? Or must I switch my multiplayer code completely to ANET when I use HTTP commands?


Of course you can only use some functions. But be aware that doing a http file transfer is not realy implented in ANet. You can do a HTTP post and receive data this way, but it's not a real file transfer.

You can implement this your selfe with php, by sending the file data through a php script which creates the file.


Something to the usage of the DR Template: All you have to do is to add the script and replace your c_move function by dr_c_move. There is also a HowTo in the new manual that explains the usage of the template.
© 2024 lite-C Forums