Skip to main content

Posts

Showing posts with the label topic-graphics-video

GPL-ed My 2D Tile Based Map Editor

As I’ve started to consider getting back into computer work, I’m trying to refresh my memory and grow further. Today I released, with the GPLv3 license, a 2D tile based map editor I wrote in C# WinForms. If you are into software and game development this might be of interest to you! The video doesn’t go into programming, but I describe what it is currently capable of. Maybe in the future I’ll do a video series explaining the code. I’ll also be looking through my software library to see if there is anything else I can release to the world under a GPLv3 license. Github: https://github.com/TheWayOfCoding/TWOC2DTileMapEditor Help me out through donating (Paypal) I wrote most of this around 2014 or 2015 with the intent to use it for a game a friend and I were going to make, but that didn’t happen. A few years later I ended up improving it a bit and using it in the development of an Android game (that is in an unfinished state). It’s nothing spectacular, but it is functional. I’m licensing ...

Using Raphael the JavaScript graphics library.

In this example, I go over a simple use of Raphael.js. It draws 4 boxes on the page and allows you to move and resize each independently. Here is the graphics library (licenses under the MIT license): https://dmitrybaranovskiy.github.io/raphael/ Here is my code on GitHub. The basic gist of it is to initialize the primary Raphael object and apply it to the page. After that you create the boxes you want to draw and associate them with a “drag” function that is called when the user interacts with each box. Here is a selection of the code below: // Define 4 boxes to draw on screen var boxListing = [ { x: '10', y: '10', width: '70', height: '70', boxname: 'Box 1' }, { x: '110', y: '10', width: '70', height: '70', boxname: 'Box 2' }, { x: '210', y: '10', width: '80', height: '80', boxname: 'Box 3' }, { x: '310', y: '10', width: '90', ...

Android: Basic game loop with scaled graphics.

In this article I go over implementing a simple game loop with a custom view. The standard draw method is used with some timing checks so that we can get an approximately consistent refresh rate. This is a somewhat simple way to get started without having to use something OpenGL. The full source code is on GitHub. The main activity handles the creation of our custom view and passes along screen size information once it’s available. This is a key step because it allows us to get that screen information before the view actually starts being displayed. I have a previous tutorial on just that here so I am going to omit the main activity code and the related xml layout file. If you want an exact game update loop structure, you might need further restrict any numeric changes in your game specifically by time rather than having them in the middle of the draw loop that is approximately updated on a given time frame. I haven’t done any testing to verify if that’s needed or not. Also, read up o...

FXAA Shader Anti-aliasing in XNA 4.0 Winforms

I had the challenge of trying to get some type of anti-aliasing in a project that uses the winforms method of XNA 4 that was being run on a laptop in REACH mode. My first step was figuring out a method to use. I found quite a few shader based methods available, but I could get none of them to work. FXAA written by a engineer at NVIDIA seemed like the best option, so I went with that. I wrote up a question on Stack Overflow to see if anyone could help. Eventually with enough research and …playing around… with the code I have it functioning. Here is an example to help anyone who might be interested in doing the same thing. —————————————————- I’m using this example project’s XNA 4.0 form control in an application I’m writing: http://creators.xna.com/en-US/sample/winforms_series1 If you are unfamiliar with FXAA, check out the creator’s site: http://timothylottes.blogspot.com/2011/03/nvidia-fxaa.html I’ve spent quite a bit of time so far trying to figure out to use it without any luck...

Flash video in a website

While researching about displaying video in web pages I came upon a good [free] solution. It uses: Free and open source flash based video player called FlowPlayer. Their website: http://flowplayer.sourceforge.net/ To encode the videos into the flv video format I used a free tool called Riva FLV Encoder. Their website: http://rivavx.de/?encoder Why a flash player as apposed to quicktime/windows media player/real player? A lot more people have Adobe Flash installed and it’s just a generally more foolproof method of serving videos on the web (aka. the extremely popular youtube.com is flash based). Here is an example of the html required: <object type="application/x-shockwave-flash" data="videos/FlowPlayer.swf" width="320" height="263" id="FlowPlayer"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="videos/FlowPlayer.swf" /> <param name=...