WorldSim3D game engine for FreeBasic

User projects written in or related to FreeBASIC.
TJF
Posts: 3604
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: WorldSim3D game engine for FreeBasic

Postby TJF » Nov 14, 2014 12:17

Kot wrote:The problem with most network libraries here is that they are designed to send just strings, not raw data used in games.

FB STRINGs can hold any kind of data. Using a UNION it's pretty easy to pack raw data, or unpack them. Find an example here

Tyr_Anassazi
Posts: 28
Joined: Jul 01, 2013 15:01
Location: Russia, Novosibirsk
Contact:

Re: WorldSim3D game engine for FreeBasic

Postby Tyr_Anassazi » Nov 14, 2014 14:40

I'd strongly suggest to use a library for which the source code is available (just think about the currently added x64 platform).
I've seen this library too (v3.2). I like it. Many functions, a dozen of examples and it is good commented. Of course, before I use a library (D.J.Peter's, TSNE or other), I will carefully examine it, to meet the needs of users as far as possible. Thanks for the info and the link, St_w.

Thanks for the example, TJF... hmm it turns out that there is TSNE v3.5! I want to see what has changed. Image
St_W
Posts: 1507
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: WorldSim3D game engine for FreeBasic

Postby St_W » Nov 17, 2014 13:33

Kot wrote:The problem with most network libraries here is that they are designed to send just strings, not raw data used in games. They are good to create a www server, but complex arrays consisting strings, numbers (like unit's name, its coordinates, ammo etc) need to be converted in often troublesome way. [...]

There exists an extension for TSNE which aims to do just that: It is called EGNP (EasyGameNetPlay) (formerly called TSNEplay).
Unfortunately it seems that the description is only available in German as of now, but you may try Google Translate/Microsoft Translator or similar services.
http://www.freebasic-portal.de/projekte ... ay-85.html
Kot
Posts: 336
Joined: Dec 28, 2006 10:34

Re: WorldSim3D game engine for FreeBasic

Postby Kot » Nov 17, 2014 20:21

TJF wrote:FB STRINGs can hold any kind of data. Using a UNION it's pretty easy to pack raw data, or unpack them.

Not quite. Try inserting into gothon's example lines (right under the Print Unionk._Str):

Dim SomeText as string=Unionk._Str
print SomeText

and you'll see what I mean - SomeText equals Unionk._String until the first appearance of chr(0), the rest is gone. And the line like this is in the Data_Send procedure of TSNE, so gothon's method won't work.
Dr_D
Posts: 2400
Joined: May 27, 2005 4:59
Contact:

Re: WorldSim3D game engine for FreeBasic

Postby Dr_D » Nov 17, 2014 22:40

Nice work man. :)
I don't know what anyone else thinks about it, or how much experience anyone else has with it, but enet is a pretty good network lib, in my opinion.
TJF
Posts: 3604
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: WorldSim3D game engine for FreeBasic

Postby TJF » Nov 17, 2014 23:10

Kot wrote:
TJF wrote:FB STRINGs can hold any kind of data. Using a UNION it's pretty easy to pack raw data, or unpack them.

Not quite. Try inserting into gothon's example lines (right under the Print Unionk._Str):

Dim SomeText as string=Unionk._Str
print SomeText

and you'll see what I mean - SomeText equals Unionk._String until the first appearance of chr(0), the rest is gone. And the line like this is in the Data_Send procedure of TSNE, so gothon's method won't work.

I guess you refer to this post

Did you see this lines in my code (above that post)

Code: Select all

' this is the STRING we send by TSNE
VAR TSNE = MID(Typek._Str, 1, SIZEOF(Typek)) ' copy including zero-bytes !!!

or this lines in gothons code

Code: Select all

'Note: Unionk2._Str = Unionk._Str does not copy past the first 0 byte
Unionk2._Str = Mid(Unionk._Str, 1, SizeOf(tTypek))

A fixed length STRING is terminated by a zero byte. To copy the complete string you've to use MID function (or LEFT, RIGHT doesn't work).
fxm
Posts: 9983
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: WorldSim3D game engine for FreeBasic

Postby fxm » Nov 18, 2014 10:18

IMHO, 'Mid(str, 1)' should be sufficient.

Code: Select all

Dim s1 As String * 10, s2 As String * 15, s As String

Mid(S1, 1) = "0"
Mid(s1, 10) = "9"
Print "'"; : Print s1; : Print "'"
Print

s2 = s1
Print "'"; : Print s2; : Print "'"
s = s1
Print "'"; : Print s; : Print "'"
Print

s2 = Mid(s1, 1)
Print "'"; : Print s2; : Print "'"
s = Mid(s1, 1)
Print "'"; : Print s; : Print "'"

