Tuesday, October 16, 2012
Comparing RuneEngine to Unity3D - Test #1
Test Case --
20,000 Cubes assigned to Diffuse texture
500 Point lights
0 moving objects
Deferred Rendering configured.
720x480 resolution
Physics Disabled
Input Disabled
Unity3D 3.5.6f4 --
Editor Crashed
Debug build Crashed
Release build Runs
FPS in Debug: n/a
FPS in Release: ~3-4
RuneEngine v2 --
Editor n/a
Debug Build Runs
Release Build Runs
FPS in Debug: not tested due to Unity3D results
FPS in Release: ~135-140 as Active Window ~35-40 as Inactive Window
Further tested to determine threshold for 30FPS with 500 deferred lights found that this can support up to 400,000 diffuse textured cubes in conjunction with 500 deferred lights non-moving while remaining above 30FPS.
Ok, a lot of abstract information. Well, for those who are not aware 28+ is a solid framerate to avoid jerkiness, but some video formats only push 24/25 FPS and remains unnoticed. Therefore RuneEngine is fully capable of pushing non-jerky frames in this test case and well beyond the specific test case while Unity is not.
My analysis from these results is as follows, the new Update Systems and the Rendering Pipeline are optimal, though are still receiving some improvements. However, Unity3d is likely to have some overhead that RuneEngine at this time has not accounted for. Such as the Quad tree sorting. In the basic scene all objects are rendered, but Unity would still be processing this sort. Depending on the nature of how they do this that could be the cause of what is seen. However, I must note that prior to the new Update System in RuneEngine my framerate results were rather similar to what is seen in Unity3D suggesting that this optimization may be the sole reason for the substantial performance difference.
Time will tell if this landslide performance difference continues to be so, but at the moment RuneEngine outperforms Unity3D by ~45-46 times...
I intend to do some further testing with this as time progresses, as well as confirming the performance of Unity3D Professional in comparison. For now this is a pretty big success for RuneEngine I believe.
Thursday, September 27, 2012
RuneEngine V2's Flow System
If you're at all familiar with DirectShow basically imagine that, but re purposed for something... different. For those who don't know, essentially we're working in Blocks that I call the IFlowBlock interface. A block defines a procedure that handles a certain type of data. This part is somewhat different from what DirectShow does. The data is generic, where in DirectShow it's always a type of media passed by a buffer of bytes. RuneEngine's Flow system can pass more or less whatever you see fit. There are just a few rules. So, in DirectShow a sample or data is passed downstream all the way to the end, in every case. Well... Flow is not going to do the same necessarily. It can, but generally speaking the end block is going to be a renderer or finalizing state, so it should only be hit when the rest is complete. Flow data starts upstream and passes downstream until it hits a breaking condition. Data can be flagged for passthrough transit meaning, it's going all the way to the end or to a certain point before processing itself.
I could go on and on about how data moves and the different possibilities, but the key thing to understand about Flow vs DirectShow. DirectShow has rules, while Flow is more user defined. The both have Pins and "Filters" or "Blocks", even "Graphs", but ultimately they are completely different beasts.
Flow is not designed for processing video/image data, it is designed for processing some data in a specified sequence using a system of interchangeable blocks. Within the upcoming particle system this will be used by the ParticleController.
The blocks though will control a state of a particle. A particle graph may look rather complicated, but it houses some insane possibilities compared to other particle systems. And it does this without creating 20 emitters and controllers. Below is an example of what a simple particle system graph may look like:
This demonstrates that this system is more sequence driven. One block does not start til the following is complete, though that is not a forced behavior. It was the design. However, particles are small instances so the overall will almost seem like streaming update, it's not exactly. Now, in theory could you create a loop back effect to handling particles, without changing the underlying system? Absolutely!!! You could easily create a block that has a loop back output pin which send's items back to another block if the parameter to pass forward has not been met.
Given that this system is newish, and purpose is different than similar systems these are only speculations of ideas. The actual implementation and design of graphs will come after some testing. If I find some cool tricks to do with the FlowGraphs they will likely get shared as examples. =)
That's all I got for now though.
Wednesday, September 19, 2012
New API objects for RuneEngine V2
RuneEngine V2 has had a feature since the beginning referred to as a content reference system. The idea and purpose of this system is to be able to dynamically load content and handle such implementation as transparently as possible. Sadly, it only truly came to my attention last night it was not serving it's full purpose. It wasn't exactly wrong.. but it was defeating it's purpose in existing with the existing implementation.
Now some MAJOR changes were made, everything from the outside looks almost the same, except it is a little easier to use now. I should be taking that another notch further, but that's a completely different talk. So, what was changed? Here's a basic list from the far back perspective:
Removed--
IMaterialReference
IPostShaderReference
MaterialReferenceObject
PostShaderReferenceObject
MultimapTextureReferenceObject (rebuilt to interact with the TextureReferenceObject instead of separate)
Added--
IShaderReference (new material reference, but also serves as post shader reference)
RenderTargetReferenceObject( it was missing )
IContentContainer (this guy... does magic)
ShaderReferenceObject
Ok, that's about it. As you can see it's a pretty even exchange, but the added were completely missing or are more of a rename. The multimap texture reference and texture reference objects were completely unnecessary to be separate, I may have to do some wiggling to make it work, but it is done. Material references and post shading references were extremely redundant hence the spark to make these changes. In the process is how I found the issues.
IContentContainer was added to resolve the biggest of the issues as well as add a few functionalities that really make this feature sing. The issue was, the reference objects were calling load methods on instantiation in most cases, and if they didn't. The components were. Why not use a normal load call if I'm not going to use these for what they were added for right? So, first I stripped all calls that forced loading of the content references, then looked closely at what was missing. IContentContainer was what I came up with. This interface defines a collection of callbacks that the IContentReference objects call when they are loaded or unloaded. It has a method for making sure the reference is associated. That sort of thing.
One interface all it really took? Not a chance! Now, the IContentReference interface also has some added methods for working with the IContentContainer. Also, RuneContentManager was extended and improved to work more closely with this new interface as well.
So, rather than being super abstract about what happens let me just explain a few scenarios and how these changes have impacted them.
Scenario #1:
I'm building a game where the scene is rather simple, but the Content takes a long time to load. I do not want to make a super long load time when a level is loaded. But, I'm afraid to preload the content bogging down the CPU in the main menu. In this case I can preload the Scene files but not the content. Once the level is selected we can prioritize required content loading it first allowing the level to start with partial content and potentially even a partial scene. The reference objects allow this separation of load times, but not in a way that is forced by the engine. You can load it whenever you please.
Scenario #2:
I have a large collection of global resources that need to be loaded. I can put them in a global RuneContentManager and link it to my SceneGraphs allow the components to search through it's content as well. I can load all these global content items at startup, background or load screen. And pull them using the RuneContentManager linking systems. The amazing part here is that the contentReferences will manage unloading and reloading of those assets individually if they're not really being used. Also, the ContentReferences will pull more directly from the contentManagers now than before.
Scenario #3:
I'm building an Elder Scrolls Clone.... GG! The newest implementations actually allow full user control over when content is loaded and the IContentReference objects do all the tricky stuff. You can load a resource in anyway RuneEngine allows and the components and the IContentReferences will receive that callback letting all places that need to know, know that the resource is available and can be used now. No periodic or frame by frame update required. All of this leading to a fully seamless platform capability in a very simple way at that.
TextureContentComponent.AssetName = "assetName";
RuneContentManager.Load( "assetName" );
Done.. This like much of RuneEngine, is order independent. RuneEngine is unique in this element that I've spent a lot of time working around pre-requisite type issues. The game will not fail when resources are missing it'll just respond to it internally or with user defined code. Components can be added in any order. SceneNodes can be activated before or after components are added, it doesn't matter. The only real prequisite to any of RuneEngine is this line:
RuneManagementService.Startup();
I'm extremely enthusiastic lately watching all of these architectural designs in the engine being realized. So pardon me if I seem ranty.
Anyways, happy coding.
Wednesday, September 5, 2012
Thoughts after the RuneEngine V2 Code Review
Going through this I had quite a few thoughts. Absolutely none of them involved considering change. I found that for 210 code files currently they all seem to be in pretty good order and have great readability. But that is aside from the point. The real point is an issue of mentality gained from reviewing the source.
I have spent a lot of time over the past few months procrastinating about not working on the engine. I am getting heavy back in development with it so I decided a cleanup pass was in my best interest. I had been procrastinating because of "how much is left." Well, this review showed me quite a it in the direction of how inaccurate that really is. There are still plenty of unfinished areas and new features that need implementation, but reminding myself that there are systems and features already implemented that push into professional grade quality affected my opinion of where I am at. It would appear that by the end of the week I could have any loose ends taken care of and begin development of new features next week. By new features I specifically mean building the editor.
Now, I've spoken here about the goals of the engine as far as features, but here's a list of what I found that gives me such a confident outlook on the status.
- Deferred Rendering
- Post Processing System
- Dynamic Content system
- Custom material format
- User defined geometry system capable of working to the extent of a simple modeling utility
- Extendable file IO system
- Extendable XNA content resource extensibility (This is small, but huge at the same time, specifically it is built that shaders with custom structs used can be applied via the material file format with some extension to this area)
- Input System, with plugin capabilities
- Updateless and per-frame draw call removed system (huge optimization)
- Custom SpriteBatch which renders into a deferred scene with textures that support the multiple channels.
- Architecture in a way that almost every part of the engine is 100% self reliant.
- Low-Level and High-Level implementations for most features
As a foundation, RuneEngine V2 has all the necessary pieces to be something really impressive. Nearly the entire engine is designed for extendability. This design is going to make moving forward significantly easier than it was in past iterations.
Very soon, after the loose ends are tied up I will be making a post here and on the RuneEngine V2 facebook page. This post is going to be a demonstration of development with RuneEngine V2. I want to showcase, how some of this stuff is compartmentalized and how, as a coder using it, things are going to be done. In many cases a test project only consists of a few RuneEngine lines of code. If it's much more then it is due to setting up parameters of objects for a less "defaulted" test.
Anyways, happy coding.
Thursday, August 30, 2012
My new Development Pattern and why it works
Tuesday, July 24, 2012
Console Game Architecture: Part 1
One crucial part to all games is the While loop. So, in console games many people make this mistake in thinking. Oh it's text based so I don't need that. Sorry, you really do. Granted you can avoid it, but you're only making it harder if you don't use the loop. That means you need a boolean field which determines if the game is running and a while loop which utilizes that value. here is the simplest way to approach this.
Nothing hard about that. Making sure you start here is crucial to saving yourself thousands of headaches later. Now, another big mistake I see is the lack of use for input handler methods. I'm going to write a few examples and show you what I mean by this.
This is our global input handler, you use this one to handle input that you want for any and all input manipulation. Pretty neat concept right? There are two methods one for a one shot call, and the second which actually handles the input so it can be called by other handlers.
The ones below are for handling the concept of room navigation. Same concept of the two methods, but notice in the RoomInputHandler method I call GlobalInputhandle. The nRoomIndex argument is used to update the current room, this handler does all this for you with the room information set up accordingly. The RoomInfo[] is a simple struct which holds the name and description. All the rest of this is the same as the global handler.
The coolest part about all this so far. That's majority of it. The rest is pretty much whatever you want it to be. I'm adding a few other parts to this as a series, but this covers 99% of what most students which consult me are missing.
Hope this helps.
P.S. I used screenshots so you can actually write the code yourself and not just copy it on purpose ;-)
Wednesday, June 6, 2012
State Of RuneEngine V2
RuneEngine V2 is currently somewhere near the 50,000 line mark in C# and C++/CLI code. All Visual Studio 2010 developed. Most of which is 2008 compliant which I intend to update in order to be 100% 2008 compliant. RuneEngine is developed against XNA 4.0 and .NET 4 runtimes. I want to make a few minor changes to allow XNA 3.1 compilation, but I may never do this unless at some point I am asked to do so. The C++ Native build is in a semi skeletal structure, but has no executable implementation at this time.
Recent Changes-
I have recently updated the assemblies and consolidated them to be more concise and promote stronger modularity. The new list of the core dlls is as follows:
- RuneEngine.dll
- RuneEngine.Content.dll
- RuneEngine.Components.dll
- RuneEngine.Components.Baseline.dll
- RuneEngine.Graphics.dll
- RuneEngine.IO.dll
- RuneEngine.Physics.dll
- RuneEngine.Scene.dll
- RuneEngine.Components.Sidescrolling
- RuneEngine.Components.RolePlaying
- RuneEngine.Components.Adventure
- RuneEngine.Components.Strategy
- RuneEngine.Components.FirstPerson
Friday, April 20, 2012
Designing RuneEngine V2
Interfaces and Polymorphism
One of the biggest concepts that have stuck hard in the new structure of the engine is strong use of Polymorphing topics and interfaces. This is extremely important for users who would plan to extend the engine and add objects without having to write crazy wrappers around my rendering and content systems. Almost every object in the engine implements an interface, and almost all of the internal systems use the interfaces and NOT the objects directly to handle core features. For example, all content reference objects are interface driven and apply specific rules that the rendering pipeline requires. So, the rendering pipeline only requires the interface and proper implementation. Therefore, this can be extended very easily so long as the interfaces are implemented correctly. The most recent IO systems are nearly 100% interface driven, and probably show the extensibility of RuneEngine at it’s peak. The physics system exposes no objects, only interfaces and attaches to physics engine wrappers, so to add a new custom engine is trivial(well as far as making it work with RuneEngine goes).
As you can see those are some major area’s and they are very simple to plug into the existing API. This makes my life especially easier, but other’s using the engine could gain the same benefit as these interfaces are not internal and can be used by anyone.
Key reasons for the high focus here are obviously for extensibility and generic behaviors. This benefits mostly programmers, but that high benefit could allow a team to do much more with RuneEngine than what I allow them to.
Internal Code Cleanup/Optimization
This is a huge reason I started restructuring the engine. My goals for what I wanted it to be changed a few times during the first structure so the internals were getting haggard and the calling conventions were inconsistent.
So what are the new guidelines and why? First a little history of what it kept shaping around originally. When I first started the engine it was designed to be built like C++, well I took that a little too seriously. So, I backed off that and went way the other direction for a while. The object oriented model has always been very important through development of this, but some pieces were being written poorly, and as the ideas changed the legacy code was not getting removed. This made the code base fairly hard to work in as there was a mix of all sorts of styles. Before I started the restructure I gained an even better handle over C++ development and stay well practiced with it building many prototypes first in C++. The C++ iteration was started for RuneEngine. This is when I saw how poorly they were going to correlate. Some parts would work fine while others would need full rewrites. Therefore, the engine began restructuring. I use the term restructuring because I have not rewritten much of the internal code, just optimized and sorted it better. Much of it has not changed aside from areas where the objects used were changed greatly.
Ok, so let’s focus more on what has happened internally now. Originally there were a lot of methods calling methods and deeper callstacks, well now unless completely necessary every method is completely self maintained and does not internally call upon another. I’ve made my method argument lists more appropriate for C++ porting. However, I have also added higher level overloads which do not look as much like C++. Naming conventions have been held true, and many fields are marked internal now. Using statements have been cleaned up(this can actually be a huge optimization). All of this has made the performance better and the cleanliness much greater.
Exposure of High Level and Low Level methods
Before I only really exposed high level methods to access features. Although, I did have internal methods to do much of the low level portion as well. The biggest change here is that the low-level methods are now public and cleaned up. This also gets back into extensibility of the engine. If I don’t expose these methods then users of the engine will still have to handle things the XNA way. My methods just make that process a little simpler, even the low level ones.
IO vs Content Pipeline
This is a big change more so than original design at all. Originally there was a high focus on the IO system to load files which were unique to RuneEngine. Well, to adhere better to XNA and what XNA developers are used to, I am extending the ContentPipeline for many proprietary formats. Of course the C++ iteration will need some major differences here, but it should be manageable. So, pretty much all Rune specific content types are extended in the pipeline. And therefore could be used without any feature in RuneEngine at all.
Compartmentalized Design
This has been the plan since day one. Each DLL has been designed to be completely self maintained and features are being better designed in this new structure to hold true that they can work without the rest of the engine. I do this by writing majority of the objects completely independent from the rest of the engine. I had made some mistakes in the original structure, primarily the content systems. The content was reliant on every other part there, and the Graphics wrappers I had built as well. Now they’re self maintained and as stated above can be loaded through the content pipeline and be used with normal XNA projects.
Platform Target considerations
This part is simple, I’ve focused towards XBOX360, because it has more restrictions than PC and it’s not a mobile device. Not to hark on mobile, but just because market studies show it as the better revenue stream doesn’t mean it’s my primary focus. I prefer to focus on maximum quality I’m capable for. I’m not going to downgrade the output by adhering to mobile. This is a personal stubbornness of mine and I admit that, but I am NOT ignoring mobile. Just I will build the engine focused against everything else and make a mobile build later. Adhering to 360 and REACH profiles are going to keep me closer to what mobile will expect, so I am genuinely not concerned.
Development Tools
There is a fairly large concern here as well, but none of this matters if the engine itself behind it is not backing it. So, I’ve rebuilt a lot of the editor and have a lot of plans for working new features into this side of the engine. There is also a strong feel for extensibility here.
That about wraps it all up, there is not much more to point out at this time. Of course there has been a lot of time spent some days determining what a method should be called, and where it should be located. I didn’t think any of that detail was that important ;-D. Anyways, until next time…
Friday, April 6, 2012
Project Organization and File Structure
I was just thinking on this and realized that I preach about
this to everyone, all my student, anyone I get into dialog with about
programming development. This is something
I’ve gotten better about over the years and have also seen how big of a problem
it can be not doing so. ORGANIZE YOUR
FILES!!!!! Make a bulletproof file
structure. I can’t stress that any more
than I am right now. If you do not get
your files organized in a way you can find things quickly, you will hurt
yourself later.
Now, I don’t believe I have taken the time to give some big
tips and tricks that have worked before for me on a regular basis, so I’m going
to put them up here now. When I create a
new project I generally spend about 2-3 hours putting it together BEFORE
writing a single line of code. You may
say “WOW that’s a lot of time for preparation,” but I say 2-3 hours on a
project that you’re going to spend more than a week on… that 2-3 hours is
nothing. And if you didn’t do it I
wouldn’t be far from promising it would take 2 weeks instead of 1.
So, what I start a new project what do I do? First of all first and foremost even before
starting VS. I create a master directory
for the project. Typically on the root C
drive of my PC at home, if I had a D partition it would probably be there. For example RuneEngine V2’s master directory
is located at “C:\RUNE2.” Now what goes
in the master directory? The solution
right? NO!!! I stress that the solution
is not created here because with the rest I’m going to cover creating backups
would be nearly impossible or an extremely painful process otherwise.
The next folder I create is a child folder of the Master
directory “Bin”. This is where ALL my
projects output goes. In C:\RUNE2\Bin I have these sub directories:
REACH
HiDef
XBOX360
Mobile
DOCS (Yes I actually build documentation, it would not be
inappropriate for this go to outside of the bin in the master directory if you
prefer)
Editor
EditorAPI
As you may see above, these are all the platform targets,
not debug and release like VS typically creates. This is entirely intentional; my
Debug/Release folders are contained in these.
And this is where my projects target their output. This is why we do NOT put the solution in the
Master directory. When we create the
projects and configure their target paths we do not have to redo this for any
backups we generate. Also, Source
control is easier to… well control this way.
So, where are the projects created? They’re created in Subdirectories of the
Master Directory. The current working
solution is contained in C:\RUNE2\RuneEngine_2D_MAIN, but there are 4 other
backups and iterations of the engine there as well as the initiation of the
Native code etc etc blah blah. The
Master Directory contains anything and everything related to the project in
this setup, and it isn’t burrowed in C:\Users\Me\Documents\Visual Studio
2010\Projects….. Yep, not my favorite place to put things.
A note on source control, IF YOU ARE NOT CAREFUL YOUR
PROJECT CAN BE CORRUPTED, hence why I have multiple backups at all times. Usually it only gets corrupted if you’re using
it incorrectly, but better safe than sorry with large projects.
A note about creation of code files in the solution explorer
and handling folders. In C# you’ve
probably noticed that it adds namespace when you add to the folder. And sometimes you don’t want that. Of course you can just delete it and fix it
that way, but my tip is to just always add files in the namespace you desire
and if you want to move the file somewhere else to be more organized, it’s a
simple drag operation.
I hope this is a good read for other developers out there,
everyone has their own styles of handling files and I’ve tried quite a few
variations and this is the way I plan to stick to for a while. Below is a pseudo copy of my file structure
in RuneEngine v2’s project directories:
C:\
RUNE2 – Master
Bin
REACH (Debug/Release)
HiDef (Debug/Release)
XBOX360 (Debug/Release)
Mobile (Debug/Release)
DOCS
Editor (Debug/Release)
EditorAPI (Debug/Release) – FYI I’m going to be
talking A LOT about this soon.
Lib
Includes (Lib and
includes are for the native build ignore them if you’re developing fully
managed)
RuneEngine_2D_MAIN
(There are
actually multiple solutions here which load different combinations of the
projects)
RuneEngine
RuneEngine.Graphics
RuneEngine.Content
RuneEngine.Physics
RuneEngine.ContentExtensions
RuneEngine.Math
RuneEngine.Scene
RuneEngine.Threading
RuneEngine.Components
RuneEngineOLD2
RuneEngineOLD1
RuneEngineBACKUP
RENativeDX
I wanted to make one last modification to this, though I suggest this methodology highly if it doesn't work for you don't do it. This ulimatley is a reminder of how important this is and a suggestion in what works for me. It's mostly about what you benefit from most. -Happy coding
Wednesday, April 4, 2012
DevConnections 2012 - Las Vegas
- Intellisense has greatly improved
- Types are now color coded
Aside from that, I really don't have a whole lot here.
Friday, February 17, 2012
ThreadPool vs Custom Pool : MultiPipeThread
This is actually something I did research on a while back (6 months or so). The ThreadPool object in .NET is a fairly powerful concept which reuses existing threads registered to the pool and allocates new threads as necessary dependent on your machine specs. Like all High Level objects this has some overhead to it, but probably less than what most could create on their own with exactly the same behavior.
Wednesday, February 15, 2012
Polymorphism: Structs, Interfaces, and Huh?
Ok, I know odd title, but I promise this will all get explained.
First, let’s start with some definitions of these concepts.
Polymorphism-
I like the Wiki version of this definition so here’s the link: http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming
For those who prefer not to click links and stay here, I will explain in a 1000 foot overview way. Basically in object-oriented programming, this is the ability to create a value, variable, function, or object that has more than one form. Shapeshifting so to speak, just as it would mean if not referring to coding. WOW! Simple enough right?
Structs-
MSDN does a fairly good job describing this:
http://msdn.microsoft.com/en-us/library/saxz13w4.aspx
Here, a struct is essentially the same as a class but it’s a value type. Just a little more limited, but can be less expensive, especially when using smaller objects that may be contained in large collections for example.
To get deep with it, a class is allocated in memory and allocates pointers (IntPtr) to the object wherever you place a field for reference type objects, classes.
However, structs, or value types, are allocated where you place them and do not generate pointers. This does mean they will copy and become unique allocations moving through the call stack and around the different scopes of your application, this can make them both easier and more difficult to control.
Interfaces-
MSDN also does their job well here:
http://msdn.microsoft.com/en-us/library/ms173156.aspx
Interfaces can be a complex topic for some, but to try to sum it up as simple as possible. They contain a reference to an object which implements the same methods, properties events that the interface defines. If you’ve dealt with C++ these will look a lot like class definitions in header files, and ALMOST behave like them. Interfaces cannot be instantiated and cannot define code implementation for it’s members.
Alright, Polymorphism in general is a huge topic of coding, so we’re not getting too deep, just showing one AMAZING example, though it may be hard to see all the benefits without trying it yourself.
If you’ve dealt with structs before you’ll know a few things about them, such as the inability to use inheritance, and the frustrating ref keyword when trying to pass them into methods as a reference type instead. So, their benefits typically get outweighed by the aggravations of these things. Here’s a tidbit that a lot of people forget, though structs cannot inherit they can implement an interface. It gets better though. Interfaces can inherit other interfaces….
Due to the two above facts, we can use polymorphism techniques to build a collection of structs which inherit each other, and can be passed as reference types without the ref keyword.
My example, which I’ve included the class diagram for, uses the following structs and interfaces:
- IVector
- IVector2
- IVector3
- IVector4
- Vector2
- Vector3
- Vector4

