Ruby game engine

Frederico de Oliveira Linhares <[email protected]>
Newsgroups gmane.comp.lang.ruby.general
Message-ID <CP2PR80MB3940FC47C9EAD99E9E8EF1BBE2450@CP2PR80MB3940.lamprd80.prod.outlook.com>
Hello!

I am writing a 3D game engine, instead of writing it in C++ and making a binding I am doing it directly in Ruby. I never saw anything similar so I don't know if is a good idea and if is going to work. Until now it's working.

In my engine I have a code similar to this:

Engine::init do
  character_mesh = Engine::Mesh.new("/path/to/mesh")
  Engine::run
end

 The 'Engine::init' initialize systems like Vulkan before executing the code block and finalize those systems after the code block exit. The problem is, I must ensure that 'Mesh.new' can be called only after 'Engine::init' and also ensure the garbage collector free the 'Mesh' after the code block and before my code that finalize Vulkan. What is the best approach to do it?

Note: the Mesh and the code that initialize and finalize Vulkan was entirely implemented in C/C++. I am not using Ruby Rice, I don't feel I need it.

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.