Sleep

Code: Select all

'0        9'

'0              '
'0'

'0        9     '
'0        9'
Last edited by fxm on Nov 21, 2014 21:29, edited 1 time in total.
fxm
Posts: 9983
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: WorldSim3D game engine for FreeBasic

Postby fxm » Nov 18, 2014 15:28

The above behavior is it normal (expected)?
It could probably be improved.
Last edited by fxm on Nov 21, 2014 22:18, edited 2 times in total.
Kot
Posts: 336
Joined: Dec 28, 2006 10:34

Re: WorldSim3D game engine for FreeBasic

Postby Kot » Nov 18, 2014 19:35

TJF wrote:Did you see this lines in my code (above that post)
or this lines in gothons code

<shame mode on>
<walks away to scatter ashes on his head for penance>
<shame mode off>
*system error: can't exit shame mode until writing something that makes sense*
Tyr_Anassazi
Posts: 28
Joined: Jul 01, 2013 15:01
Location: Russia, Novosibirsk
Contact:

Re: WorldSim3D game engine for FreeBasic

Postby Tyr_Anassazi » Nov 19, 2014 5:48

<External AI mode via network system:>
<connecting to Kot...>
<login... password... access granted>
<<You are modest, Kot.>>
<<Не who makes no mistakes, makes nothing.>> Image
<<You have been making much, so anyway, your contribution is appreciated.>>
< disconnecting...>


fxm, thanks for shedding some light on the matter.
fxm
Posts: 9983
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: WorldSim3D game engine for FreeBasic

Postby fxm » Nov 21, 2014 22:21

jepalza
Posts: 70
Joined: Feb 24, 2010 10:08
Location: Spain (Bilbao)

Re: WorldSim3D game engine for FreeBasic

Postby jepalza » Jan 25, 2015 13:47

Great Job!

Does you remember this post? --> viewtopic.php?f=14&t=3584&start=900

did try to compile new version of orrlitch in the past (look this --> viewtopic.php?f=14&t=3584&start=885#p184960 )
Has several problems with textures and shadows and decided to abandon the project so complex that was.

You goes for it!! If you need me help, say me. I will be attentive to your work.
Tyr_Anassazi
Posts: 28
Joined: Jul 01, 2013 15:01
Location: Russia, Novosibirsk
Contact:

Re: WorldSim3D game engine for FreeBasic

Postby Tyr_Anassazi » Jan 26, 2015 14:13

Hello, jepalza.
Thanks for the feedback!

My fellow-worker and I compiled the engine with Irrlicht 1.7.3 with no texture rendering trouble. Compiling for Irrlicht higher versions failed so far.
Yes, you help will be be welcomed ! I've sent you an e-mail (reply to yours).

Small announcement: WorldSim3D 0.9.2 is done and being prepared for release. It is enriched with some tools and features. For example, there is a casual game template is made. One can easily create a casual or even adventure/quest game with it. Another tool is a "Wizard" for an easy game project start: no more pain with headers, paths, libraries and so on (all 'dirty work' is done). All stuff is generated to "MyProjects" folder and you are ready to go. Image
agamemnus
Posts: 1842
Joined: Jun 02, 2005 4:48

Re: WorldSim3D game engine for FreeBasic

Postby agamemnus » Feb 10, 2015 10:11

Great that you are continuing Frank Dodd's work here. My most complex and (abandoned, so far) Freebasic game (Merchants of Power) is based on his Irrlicht wrapper. (I also had to recompile Irrlicht, but that's another story...)

I think documentation is the most important thing.

When you combine more than just Irrlicht, the problem of documentation becomes very tricky... Irrlicht's docs weren't so great when I was working on my game and it all threw me off and slowed me down.
Tyr_Anassazi
Posts: 28
Joined: Jul 01, 2013 15:01
Location: Russia, Novosibirsk
Contact:

Re: WorldSim3D game engine for FreeBasic

Postby Tyr_Anassazi » Feb 11, 2015 8:48

Hi, agamemnus. Image

Thanks for your feedback. I've just seen your game's screenshots. Serious project. I'll download and look at it. I hope, you will go on with it. And by the way, I like the games with history and trading like your project.

I think documentation is the most important thing.

It is. That's why I invested plenty of time to fixing the docs. I also wrote some tutorials and articles on how to use WS3D. They are not in English, but I'm translating them.

One more thing: My fellow and I released a workable Linux version of WS3D. We tested it on Debian, Ubuntu, Linux Mint.
We also started make video tutorials for the engine.
_____
Edit:
I downloaded the game archive, but it's damaged (I downloaded 2 times).

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 5 guests