Since the structs, the one’s without the ‘I’, cannot inherit each other all the inheritance tree is in the IVector-IVector4, and it just goes incrementally.
Ok, got that part, but what does this allow me to do?
void RandomMethod( IVector aV1 ) { }
The above method declaration accepts IVector, so what can be passed into this method? This method can actually accept ANY Vector type as it’s interface description. It could use IVector.AxisCount to determine which one was actually passed and handle it appropriately.
That’s one use, which is pretty cool. What about this one?
Vector4 v = new Vector4( 1,1,1,1 );
IVector2 v2 = v;
Will this even work? YES, this just gave me a reference to the Vecto4, the object is obviously still the same object, but rather than converting the value, we made it accessible as a Vector2 interface. Of course you would need methods that accept the interface instead of the struct to use it. Hence why IVector2.ToVector2() exists. This is a simple convert, where if the internal object is not a Vector2, it converts it before returning it.
I know this is a lot to take in so I will stop here. Have fun!!!
Introduction
I just wanted to take a moment to explain why I’m even creating this blog before making my first real posting. This blog I am going to use to pull all of my development activity into a single location.
Those who know me already and have been watching some of my other posts on the RuneEngine v2 Facebook Page should know I post almost everything there as it is. However, there are things I reserve posting there as they are unrelated to the RuneEngine project or any of it’s inner workings.
So, basically anything I post there or anywhere else, will likely end up here as well.
A little about me though. My name is Danny Helms and I am a full time support agent for an Imaging SDK provider in
You may see me mention use of languages in:
- -C#
- C++
- WPF
- Silverlight
- SOME VB.NET
- Javascript
- May start some Java soon
- ASP.NET is also something I will likely piddle with in near future.
Common SDKs I use:
- Microsoft’s XNA Framework
- WeiFenLou Docking API (May not use this as much as I am moving further into WPF development)
- BEPU Physics Engine
Current Projects:
RuneEngine V2 Projects----
- RuneEditor.API (Simple API for addons to the RuneEditor application)
- RuneEngine (2D)
- RuneEngine (Native)
- RuneEngine (Reach, Mobile friendly)
- RuneEngine (HiDef, the core project and most of my efforts go here)
- BitbucketReporting.API ( Utility API for working with Bitbucket's WCF API, included in RuneEditor.API )