I've been using GM for 5 years now, and last year I started to
learn c++. I had been working on an online gave for over 2 years, and I
started learning c++ specifically so I could have a faster server. I
had the game finished in gml, but it was too slow to run so I figured it
couldn’t be taht hard to write it in c++. Well I was dead wrong. I’ve
been trying to “translate” the server to c++ for over a year and all
I’ve managed is creating a program that can send text messages back and
forth. I could have done that in GM in about 1 minute.
Anyways I decided that if I ever want to finish this game, I
better find a different language for the server. I found out about ruby
and it seems to be a lot like GM except it gives you control over
classes etc… Which is basically what I was looking for all along. But
what I’m really hopping for is that ruby has database/network support
built in. So that I could just call a function like send(), rcv() and
wouldn’t have to write a c++ dll for the network (kind of
couterporductive). Database support is especially important. Is there
any support for mysql in ruby? I know about ruby on rails, but I’m not
making a web aplication, so I don’t think thats what I’m looking for. I
figured ruby probably had database support since ruby on rails does.
Can anyone tell me where I could find out about Ruby’s database/network
support if it has any?
Is there
any support for mysql in ruby? I know about ruby on rails, but I’m not
making a web aplication, so I don’t think thats what I’m looking for. I
figured ruby probably had database support since ruby on rails does.
Can anyone tell me where I could find out about Ruby’s database/network
support if it has any?
so that if you ever for whatever reason want to stop using MySQL, you
can shift to something like Oracle, Postgresql, or whatever with
little trouble. ActiveRecord, the component of Rails that provides
database support, is of course available even if you aren’t using
Rails itself, but I personally haven’t tried to use it independently
of Rails myself. As for networking support, that’s certainly available
within Ruby’s standard library. Have a look at the net/ stuff in the ruby-doc.org site for details on the API. There’s a thing called
Distributed Ruby that makes remote method calls over a network so
simple as to be almost the same as local method calls.
As for the web access I know it can be done. Doing a search on a ruby
wiki or on this list
will give you clues. for example ruby supports cgi whatever that is.
And someone posted recently about ruby and html…
I've been using GM for 5 years now, and last year I started to
learn c++. I had been working on an online gave for over 2 years, and I
started learning c++ specifically so I could have a faster server. I
had the game finished in gml, but it was too slow to run so I figured it
couldn’t be taht hard to write it in c++. Well I was dead wrong. I’ve
been trying to “translate” the server to c++ for over a year and all
I’ve managed is creating a program that can send text messages back and
forth. I could have done that in GM in about 1 minute.
It certainly shouldn’t be hard at all to do in C++.
figured ruby probably had database support since ruby on rails does.
Can anyone tell me where I could find out about Ruby’s database/network
support if it has any?
There are network and database C++ libraries available, just as there
are in Ruby. I certainly have no idea why you felt you had to write a
DLL for the networking code in C++. Certainly sounds like the research
you are doing now in to Ruby would have been useful for you to do early
in your C++ life cycle.
That said, from the sound of your post, Ruby will most likely allow you
to achieve what you want more easily. Whether you get the speed increase
you want is probably going to depend on your implementation.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.