Redis Client in C# from Unity3D

2,015 views
Skip to first unread message

Larry Applegate

unread,
Sep 1, 2013, 3:24:20 PM9/1/13
to redi...@googlegroups.com
Unity3D is the largest and probably the most advanced cross-platform game development system. At MegaWorld Studios, we are preparing our Omegatech IOS and Android game for alpha release at GDC Next Los Angeles in November, and want to use Redis for our in-game asset management and rewards system.

Unfortunately Unity uses a proprietary version of MonoDevelop, version 2.8, that they have modified to support their runtime engine. This IDE supports only .net version 2.0 and older. There is only one C# Redis client with a DLL at that level that we are aware of, TeamDev:


For this first Redis development effort we can run the server on localhost on my MacBook Pro. I have installed Redis and Redis-cli and am able to run it on my machines. But I am looking for help in setting up the Unity3D client. I am, shall we say, better at overall database design than at the details of network installation and maintenance, and we will be looking for expertise in that area as our game nears release.

Regards,
Larry Applegate
MegaWorld Studios

Marc Gravell

unread,
Sep 2, 2013, 6:28:23 AM9/2/13
to redi...@googlegroups.com, larry.a...@gmail.com
Is there a specific question here? Did you try the TeamDev client? Did it work? If not, what problems / symptoms did you encounter?

IIRC, Miguel's "redis-sharp" client will also build for 2.0 if you rewrite one method (it uses LINQ in exactly one place, which can be trivially removed - other than that, it is 2.0-friendly).

Marc


--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at http://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/groups/opt_out.



--
Regards,

Marc

Larry Applegate

unread,
Sep 2, 2013, 1:12:52 PM9/2/13
to redi...@googlegroups.com, larry.a...@gmail.com
Hi Marc,

Thanks for answering, and for the info on "redis-sharp". It would be nicer to have source in the project instead of a DLL.

I didn't get as far as trying the TeamDev client because I was unable to connect to redis on localhost port 6379, even though I can run redis-cli in Terminal and try all the examples in the 15-minute introduction of Redis data types. The error I get in Unity is "The connection to 127.0.0.1:6379 failed. Are you sure the server can be connected to?"

I presume this is probably something like a port unlocking issue, but I don't know what to do.

Larry

Josiah Carlson

unread,
Sep 2, 2013, 2:05:35 PM9/2/13
to redi...@googlegroups.com, larry.a...@gmail.com
If Redis server is running on a mac laptop, and your client is running on a different machine, then 127.0.0.1 won't work as a listening IP or for an IP for you to connect to - it is "localhost". You need to bind your server to a different IP address that is available over the network, and you need to tell your client to connect to that IP address. If I have misinterpreted what you described, please describe again with more detail.

Now, with all of that said, you should not have your game client connecting directly to Redis at all. Seriously. Stop it. You can do it for testing and for demoing at GDC, but if you do it for production, everyone is going to hack you. Redis was not designed with anything more than basic-level security in mind. The protocol is not encrypted, there are no user-level permissions, and of the handful of things you can do to protect your data... anyone sniffing the wire will know what is going on and you will be screwed.

 - Josiah



--

Larry Applegate

unread,
Sep 2, 2013, 2:17:48 PM9/2/13
to redi...@googlegroups.com, larry.a...@gmail.com
I'm aware of all that! I'm just trying to start getting anything at all to work on my local machine, not between two different machines yet. I want to start coding someday. So far all I can do is play with redis-cli.

Several months ago I installed SmartFox server locally and talked to it from both the same machine and between machines on my network. Then my colleague set up a Linux server, and I was able to write a server extension in Java for it. But he did the initial install, and is not involved at my new job. I did need to get a couple of questions answered from SmartFox to get that running.

I eventually need to install the client in the old Mono that Unity uses. But first, I would like to get a client working in Xamarin Studio, to do some initial development.

dh lee

unread,
Jun 7, 2014, 9:00:32 PM6/7/14
to redi...@googlegroups.com, larry.a...@gmail.com
hi, so I saw teamdev page, https://redis.codeplex.com/

but how to install? It seems it require nuget and nuget require visual studio install? I dont want vs because it is expensive. 

or just drag and drop teamdev's dll to unity project's plugin folder is enough? 

And how to connect remote redis server from within unity3d editor or unity3d made android mobile game? 

Thx.

 
Reply all
Reply to author
Forward
0 new messages