RedShooter GNet Demo


Tweet blitzmax gnet multiplayer networking
(Posted 5 months ago) hardcoal

Hi ron.. Im struggeling with networking.. Im tying to understand which path should i go.. there is UDP And TCP.. And GNet..

I want to make like a Server that host multiplayers which path should I Choose?

which direction should i concentrate..?

Btw is the a possibility to add an option to your site that when i get a reply ill get a notifiction on the email?

regards hc, Hope all well at your place

(Posted 5 months ago) markcwm commented:

Hi hardcoal, definitely read Brucey's network tutorial: Introduction and TCP.

I think UDP is for robust stuff but TCP is easier to work with but isn't as reliable for games. Brl.Gnet is a system based on Enet which is based on UDP, there are few examples to get you going. The code here is ported from Blitz3d and I think there the server was named Gnet, it uses TCP from Brl.Socket which also supports UDP.

(Posted 5 months ago) hardcoal commented:

Hi thanks, Do you need an external server or you can make your own server?

you must understand.. i know nothing of networking so i may ask silly questions :)

but once ill get it ill rock i believe :)

meanwhile ill check holy brucey stuff.

Once i get it, i promise to simplfy it.

[--we all have obligation to contribute to this world--]

(Posted 5 months ago) RonTek commented:

Thanks HC, adding to Mark's info, external means if you are going for a rented VPS service somewhere like AWS, Azure or Google Cloud among others setup your own pc/system running 24/7 as server.

Btw is the a possibility to add an option to your site that when i get a reply ill get a notifiction on the email?

That would be possible, but it will be redundant and subject for abuse in the long run. Imagine someone just messing up with your server and this will in turn flood your inbox with email notifs.

What I can do is update the server script as soon as I get a chance, so it can support it and you can set up your own GNet service with that option and tons of free hosting service out there.

Stay safe guys!

(Posted 5 months ago) markcwm commented:

Yes, the Gnet code here used the Blitzbasic.com Gnet server which, from my memory stored all current users in slots of game id, server id, ip address, and you could decide what data to send to each slot, it was designed for peer-to-peer systems where the ip was needed just for the game hoster, then that was shared to any other game id joiners and typically then disconnected from the server when whatever connections wanted were made.

Yes Brucey's tutorial is just for TCP but worth a read as it explains sockets, I think it's the only sockets tutorial in Blitzmax. Also there's a Short Gnet tutorial by deps which is pretty good.

(Posted 5 months ago) hardcoal commented:

what i dont understand is.. is this Gnet dependent on a server or can i make my own server.
and if so.. how can i give my address to other computers around the world..
or is it only local.. or dependent on blitz server and so..

(Posted 5 months ago) hardcoal commented:

ok i must report of great success of understanding how it works.. at least to the point of local server..
I still need the question on the previous post to be answered though.

what i managed to do is to simplfy it.. so soon im gonna post the easiest network gnet method ever..
part of my talent is to simplfy things.. :)

many times programmers have the problem of not giving a simple clear example because they are so used to their own high level methods of programming.
they dont see it from the eyes of a beginner ..
for example ... they write PX instead of PlayerX or PV instead of PlayerValocity ..
those simple things are very confusing for someone who has no clue whats going on a new topic he does not understand..

(Posted 5 months ago) RonTek commented:

That's great to hear HC! I agree and to answer your question:

how can i give my address to other computers around the world.. or is it only local.. or dependent on blitz server and so..

That is what the PHP master server script is for and not limited or can be ported to other languages.

(Posted 5 months ago) hardcoal commented:

hi, thanks, but my question is.. can i use gnet commands to make a game that can be played around the net?

about what i promised.. well im working on making it cool.
now its already work.
but im learning, improving.. etc.. worth wating i believe.

offcourse im not an expert, so i hope i dont build false hopes lol :)

after ill finish i will be glad if you can improve it.. because as ive said.. im newbie with all the concerns networking and in general in some terms

(Posted 5 months ago) RonTek commented:

can i use gnet commands to make a game that can be played around the net?

Yes, but it will still depend on your networking setup. Is it client/server based or peer to peer? client/server is usually used by multiplayer games or MMOs where you put up servers 24/7 that waits for clients while p2p would need one player pc to start and host the game and the rest will join the connection.

For GNet it will be much easer going for the client/server route as p2p is a bit advanced to tackle particularly if you are new to networking.

(Posted 5 months ago) hardcoal commented:

Ive almost finished my demo.. two days ago.. but im struggeling with one thing i cant solve so far..
Ill try a bit more.. if i wont succeed ill post the code as it is.

I think there are some thing i dont understand about Gnet..

I thought Gnetobjects can be shared on a server.. but im not sure they do..
I think u can only comunicate with another gnetobject but not share same object. Yea, should be basic, but now im getting it. lol :)

(Posted 5 months ago) hardcoal commented:

OK.. here it is..

Check it out.

