Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


ellisvlad

Member Since 19 Sep 2012
Offline Last Active May 24 2015 04:08 PM

Topics I've Started

Playing Video With Alpha

08 April 2015 - 05:09 PM

Hi, I'm a developer for a Minecraft Group called Noxcrew. Basically, what I'm trying to do, is get videos with an alpha channel drawn in Minecraft (LWJGL).

 

Right now, I'm using VLCj to load and render the video to a OpenGL texture, and then drawing this to the screen. When I started, I would get segfault every time I loaded a video. This was because the memory buffer was being freed by Java's GC before VLC was finished with it.

After storing the memory of the VLCj MediaPlayer in a static variable, I get a crash after 10 mins to 30 mins of running. I would assume also it's because of the Java GC. I'm guessing it is because the directmemorybuffer is being moved by Java from eden to a more permanent space, but this corrupts any pointers that VLCj stores.

 

I've been struggling to get VLCj to work for a few weeks now, and have a working-ish solution that just means I have to re-initialise VLCj every 15 mins of running.

 

The other half of the problem, is the video we are trying to render has an alpha channel. At first, we used just a chroma key to filter out a color as each frame rendered.. But there were problems with the way most video formats compress the video data. Then we tried using the Quicktime 32-bit MOV format, which supports an alpha channel in the video.. But results in a bitrate of ~300Mbps... Manageable as a last resort, but not ideal..

 

So my two questions are:

1) Is there a reliable way to load and render videos with an alpha channel in Java/OpenGL. Without using a 32-bit mov file with a fixed huge bitrate.

2) Is there a more stable alternative to VLCj to render this video ingame?

 

Thanks for the help guys!


C++ Handle Segfault in Plugins

29 March 2015 - 07:10 AM

So I'm making a small game as a hobby project, and I'd like to implement plugin support. I've been trying to think of the best way to do this, and so far, it looks like using shared libraries that are loaded in at run time is my best bet.

 

So I made a shared library loading system and small API for some of the game features, and it's all going well... But then I made a mistake in my test plugin that caused a segfault, and brought down the whole game with it!

 

Is there a better way to do plugins that means they can be loaded in at run-time, but don't cause the whole game to crash if there is a bug in the plugin? Or a simple way to isolate segfaults so I can just unload the shared library if it causes a segfault? I'm using shared libraries because it seemed like the logical choice, but is there a better option that anyone can recommend?


OXY - A programming language

31 March 2013 - 06:30 AM

Hi there, my name is Vlad Ellis, and for the past few months I have been planning on writing a programming language. On the first of this month, I actually started programming the project, and progress so far has been great! There is a working compiler and interpreter, which are capable of compiling and running some basic operations. So far I have implemented setting and freeing variables, if/else/for/while, math (using +-*/() and variables), and function calling. The next challenge now is to add function definitions, objects and included files.

So far the language is very fast, and is working as intended. I hope to finish everything mentioned above and test it some more by the end of next month. :D I will then post binaries for both the compiler and runner here for anyone to test and play around with (Windows only for now)

In the future, I will remove the need for a separate runner, and the compiler will output .Exe files. I also hope to start writing an IDE for the language some time toward the end of next month, which probably won't be ready for testing by the end of the month, but I will definitely post some screenshots of it.

So my questions to this community...
- Is writing my own programming language a good idea? It is mainly for educational purposes, but could become more?
- I have seen some projects like this in the past, and normally the developers sell their cross platform compiler for a lot of money ($1,000+), and their languages are almost always slow and the compiled .exe is often bulky (4MB for an almost empty project?!) would it be realistic to try and sell my finished compiler? (for much much less of course!)
- Am I wasting my time on this? :S
- What is important to see in a programming language? (Functions, object-oriented, etc.)
- Any other general feedback or comments/questions would be great :D

Thank you for reading!

PARTNERS