Game Server - Client Userlib

Blitz3D Forums/Blitz3D Userlibs/Game Server - Client Userlib

eng_harvey(Posted 2016) [#1]
Hi,

I have only been using Blitz3D for a couple of years to teach game programming and found it useful to quickly develop tools for creating games.

We are creating a Game Server tailored to Blitz3D - included will be a userlib for connecting - the easier the better . . .

-------- The old topic . . . still looking forward to this . . .
I am in the process of creating a userlib to use DirectX 10. I am wanting to find out if anyone else might be interested in using it; if so I will provide links and whatever necessary for everyone - I will use a license similar to public domain.

Also; off topic - I have dived into the Blitz3D source and would like to create a fork that supports DX 10; if enough interest exists.

I am very interested in creating a DX 11 software set too. I am using DX 10 due to the graphics card I am using for the dev machine - if enough interest exists I will upgrade out of the goodness of my heart to do a DX 11 capable card.

I have plenty of experience with this sort of thing - compilers and OS's etc.

Your thoughts would be appreciated - I am busy but organised and have been monitoring these threads since I started.

The userlib is a definite but the Blitz3D fork will count on the amount of interest I get back for the dll.

All the best!


Guy Fawkes(Posted 2016) [#2]
Uh, bro. I hate to burst your bubble, but Ploppy's already done it.

~GF


Guy Fawkes(Posted 2016) [#3]
http://www.blitzbasic.com/Community/posts.php?topic=105010


eng_harvey(Posted 2016) [#4]
I thought Ploppy's was DX9 - nevermind my mistake.


eng_harvey(Posted 2016) [#5]
Next question is how to delete posts. I can work that one out though. Thanks!

Thanks for the link!


Guy Fawkes(Posted 2016) [#6]
No problem :) You don't delete posts. You edit them with a "."

~GF


eng_harvey(Posted 2016) [#7]
Ah thanks for that - I feel bad for wasting post space now.

:)


Guy Fawkes(Posted 2016) [#8]
Ah, no worries. You're new :)

Welcome to the boards btw.

I've been a long time member for over 7 years here.

~GF


eng_harvey(Posted 2016) [#9]
Thanks a heap - I thought I would make the offer as I was following an older post of Ploppy's regarding his DX 9 userlib - I am happy to see the community taking good care of itself and supporting Ploppy.

I would be still interested in reworking the Blitz3D source but that is a separate issue and I don't want to waste another new topic.

:)


Guy Fawkes(Posted 2016) [#10]
No problem! :) Although if you're into the whole Networking thing, it would be AWESOME if you could help me & a few buddies of mine ( Flanker & Rick Nasher ) out with our Networking Library. It's already got a GREAT start! With very few problems. Here is the link if you're interested:

UDPNetwork_Lib V.1.12 (Beta)

Thanks a ton!

Sincerely,

~GF


eng_harvey(Posted 2016) [#11]
Lol - I was just having a look at that.

Awesome I will take a good look at it.

:)


Guy Fawkes(Posted 2016) [#12]
Great! Let me know if you're interested! :) It would not only benefit the whole Blitz community, but people can build MMORPGs with it quite easily! =D

~GF


eng_harvey(Posted 2016) [#13]
Sure thing!

I will certainly let you know.

I am more experienced with compilers and such but have a working knowledge of networking.

:)


Guy Fawkes(Posted 2016) [#14]
Ok excellent! :)

Let me know by tomorrow!

Thanks again!

~GF


eng_harvey(Posted 2016) [#15]
@~GF - Just a quick question - what exactly do you guys need help with; it looks like the project is flying along.

It is going to be wonderful for MMORPGs!

:)


RemiD(Posted 2016) [#16]
@eng_harvey>>If you want (and have the understanding and skills) to upgrade the 2d/3d graphics engine of Blitz3d and keep similar functions, then i encourage you to do it, it can be useful ! It is better to have several choices than one (especially considering that "hardwired" is not finished and does not seem stable yet...)

You may want to take a look at this http://www.blitzbasic.com/Community/posts.php?topic=105408 (#50, #60, #61, #62) to see how to open/edit the blitz3d source code...

Good luck !


eng_harvey(Posted 2016) [#17]
I also had a quick look at hardwired/hybrid - did I read correctly that it is going to be a release of Blitz3D with built in hybrid functionality? If so that is awesome.

I have been looking to do a project of Blitz3D's magnitude and was excited to find the source code - however if someone is already doing it then that is even better for the Blitz3D community.

I mainly use C++ in my daily work however I have found it hard to get students interested in making games through that route and when I went looking for something built for the purpose I found Blitz3D - It was an instant hit.

Hooray for Blitz3D - What excited me was its legacy on AMIGA - Since I was a huge Commodore fan - C64 is where I wrote my first program and interest in AMIGA was always there. It is nice to have a connection back to those days.

The world has changed so much and it is nice to have familiar things around.

:)


eng_harvey(Posted 2016) [#18]
I have compiled the sources for the IDE as I wanted to add a snippets library and make the tool buttons a bit bigger. It makes things a lot quicker for me when I am teaching - I use a Plasma TV as a black board. I also changed the colour scheme as I noticed the plasma displays differently.

I had a look at the link @RemiD - I see there are already very capable programmers around these parts of the net.

:)


Guy Fawkes(Posted 2016) [#19]
@eng_harvey : We need slash commands with optional / non-optional parameters, and an admin / mod system. We also need to be able to send sounds, music, & video to clients. Also, we have a small problem when a player respawns after being killed ( They tend to "blink" the player to their new spawn point but sometimes the spawn point is a bit off ). And last but not least, for some reason, if you continue turning your player and jumping and shooting all at the same time, you can kill your own player. ALA Friendly Fire. >< We also need a chat that can continue typing past its' borders. IE: Like every single MMORPG known to man. We also need when the text is sent to the textbox, we need that to be "unlimited" too in terms of staying in its' own borders. Also, the chat needs a timer in order to hold down the key you want to type for about 2 seconds then it continues typing that character after that repeatedly until the user stops holding down the key.

If you're willing to help us with it, then I'm willing to beta test it. And add your name to the credits. :)

Thanks alot!

~GF


eng_harvey(Posted 2016) [#20]
@~GF - Just a few quick things to get me started thinking!

1. Are you guys using a dedicated server?

2. Correct me if I am wrong; the library is written using Blitz3D source!

3. I have an idea or two on why your player is being killed with your own fire - let me think about that one unless you guys fix it first.

4. Does the library hide players from you that are out of a particular range? - that way you could do less amount of updates in the world.

I know I could go through and read everything but a few simple questions will allow me to think on it and if I need to then read further - I have read quite a bit but I am also working at the same time on other software - so your answers would be appreciated.

:)


Guy Fawkes(Posted 2016) [#21]
Thanks alot, @eng_harvey! I value your feedback! :)

1) Not right now. I wish.

2) Yes it is.

3) Ok cool! We've tried. We can't locate the little bugger. ><

4) Not sure. It hides players when they're behind walls & stuff like that. But other than that, I don't think so.

Hope that helps you get started! :)

Once again, thanks a ton!

~GF


eng_harvey(Posted 2016) [#22]
@~GF That helps a great deal

I highly recommend building a game server on Linux in the future - I would be happy to do this - all you guys would need is someone to host it that has at least 1 MBits/s upload.

I am certain that the criteria you specified could some how be managed by sensible use of tracking and local assets versus downloads.

Regarding player killing himself - I think a new instance of the player might be being created but the projectiles might be attached to a common type if this makes sense. Or the collision versus something is off. The code to stop this could be done several different ways without attaching a parent or such.

There are quite a few timing methods that could be used.

I will take a deeper look at what you guys are doing - I already have a few ideas that could be fit into the code - but I would prefer to present a few options rather than one.

:)


Guy Fawkes(Posted 2016) [#23]
Thanks ALOT, @eng_harvey! :) I deeply appreciate your help & feedback!

Please let me know when you wish for me to beta test something & we can go to the chat & I will gladly oblige! :)

Welcome to the team, buddy! :)

~GF


Guy Fawkes(Posted 2016) [#24]
P.S. I can host the server, but I prefer it be done in Blitz3D code as it's just easier for me that way. I'm not a big fan of higher-level languages.

~GF


eng_harvey(Posted 2016) [#25]
I was thinking of a lower level language - it could be done in Blitz3D with the aid of a dll.

Doing it all in Blitz3D would be very interesting - I think anyway. I was thinking about using an array that could be utilised by two fields in a type via a for next loop to send coded stuff(common and errors).

I am going to test out the code that is already there and study its action. I have it up in a code window. It could take me a day or two to contemplate while I am building a local test between two machines - I have a learning platform set up like an RPG - so I will make a copy to make it more ORPG then create a server instance and two game instances. I have a network guru here who also loves MMORPG's who can help me test.

I will also jump on the other threads associated with this library when necessary - this thread could be used for stuff specifically related to what I am doing - if that is ok by you and everyone else.

I can not see why this couldn't work if done properly.

:)


eng_harvey(Posted 2016) [#26]
; ----------------------------------Global
Thank you for the welcome! :)


Guy Fawkes(Posted 2016) [#27]
No problem, brother! :)

I welcome doing some hardcore testing with this library! You could write the DLL in Purebasic maybe.

http://purebasic.fr/english

Hope that helps! =)

~GF


eng_harvey(Posted 2016) [#28]
I have managed to look at the code in depth - makes perfect sense to me - I think I definitely need to run it to see what's going on. I will start having a play with it when it cools down here.

I have been chatting with my guru friend and he has a few ideas I want to play with using the code the way it is to begin with. That way I am trying two different scenarios.

I am going to plot NPC's with the code - lots of NPC's and use them as net_client type too - I will run the Server on its own computer. I might even try two Virtual Machines(fail over).

:)

I think it is worth getting this going in Blitz3D format.


eng_harvey(Posted 2016) [#29]
Ok so I have been doing some testing with the 2D example and you guys might already be aware of this but the issue appears to be updating clients.

After a small amount of heavy testing - the server part stands up very well - the client part is not.

I am about to call it a night and that is about as far as I have been able to get - if I cant sleep then I shall start working out the client part. Oh and I had a client get booted for no apparent reason.

I am not sure if this helps at all but really I have only just begun testing.

:)


Guy Fawkes(Posted 2016) [#30]
Thanks alot, @eng_harvey! It helps a great deal! :) Although the example you should test it in should be the "Advanced 3D" one. :)