Took me 10 mins to make the game and 2 days to solve the Data nagotiation problem.
I wasnt planing making a game out of it, but now, im starting to think to turn this into a game.
if that what i can do in 10 mins.. imagine what i can do in 10 hours :P
Ill probably make it a little game, why not..

In order to play it, you only need to run it twice.. or you can open more windows for more players..

Cheers..

Please let me know if i did things right.
and fix me where im wrong. as im new to Gnet! things

https://drive.google.com/open?id=1TSTB6WFBL-6KB8zHZ1Z1uSUkQg7tM7O2

(Posted 5 months ago) RonTek commented:

Hey HC, demo looks great! I also like how the code is structured and easy to read

..and possibly can make its way to a mode and in the code archives?

PS: Since this is turning into a new discussion and demo apart from the GNet Blitzmax code archive thread, I have moved your reply question to your own new thread, you can still edit the title if it does not fit. cheers.

(Posted 5 months ago) hardcoal commented:

thanks man. now that ive passed the struggeling faze. i can improve it and make it even easier..

eventually the funny thing is, that what im eventually ending, is with making a new engine :p

(Posted 5 months ago) RonTek commented:

Great to hear. As for the attachment, sorry HC we can't allow attachment from other forums. only file upload service, it's more stable and appropriate for file attachments.

I have uploaded it in on tinyupload at the moment.

and you can retain the same link using Google drive as we already discussed about that. cheers.

(Posted 5 months ago) hardcoal commented:

Ok I removed the link.. I wanted to have a single source thats what I thought its a good Idea. but I understand now..
I dont know how to retain the same google link.. i dont recall discussing that. but anyway.. ill find a solution .. thanks.

Im sorry ron. due to my screen problem, i read stuff very briefly, so i may miss some stuff.
and im always concentrated on what i do at that exact moment.
if this was a paper post i would not miss a thing.
but when it come to screens , im in constant struggle, because screens arent good for me.

so i may repeat some things..

as soon as i get to some point i need . i will ask about it.

Now im working again to make it like an engine.. but with no map editor crap..
just strict programming..
i want to make a framework that will be easy and clear for people
and that people will improve it later on.
Its based on the same idea of my GameEngine.. so alot of my ideas are coming from there.

(Posted 5 months ago) RonTek commented:
(Posted 5 months ago) hardcoal commented:

Hi..
After ive succeded making it work in 2D, Now Im moving to 3D.
I need to almost start all over (a bit frustrating,but ill manage) ..
and Eventually It always turn out that Im building an Engine. (Gees)
But no worries, Im not going to get deep as I have on my Main GameEditor.
ill Try just to do what is neccecary for my corrent project.
I will also copy code from my GameEditor. so this GameEditor turned to be fruitful after all :p

I just took time to learn other things and by that know where Im going.

Also I finally found a OpenB3d Commands but.. I dont understand.. I dont see the usual commands like PositionEntity.. etc.. the B3D ones..

but ill manage

(Posted 5 months ago) RonTek commented:

After ive succeded making it work in 2D, Now Im moving to 3D. Eventually It always turn out that Im building an Engine. (Gees)

Sounds great.. I kinda expected that would be the case again

Also I finally found a OpenB3d Commands but.. I dont understand.. I dont see the usual commands like PositionEntity.. etc.. the B3D ones..

you can't miss it, they should be there..

https://github.com/markcwm/openb3dmax.mod/blob/master/openb3dmax.mod/inc/functions.bmx#L1697

most of the functions are also methods with OpenB3DMax such as PositionEntity

something like...

Cube:TMesh = CreateCube()
Cube.PositionEntity 1,1,1

https://github.com/markcwm/openb3dmax.mod/blob/master/openb3dmax.mod/inc/TEntity.bmx#L651

(Posted 5 months ago) hardcoal commented:

Thanks Ron. the file mark gave me was without all the commands.
I was expeting an html or chm file
I didnt think there is a single bmx file with all commands..

maybe I dont know how to use bbdocs?
I dont know..

one more thing. your server make many times errors.
so when i type something i sometimes have to retype it because of some server error..
Just informing you
Yea im editing my posts many times I know :)

About the Engine..
I think everyone when he makes a game is creating an Engine, in inevetable.
But my mistake was that I started with a GameEditor Instead of Starting with a Game.

Many if not all Engines you know today, began with making a game. Unreal, Quake..
But this time im not gonna make same mistake Ive made. Ill keep it more simple :)
The thing is, many times I really got it right on my Engine.
I may go and modify my Engine at one point

(Posted 5 months ago) RonTek commented:

Sounds great. We do have some intermittent server problems lately and so I will be rolling out a Draft Post feature asap to address this issue and for more convenience.

In the meantime, save it on something like notepad then just copy and paste.

(Posted 5 months ago) hardcoal commented:

Its a bit frustrating making stuff youve made again. but in this case its better..
If im expressing myself alot, you should be glad, because its a good sign that im doing stuff
Ill try to control myself.. ;)

Reply To Topic (minimum 10 characters)

Please log in to reply