~GF


Flanker(Posted 2016) [#31]
I say it one more time : the library is there to help connections, packets routing and server switch. Basically, it's the same as Blitz DirectPlay commands but using Blitz UDP. The example is an example of how to use the library, it's not part of the library. You can write a multiplayer chess game using the library, and also a multiplayer FPS, so you have to write your own stuff.

The goal of the library was according to Rick Nasher's post, an UDP library capable of host switching on the fly. This goal is reached. The only thing I'll try to work on later will be a way to have reliable UDP packets built in the library itself.

About the example, the players killing themselves issue has been fixed a while ago in a previous version, I just forgot to add it in the new version. I've updated the UpdateBullets() function, see the worklog.


Guy Fawkes(Posted 2016) [#32]
Well that's all fine & good Flanker, but we both obviously would like to upgrade it even further.

You don't HAVE to be part of the team, but I say the more the merrier! :)

~GF


RemiD(Posted 2016) [#33]
@Flanker>>With time, you will learn to appreciate GF. :P


Guy Fawkes(Posted 2016) [#34]
Flanker, with time, you'll see that RemiD is nothing but an internet troll & only picks on members because he's too insecure about his own life that he has to ruin others' lives. Well that's ok. I'm ignoring the dunce anyway so it's a moot point.


Flanker(Posted 2016) [#35]
@RemiD Yes I understand now ^^

Good luck then Guy Fawkes.


Guy Fawkes(Posted 2016) [#36]
Thanks alot, @Flanker! ^^

~GF


eng_harvey(Posted 2016) [#37]
;----------------------------Globals
I am not much good at interpreting things like ^^ are we saying line above or are we smiling(maybe indicating sarcasm) - anyway I personally love the code and can see what it is for - I read that one could do whatever with it - forgive my ignorance.

I was hoping to experiment and see what paths it could be taken along - I have written a few libraries in Blitz3D - I am going to play with this library in a couple of programs I have created - but only if everyone is cool with that - I just came from writing MASM code to have more of a play with this; so I am tired and weary.

My guru friend changed a line of code in the library part and ended up with a performance increase - I think it was one line as I was pretty tired. We also wrote a list of things we want to try - I am pretty excited - both of us agree that the library as is, is very useful.

I think host switching on the fly is a great idea - I also think this would work well with a dll that deals with udp packets - we were also chatting about using UPnP as a part of our own projects.

I guess what I am saying is - the code is good - the code is useful as is - the library can be extended by the user for their own projects - it can already play fairly nicely with similar tech.

As far as the examples go - they illustrate what can be done with the library in its latest version - I have not had the pleasure to play with the 3D example yet - I am guessing it is going to give me a lot of ideas for incorporating the library into a 3D learning platform that I have for my students and boy will they be excited to edit levels together. My guess after my experience so far is because it is written as a library and the examples are great that using the library will be a straight forward task as it should be.

:)


RemiD(Posted 2016) [#38]
@eng_harvey>>Don't worry, there is no problem with you, i (and some others one these forums) just reproach to GF to outsource a bit too much to others what he wants to create (but personally my intent is not to "ruin his life" but rather to put a little pressure on him so that he improves his understanding and skills and manages to create what he wants himself) (in post#19 "we" means probably "i" (as in "GF") ;) )

Your contribution is appreciated :)


Flanker(Posted 2016) [#39]
Sure you can improve the library, there is no problem with that, and what you can share will be appreciated here. It works fine on a local network, but online, as UDP is not reliable, you can have unexpected results (mainly packets arriving in any order, or never arrive at all). The library lacks of reliable UDP packets, or eventually, TCP protocol to handle reliable packets.


Guy Fawkes(Posted 2016) [#40]
Remi, once again, if you're not going to be part of the project, leave. You are being nothing but a waste of space. No one asked you to be here. We're doing this for the community whether YOU like it or NOT.


Guy Fawkes(Posted 2016) [#41]
Come to think of it, @eng_harvey, it would probably be best to create the DLL in Purebasic so it can be used with ANY code that is capable of calling DLLs & so it's much easier to manage.

~GF


eng_harvey(Posted 2016) [#42]
@ -- Everyone --
I have a couple of ideas that could extend the UDP Network Library
------------------------------------Redundancy System - an additional library with a compatibility layer to "UDP Network Library"

Basic Redundancy Sytem - One Base Server <-- One Standby - using simple fail over

Each player has a mini copy of a server running that kicks into higher gear via fail over - a kind of clustered mode.

Packets need to be organised - ordered packets.

What does anyone think about a small tcp call every 15 seconds? I am trying to be imaginative here . . .

-------------------------------------------------------------------
------------------------------------Regarding "UDP Network Library"
I am thinking that if this "on the fly host switching" idea is able to read other small messages less often at the user end then part of the switching can be done at the server end and the user end.

:)

@~GF -- Purebasic is pretty cool - I use C and C++ and Delphi 7 - Otherwise FreeBASIC and Free Pascal -- these are things that I am used to - for dot.net and mono are also things I have to use and for this I actually enjoy C#. Web wise PHP is my thing and codeigniter solves a lot of issues for me - I am able to add W3.CSS and/or bootstrap and various javascript frameworks etc. etc. -- for my search engine project I use a mix of C++ and Python and PHP -- My GUI is a mix between non real-time stuff done in NeoBook and realtime stuff done in C++. I have useful dot.net libraries that I have written for FTP and other utilities that sometimes need to be used. Really the list goes on and on . . . I have used Purebasic before and it is good - I think I will use C++ for writing userlibs in Blitz3D just because it is what I am used to - I can load up my boilerplate, add Preprocessor directives - choose a functional or object method or a combination of both and off I go - that all takes between 5 minutes to 30 minutes to set up - I do agree that sometimes another tool for doing the job is a better idea - if anyone can give me enough reasons to use another tool I will happily give it a go . . . Do you like Purebasic?

:)


Guy Fawkes(Posted 2016) [#43]
Hi, @eng_harvey! :) Yes. I love Purebasic! Only reason I say we should use PB is due to its' sheer easiness so that ANYBODY can easily access & modify the DLL source! =)

I also agree with all 4 of the above statements as well! :)

~GF


eng_harvey(Posted 2016) [#44]
@~GF

What version of Purebasic are you using?


Guy Fawkes(Posted 2016) [#45]
5.40


eng_harvey(Posted 2016) [#46]
Ok well I have 5.3 here - I don't want to update it on this system but it should be good for code exchange - I was just taking a quick look at the docs for it on compiler directives and dll stuff - I also found some info on UDP and other related topics on the web.

It should be relatively straight forward for me to translate between languages - I will have a few practice runs on creating dll and read the language reference.

Are there a few Purebasic programmers around here?


Guy Fawkes(Posted 2016) [#47]
Ok cool, @eng_harvey! Let me know when it's beta-testable! :)

~GF


eng_harvey(Posted 2016) [#48]
Use user32.dll to grab blitz window handle and attach to process in purebasic dll; or something like that?

I like what I am looking at!

I have been looking at this: Simple Example!

:)

So I give it to Purebasic - it is easier to setup a dll than some of the methods I employ.


eng_harvey(Posted 2016) [#49]
On the Purebasic side though I think it will take a few days to become fully acquainted but I have some pseudo code ready to translate.

~GF So if you like I can send you source too so you can make suggestions and maybe point out some stuff I am unaware of - provide tips etc.

:)


Guy Fawkes(Posted 2016) [#50]
Sure! Please do! :)

~GF


eng_harvey(Posted 2016) [#51]
~GF

Well this is awesome - So I quickly compiled the example in the link above - used PEview to look at the address table - made decls - tested in blitz - all in under 10 mins - me happy.

:)


eng_harvey(Posted 2016) [#52]
~GF

So it helps if I disable Unicode in the compiler - I was getting Asian characters of some sort - I think Unicode was crashing the dll; but I could be wrong - it could have been my decls file too as it makes not too much sense to me that Unicode would do that but anyway - it is all working now. Although I remember a Unicode problem I had in python that was affecting my link extractor - I had to convert ASCII and encode but that is also a separate issue - my mind likes to crosslink ideas I think :)

At least it is logical to trouble shoot problems in Purebasic that the debugger does not pick up because technically they are not real problems.

Anyway I better get back to work - I will have a bit more of a play later.

:)

Thanks!


eng_harvey(Posted 2016) [#53]
Ok I have a another thought - I think I might build a Blitz3D to Purebasic compiler and vice versa that could make life a lot easier in the future for me since I spend more time in Blitz3D. I can see a few small problems with the idea but I think with a little AI I could overcome this - or I am just going crazy lol.

:)


Guy Fawkes(Posted 2016) [#54]
I agree, Harvey! But for now, lets stick with Purebasic! :)

~GF


eng_harvey(Posted 2016) [#55]
@~GF Lol - yeah I agree!

So have you used the following in Purebasic?

"Debug GetCurrentProcessId_()"

I would like to know if it is effective - I will try it out later!

:)


Rick Nasher(Posted 2016) [#56]
This is starting to sound like an interesting project.


Guy Fawkes(Posted 2016) [#57]
No I haven't, @eng_harvey! :) But if you want me to, I can check it out for you! :)

@Rick Nasher: HELL YEA it is! :D

~GF


eng_harvey(Posted 2016) [#58]
Well we seem to have gotten a little off topic - but it could be an interesting project. I think there are a few projects that will come out of this so I will put a link up to a couple of pages for charts, pseudo code and source in the near future. Maybe I should create a Worklog too???

I am working on making the packet transmission reliable by filtering unwanted packets on the clients end - utilising a packet token system paired with a number in the stream's sequence - this is something similar to what TCP does. The idea is to deal with packets sensibly by giving each its own identity along with the clients token - also a mechanism for round trip time needs to be used to help avoid over buffering of packets in our virtual network. Standard deviation also needs to be taken into account like TCP does.

I think the general idea here is to use UDP and only add features that we want to emulate that are similar to TCP but more efficient. The end result should be that the packets are balanced between the server and any given client. Then a prediction or averaging algorithm could be used to fill in any missing gaps if things get particularly bad. Filling in the gaps at both ends seem to be a little tricky intuitively but algorithmically it is not too difficult to implement. I have some C code as a reference.

There was something else I wanted to say but I forgot so I will leave it for now . . .

:)


Guy Fawkes(Posted 2016) [#59]
Sounds like a plan! Make the worklog & hit me up in here when you're ready for beta testing! =D

~GF


eng_harvey(Posted 2016) [#60]
Ok so its looks on the surface; Linked list are the way I should deal with client data on the server end.

If anyone disagrees; I would like to know!

Basically as each Player joins the server they would be added to a linked list along with positioning, physics whatever.

:)

Along with ForEach:Next iterator?


Guy Fawkes(Posted 2016) [#61]
I agree.

To do For Each, do something like this:



Hope that helps! =)

~GF


Rick Nasher(Posted 2016) [#62]
Striked that comment ;-)


eng_harvey(Posted 2016) [#63]
So below is some Purebasic Code

Structure Player
    ID.l
    xpoz.i
    ypoz.i
    zpos.1
    xrot.f
    yrot.f
    zrot.f
    xscl.i
    yscl.i
    zscl.i
EndStructure

NewList Players.Player

; ----------------------Code for adding elements
; ----------------------Use to add players to the list
Procedure AddPlayersToGame(xp,yp,zp,xr,yr,zr,xs,ys,zs)
AddElement(Players())
    players()\ID
    Players()\xpos
    Players()\ypos
    Players()\zpos
    Players()\xrot
    Players()\yrot
    Players()\zrot
    Players()\xscl
    Players()\yscl
    Players()\zscl
EndProcedure

;---Then the For Each - in Purebasic

ForEach Players()

; -------- Collect Packet Info - Do some updates

Next


Obviously I left some code out - the next thing will be seeing how fast this works.

I have a few things in a Worklog already: Infinitude Game Server!

So the DLL will need a function that makes sense when loading the Blitz Type up. I personally would like it if it is immediately identifiable but still general enough for all games.

Also this might sound optimistic but only sending from the server what each player needs - immediate vicinity etc. could be worth a shot.

:)


eng_harvey(Posted 2016) [#64]
The next thing I am going to work on is chat and user slash commands.

Is private chat applicable? - if so it is easy enough to code.

So should slash commands also be dealt with via a list per player?

BTW - we are by no means limited to having one userlib or one method of doing this - the idea will be simple tuning on a game by game basis - kind of like how irrlicht have a FPS mode built in but you don't have to use it. We could have all sorts of modes built in. Custom modes would be good too.

:)


Guy Fawkes(Posted 2016) [#65]
Private chat is DEFINITELY applicable! :) Infact, I'd like to have "/whisper player_name_here"

~GF


eng_harvey(Posted 2016) [#66]
@~GF That is awesome! We are excited over here with all of this!

:)

Thanks!


Guy Fawkes(Posted 2016) [#67]
No problem! :) Thank YOU for the help! :)

~GF


Guy Fawkes(Posted 2016) [#68]
Any luck, @eng_harvey ? :)

~GF


eng_harvey(Posted 2016) [#69]
@~GF I have been sick for two days and been doing a little bit each day and now I am busy catching up - but I think I am going to be pretty lucky. I understand the mechanics of it clearly now for that matter.

Worklog here!.

I would have to say that the project is well underway. There are some advanced concepts in game server networking - so I am treating like I would one of my commercial endeavours but it will of course be open source to the whole community.

:)

This weekend will be busy on the project and next week I will be doing a lot more work on it than I was able to this week - we may even have some usable results by the end of the weekend.

Worklog here!.

:)


eng_harvey(Posted 2016) [#70]
Is the UDP Network Library still being worked on? - I am interested to know! I am finding it a useful reference for what I am doing.

:)


Guy Fawkes(Posted 2016) [#71]
Awesome! :) Glad to hear you're feeling better! =)

~GF


Guy Fawkes(Posted 2016) [#72]
@eng_harvey : Please include me in the beta testing as an admin.

Tyvm! :)

~GF


eng_harvey(Posted 2016) [#73]
@-GF As far as I am concerned we are on the same team!

:)

I have mentioned your idea of whisper in my worklog - no matter how big or how small a contribution is - it is a contribution - most of the ideas I am working with are from others.

I actually combined two pieces of code to get text entry and word wrap - written by others. Minimal changes from me - they are getting Blitz3D to work nicely with the DLL - now if only I can wake up a bit.

In fact I have mentioned a number of things you suggested to me in my worklog. I plan to keep up the acknowledgements.

:)



Before we can test it together - I need to set up some timing - I am working on chat at the moment - we are getting pretty close though - the next thing is positioning/orientation.

:)


Guy Fawkes(Posted 2016) [#74]
AWESOME! O_O I cannot WAIT to beta test this!

~GF


Guy Fawkes(Posted 2016) [#75]
@eng_harvey : We should add NAT punching so that we can punch a hole through the ports so we have 0 net problems! Thanks goes to @RustiKrusti of this following thread for the reminder!

http://www.blitzbasic.com/Community/posts.php?topic=105928

~GF


eng_harvey(Posted 2016) [#76]
@~GF : I agree; we really do need to have some sort of UDP hole punching method - however usually you still need to have a server that is public and this machine could be port forwarded.

Now like I said I have a working knowledge of networking; I am no expert so therefore there are some techniques I may well be un-aware of.

One method I will employ is to give packets an identity of sorts - with this identity it doesn't matter if two or more computers look like the same machine because they will only take the packets that belong to themselves. I am led to believe some things don't work so well like this and other methods have to be added along side.

:)

I am just waking up so forgive me if this is not making much sense.

The short answer is: Definitely we should add it!

:)

I think unless it comes with 0 net problems it is not worth it. I hate the idea of people pulling their hair out.

:)

PS. I was also thinking about UDP proxies - this is something I did in python once and it had pretty good performance.


Guy Fawkes(Posted 2016) [#77]
Works for me! I say the more secure, the better!

~GF


eng_harvey(Posted 2016) [#78]
The internals of a game server and player(client) network are like a time machine.

To make sure that everyone is synchronized some guessing ahead of time is needed.

Just a thought!

:)


Guy Fawkes(Posted 2016) [#79]
I agree! :) Can't WAIT to test it! =D

~GF


eng_harvey(Posted 2016) [#80]
@~GF Well the good news is I am finally starting to get somewhere - what an adventure!

:)


eng_harvey(Posted 2016) [#81]
@~GF Do you think it would be ok to translate some of the UDP Library code into Purebasic?

All of the functions are really useful for what I am doing at the moment!

:)


Guy Fawkes(Posted 2016) [#82]
Of course I do! :) Go for it! By ALL means! :)

~GF


eng_harvey(Posted 2016) [#83]
@~GF I really appreciate that - I know it was made public domain in the first place but it is always better to ask - I am more than happy to include everyone in the credits as listed on UDP Network library v1.12 and of course I want to make the source code available once we reach Version 1. I will of course annotate(comment) the ported code from the UDP Network library v1.12 and will also include a lot of the original comments. You name it - we can get it done!

:)

Anything else you can think of - or anyone else for that matter - let me know!


eng_harvey(Posted 2016) [#84]
Also - I know a few ways we can get the original code to do what you were after - but I would like to get this project up to version 1 and then we can work out another version of the UDP Network library v1.12 - I honestly think having that code in Blitz3D is very important as it also teaches others the sheer amount of effort involved - Having all these options is going to be great - good for the community!

:)


Guy Fawkes(Posted 2016) [#85]
I agree! :) I think we should build a World Of Warcraft clone! Not as big, but with all the networking features it has!

Mainly, a user register / login, etc!

~GF


eng_harvey(Posted 2016) [#86]
@~GF You know what? that sounds like an awesome idea!

Are you thinking of network editing? That way more than one person gets in and builds the world. In that case I have some handy Blitz3D code that allows for an editing session and save; we could turn it into network code instead that way edits could be made and stored to the server.

:)

Also - I don't believe we will be limited to a particular size of game - if we use more than one server and have zones - also once we have later DirectX and MAYBE OpenGL we could make everything go a lot further.


Guy Fawkes(Posted 2016) [#87]
I actually have a level editor I've been working on so that would be a PERFECT idea! BUT.. The only problem is, it's gonna be commercial pretty soon. HOWEVER. If you can come on Skype and talk to me tomorrow some time, I'm sure we can take care of it! :) And you wouldn't BELIEVE how easy I made it! It's nearly finished!

~GF


Guy Fawkes(Posted 2016) [#88]
I'd also like to do the database for logging in / registering in "MySQLi". NOT MySQL. :)

~GF


eng_harvey(Posted 2016) [#89]
I have never used MySQLi but I use MySQL on a daily basis so I can imagine I would be good at MySQLi.

I am very happy for you to do it if you want to.

I am guessing that you want this at the server end - so I may need a little bit of guidance connecting it up.

I will be adding:
encryption to the packets
compression to the packets
delta compression

So what we need on the login side is to pass a token to the game server. This means making a connector between MySQLi and the game server.

Also I am guessing that you want it set up this way to have fancy login screens etc.

:)

I am working on making it very difficult to cheat or hack - it only needs to be good enough to catch someone in the act and that way a bot can either be set to boot or notify the admin if they are on duty. I have some awesome bots! Rolling codes could be used - much like they do for keyless entry.

:)


Guy Fawkes(Posted 2016) [#90]
O DEFINITELY! I would love nothing more! :)

And yes! Fancy logins, etc! =D

With an auto-updater tool written in Purebasic in order to make this fully open source & easy for EVERYBODY! :)

Thanks a TON! Can't wait to try it out! =D

~GF


eng_harvey(Posted 2016) [#91]
Sorry - I thought you meant SQLite - yes definitely MySQLi!

:)

I am well versed on all the MySQL access including PDO, MySQL and MySQLi.


eng_harvey(Posted 2016) [#92]
Ok I think I understand now - Skype is a good idea - I am more than happy about level editor and what ever you want to do regarding MySQLi.

Sometimes it is hard to express things on a forum.

:)

Look forward to the Skype . . .

:)


Guy Fawkes(Posted 2016) [#93]
Excellent! What is your skype name?

~GF


Rick Nasher(Posted 2016) [#94]
And... more wow. :-) I'm amazed by people's productiveness here. Already a site and all. Sounds like really good structured approach, humbling experiences.


Guy Fawkes(Posted 2016) [#95]
Hehe, yes indeed, Rick Nasher! :) We like to work FAST! <3

Anywho, get back at me when you get the chance with your Skype name, @eng_harvey! :)

~GF


eng_harvey(Posted 2016) [#96]
@~GF - My Skype name is eng_harvey funnily enough! :)

@Rick Nasher - thank you so much for your kind words - the site is not close to finished yet - it has a lot of inactive links - I was hoping we could get a page up each week - also the content section needs to be kind of boxed. It is a very dynamic project so we are trying to keep as much structure as possible. I personally have already had a couple of humbling experiences associated with this project - picking up PureBasic after a number of years found me reading the beginners manual so to speak - I am lucky those good people at Purebasic have put so much work in as I have been able to make correlations between C/C++ and PureBasic and that really helps. Again; thank you for your kind words Rick Nasher.

So many ideas have been flowing around and the UDP Network library v1.12 code is really great code to work with - porting it will be a pleasure!

:) Well lets see what we can achieve today!


Guy Fawkes(Posted 2016) [#97]
Indeed we shall! :) I added you! :)

~GF


RustyKristi(Posted 2016) [#98]
Going back to the main topic about eng_harvey's interest in making a DX11 userlib for B3D, I think it's a great idea.

To make it short and as great as Ploppy's Hardwired library is coming along, it has still some quirks for me. Here's a couple I can point out:

1) Free but not open source. Ploppy already pointed out a few good reasons for this type of licensing but right now it's only in his control so the final outcome may or may not be in favor of your project.

2) Fixed functionalities along with other extra stuff. It's good in a sense that he's adding more features than the intended graphics upgrade but it's a different version of Blitz3D so a true userlib is a better solution for me for use with other libraries.

So I'm sure it would draw attention and not a complete waste if you're going for a different route or contrast to hardwired if you're really gonna pursue this thing.

IMHO.


Guy Fawkes(Posted 2016) [#99]
KNOWLEDGE IS FREEDOM! =) I prefer open source as well!

~GF


RustyKristi(Posted 2016) [#100]
Ah I hope so! :) How is it coming along?


eng_harvey(Posted 2016) [#101]
Sorry RustyKristi - for now we are working on a game server slash userlib - I was just too lazy to change the name of this thread - my bad.

I am still interested in the DX 10 userlib but I want to make sure this project is finished first - I changed the name of the thread.

My sincere apologies for any inconvenience.

:)

I feel bad now!


RustyKristi(Posted 2016) [#102]
No worries, I just noticed the thread name change minutes ago. It still looks awesome with this new game server userlib project! I hope we can expect a demo soon :)


RemiD(Posted 2016) [#103]
Open source is overrated imo... Even if you have access to the source code, if you don't have the level to understand it, to edit it, to debug it, what's the point...


eng_harvey(Posted 2016) [#104]
Very true RemiD - most users will download executable versions of software - however for those that do have the skills or for those that want to increase their knowledge of the language they are using open source can be a good thing. It is not for everyone!

Another good reason for an open source project is if the original author dies or no longer has interest in the code but people need updated versions then somebody else can take it on.

:)


Cocopino(Posted 2016) [#105]

Another good reason for an open source project is if the original author dies or no longer has interest in the code but people need updated versions then somebody else can take it on.



That's true, but in this case we will pretty much know that won't happen... Reason I'm saying this is Blitzers have had the following open source 3D projects:
- Max3D
- MiniB3d
- MiniB3d Extended
- Ninfa3D
- Irrlight mod

which were all abandoned by the original author with no one to pick them up for new features or even for bugfixes. I am certain I have forgotten, or did not test, many, many other projects.
The only project I know of currently still being developed/fixed is OpenB3d.

So if you want to take up the pretty daunting task of writing a 3D engine :) I'd look into one of the above first.


RemiD(Posted 2016) [#106]
Just to be clear : i like open source ( and i also support one project, maybe more in the future ), but it does not magically make it better.
( for example, i have several ideas to improve Blitz3d, and i have tried to understand the source code but it is chinese to me :\ )


eng_harvey(Posted 2016) [#107]
You are very correct RemiD; it does not make it magically better!

I have used Irrlicht Engine with C++ inside Code::Blocks 5-6 years back and I found it well set out. I also enjoyed toying with an Irrlicht Engine Userlib inside Blit3d.

Daunting task :) it can be!


Cocopino(Posted 2016) [#108]
You may want to take a look here:
http://www.gprogs.com/viewforum.php?id=1

First post contains a Blitzmax mod for Irrlight 1.7.3. As I recall, many features of Irrlicht were already "translated" into the Blitz3D command set.


eng_harvey(Posted 2016) [#109]
These three books are also interesting for beginners:

DirectX 9

DirectX 10

DirectX 11

And these two sites:

Site 1

Site 2

:)


Guy Fawkes(Posted 2016) [#110]
Incase you missed our exciting posts for the Game Server this week, or last week, here's a link straight to the worklog! We update CONSTANTLY! So keep checking back! =)

http://www.blitzbasic.com/logs/userlog.php?user=23752&log=1917

~GF & eng_harvey


Rick Nasher(Posted 2016) [#111]
Aarghhh.. still no download. Can't wait, can't wait. ;-)
=I'll keep checking..


Guy Fawkes(Posted 2016) [#112]
~Patience is a virtue~ my friend! ;)

~GF


Rick Nasher(Posted 2016) [#113]
@GF: I know. I'll keep my breath in. :-)


Guy Fawkes(Posted 2016) [#114]
:p


RustyKristi(Posted 2016) [#115]
Just wondering what happened to Flanker's work. Is it still being made or put on hold.

I just noticed this is now the popular topic during these past week weeks between UDP library.


Guy Fawkes(Posted 2016) [#116]
No. Flanker's work is complete. This is a total & complete rewrite that eng_harvey & I are doing. :)

~GF


Rick Nasher(Posted 2016) [#117]
Flanker is busy with other project(s) so can't really devote more time to afaik, which is a pity for he did a good job. But understandable for I'm currently too busy too, so I had to put my goal on hold for a little while.


eng_harvey(Posted 2016) [#118]
Flanker did a fantastic job - these sorts of projects are time consuming and complex; no doubt about it. Trying to think about how 2 or more pieces of software work together in itself can be a challenge.

:)

Like GF said; what we are doing is quite different and is being written from scratch.

We have a functioning game server that is written in PureBasic and is designed for a dedicated server but could be used from any connection capable of fully supporting it. We are also working on Userlibs for Blitz3d that allow for Admin, Moderation and Game-play.

We did a test yesterday and everything is functioning well. It is a large project and will take us a couple of months to get full functionality happening due to other obligations with other projects.

We have a goal to create an MMO and the first client/server suite is designed around this.

Ideally I want this project to be able to solve many problems for game networking and be another option for developers. I really want it to be easy to use too.

I am going to provide numerous examples on how to use our project and many parts of it will be open source. I would like to provide some fully functional software for others to use that will be able to be downloaded and built into projects made with Blitz3D.

Our encryption will remain a secret but I will provide tutorials on different encryption, compression and interpolation techniques - and the precompiled stuff will have security and compression built in.

In the meantime I have a small amount of time that I can use to help and work with others.

Flankers work is complete to the latest version and very functional - I use it to teach my students concepts in game networking. I believe it is capable of being extended and customised to fit hundreds of circumstances and many types of games.

Both the UDP Library and our Game Server are capable of working together with some modification. We hope to get enough time to show how this is possible.

:)


Rick Nasher(Posted 2016) [#119]
Really cool if would work together with Flanker's lib. Then the user can truly have full flexibility if wants to make use of a dedicated server or peer2peer with host switching system.


eng_harvey(Posted 2016) [#120]
I agree Rick!

:)


eng_harvey(Posted 2016) [#121]
I thought I might revive this thread after some very interesting conversation in Ricks thread about game networking as I do not want to pollute his thread with information that is not applicable to his project.

Thanks to RemiD I have been thinking about a concept related to emitters. Even though you can get the IP from each packet - by using a sixteen bit emitter id I can speed up access to a hash table type map. 16bit emit id is half the size of an IPv4 address and there is no messing around.

Catmul rom interpolation is going to be interesting reading on top of the other interpolation techniques I have explored so far. Thanks Bobysait!

You know what thanks to all for a truck load of inspiration!

Looks like fun times ahead :)


eng_harvey(Posted 2016) [#122]
I just finished reading Catmul rom interpolation - this looks like quite a simple thing to implement - it is more elegant than some of the ideas I have been toying with and could even fit in with some other techniques.


Rick Nasher(Posted 2016) [#123]
Can't wait to see what this will look like.


kfprimm(Posted 2016) [#124]
Hey eng_harvey,

Let's talk! I've started work on "modernizing" Blitz3D and would love to replace the DirectPlay commands with native C++ UDP code.

http://www.blitzbasic.com/Community/posts.php?topic=107324

Thanks!


Rick Nasher(Posted March) [#125]
Apparently Unity's(I love the features, hate the language) UNet is build on Raknet.
They(Unity) have build a lot of nice features in it currently lacking(afaik) in Blitz. Among which Reliable Transfer and Host Migration.(e.g. here: https://docs.unity3d.com/Manual/UNetHostMigration.html )

I think it's working rather well so far, but funny thing is: the networking component DLL & sources are Open Source.
https://bitbucket.org/Unity-Technologies/networking/src/78ca8544bbf4e87c310ce2a9a3fc33cdad2f9bb1?at=5.3


So if anybody skilled enough(not me) has the time and willingness to convert the C# to Blitz, then there's an opportunity here to bring Blitz up to par.


eng_harvey(Posted March) [#126]
@Rick Nasher - that is a great suggestion Rick - RakNet itself is written in C++ and has a 3-clause BSD License.