Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

110 Neutral

About Berben

  • Rank
  1. XNA Indie Game - PumpkinToss Creation: http://t.co/jGK5Sjdp via @youtube
  2. Hello Everyone! Currently, I have been working hard on a new Indie game! And I just finished adding animated movement into the game, which allows moving objects along paths. Each path is connected to a series of waypoints, and each edge can give different instructions to the object which is currectly moving along it. Think of like a ride, where each track can change the speed of the gears to create different mechanics of the object above. To accomplish this new animated movement goal, I had to add several new scripting commands to my Indie game engine. The new commands allow me to choose some artwork, like a Palm-Tree, and tell it to move along a pre-created path system. So far, I have added rotations, translations, and scaling ability on any one path edge! This allows for multiple movements at the same time. Also, I updated my cinematic camera system, to allow for smooth camera movement along other waypoint paths! This will allow for some cool effects, like introduction sequences. Now, I was able to accomplish the movement paths, by creating a simple class which holds a collection of Queued items. Each item can be some scripting request, like move along this path. Then the next scripting request could be to rotate. Each of these request are then bunched up and stuck into this queue. I then have a manager class, which checks the queue each game cycle, and performs an operation on this particular scripting action! Once the request is complete, the manager will automatically take the item out of the queue. So, with my new movement scripting system in the engine, I can simply script quick updates with a few scripting lines! Check out my video with these new features;
  3. People drive like retards!
  4. Hello Everyone! A simple idea, like tossing some pumpkin in XNA can take some time and thought to complete. I originally started my Indie game engine "Temporal Wars" back in 2008 with the idea of creating a specific Real-Time-Strategy game. Now, in 2012, I decided to change gears and update the engine to allow for some simple and complex movement patterns, based on scripting calls. The idea is to transform some XNA scene item, like a rotation action, scale action or movement action. With this in mind, I started creating some simple scripting calls which allows updating any scene item in the engine. After several hours of work, I came up with a couple of basic commands to move an object. But, the problem with these simple move commands was the fact they only allowed movement from point A to point B. What I needed was a more complex movement concept, where the movements would combine different operations, like the scaling with movement, while following some path. As I thought about this a little longer, I then came up with another idea, which was to allow different movement actions based on a paths edge! This would then allow an item to move on a mult-path connection, changing speeds and rotation, while on the same path! So, how did I accomplish this? Well... with some nifty collections, queues and stacks, all hidden by some simple scripting calls at the end. Once I got the code completed, I was able to test my new path movement idea! As you can see in picture-A, a path was created in the engine, which moves between waypoints 1 - 5. Each red line in between the waypoint pairs is called an 'Edge'. As some scene item moves along the path or edge, it reacts differently, depending on what actions are entered for that 'Edge'. The palm tree is slowly moving along this path, with the first edge doing a simple movement interpolation between the two waypoints. By the time the palm tree reaches the edge junction point, between waypoint 3 and 4, then scaling operation takes effect automatically, as shown in prior picture. By the time it reaches the end of the path, the palm tree is now scaled back to full size, and is doing a rotation. Any 'Edge' can have multiple scripting action request for some scene item! Once you set your edges with the required actions, it is just a matter of calling one 'Scripting' call, and away your scene items goes!! Ben www.temporalwars.com
  5. The AStarComponent.dll is now available in the marketplace, within the software development section! [color=#00b050]What you Get! [color=#4f6128]The download zip file contains the 'AStarComponent.dll' assembly, designed to be usable in any other XNA project for the PC and Xbox-360. You can also use the bindable component in other types of projects, like simple WPF (Windows Presentation Format) projects for school demonstrations or for learning the A* algorithm. The 'AStarComponent.dll' assembly is designed for extreme performance, and was tested 1000 of hours on the Xbox-360 and PC. [color=#4F6128]The download zip also contains a simple WPF [color=#4f6128](Windows Presentation Format)[color=#4f6128] 'AStarSampleApp', shown in the picture in the marketplace, which shows you how to use the A* pathfinding component. With this sample application, you can study the C# code to see how to call and create A* solution paths in seconds. The code shows how to start bind the assembly, initialize the internal A* graph, and make "Find-Path" solution paths in a matter of seconds! [color=#4F6128]Feel free to use the code in any project you desire!
  6. Ben Scharbach
  7. Ben Scharbach
  8. michael tanzos
  9. How To Install the AStar Sample Application: http://t.co/XakHkVUZ via @youtube
  10. Hello everone! I have learned a lot from these forums about pathfinding. I have also read quite a few articles and books on the subject. After all the reading, I decided to put together my own 'A*' component. The A* component is designed to run on the Xbox 360, using the XNA framework. It also it usable in other applications, like within PC games or WPF window applications. One of the topics I read about was regarding the use of 'Cheap List'. I'm sure some of you have heard of this, since it was used in an older RTS game; originally created in C++. Well, I decided to incorporate this 'Cheap List' into this A* component, and damn... it made a huge difference! The search time went from 250 ms down to 1-8 ms per search! Crazy. Recently, I decided to decouple the A* from my Indie game engine, and make it usable outside the engine. I recently created a WPF application sample, which shows how this works and a YouTube video using this A* component.
  11. When I first started programming my TemporalWars 3D game engine in 2008, very few interfaces were used. However, as the program grew in complexity I quickly realize the importance of compartmentalizing code and abstracting the connections to those units using ‘Interfaces’. For those who are not aware of what an Interface is, an Interface is simply the description of the connections (properties, methods, events) you are making public to some component or class. As your program grows in complexity, you quickly will appreciate the power interfaces bring to your project. So, some of you are reading this saying, “I already know that! What the point?” Well, let’s talk about ‘Late-Binding’ first and connect how Interfaces become useful in this situation. “Early-Binding” is the typical way of programming, where you add some reference to an assembly at the top of the code-base, using C# as an example, and compile the program. With “Early-Binding” the program is aware of the assembly before compilation. In comparison, “Late-Binding” is binding some assembly after a program is compiled, which the original program was not aware of or didn’t have access to the base code during the original compilation. In the TemporalWars 3D Engine I built, I used the following code to achieve “Late-Binding”; // 12/31/2009[font=Consolas][size=2][/font] [color=gray]///[color=green] [color=gray]<summary> [color=gray]///[color=green] Allows LateBinding some Assembly (dll) file, and then will [color=gray]///[color=green] instantiate the given 'ClassName', and return the object to the caller. [color=gray]///[color=green] [color=gray]</summary> [color=gray]///[color=green] [color=gray]<param name="assemblyFile">[color=green]AssemblyFile name to load[color=gray]</param> [color=gray]///[color=green] [color=gray]<param name="className">[color=green]Class Name to instantiate within Assembly[color=gray]</param> [color=gray]///[color=green] [color=gray]<param name="instantiatedObject">[color=green](OUT) Instantiated object[color=gray]</param> [color=gray]///[color=green] [color=gray]<returns>[color=green]True/False of success[color=gray]</returns> [color=blue]private [color=blue]bool LateBindAssembly([color=blue]string assemblyFile, [color=blue]string className, [color=blue]out [color=blue]object instantiatedObject) { instantiatedObject = [color=blue]null; [color=blue]try { [color=green]// set platform location to load from. #if[size=2] XBOX360 const string platformType = "XBox360";[font=Consolas][size=2][/font] #else[size=2] [color=blue]const [color=blue]string platformType = [color=#A31515]"x86"; #endif [color=blue]var a = [color=#2B91AF]Assembly.LoadFrom([color=#A31515]"0LateBinds/" + platformType + [color=#A31515]"/" + assemblyFile); [color=blue]var mytypes = a.GetTypes(); [color=green]//const BindingFlags flags = (BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static | [color=green]// BindingFlags.Instance); [color=green]// Search for Instance to instantiate from Assembly. [color=blue]foreach ([color=blue]var t [color=blue]in mytypes) { [color=green]//var mi = t.GetMethods(flags); #if[size=2] XBOX360 // locate class instance to instantiate. if (t.Name == className)[font=Consolas][size=2][/font] { instantiatedObject = Activator.CreateInstance(t);[font=Consolas][size=2][/font] ((ICommonInitilization) instantiatedObject).CommonInitilization(this); return true;[font=Consolas][size=2][/font] } #else[size=2] [color=green]// locate class instance to instantiate. [color=blue]if (t.Name == className) { instantiatedObject = [color=#2B91AF]Activator.CreateInstance(t, [color=blue]this); return [color=blue]true; } #endif [color=green]/*foreach (var m in mi) { m.Invoke(obj, null);[font=Consolas][size=2][/font] }*/[font=Consolas][size=2][/font] } [color=green]// Name not found [color=blue]return [color=blue]false; } [color=green]// 1/1/2010 - Capture the possibility of the DLL not being in the folder at all. [color=blue]catch ([color=#2B91AF]FileNotFoundException) [color=green]// PC throws this. { System.[color=#2B91AF]Console.WriteLine([color=#A31515]@"DLL Component {0} not found. Therefore, this will be skipped for late binding.", assemblyFile); [color=blue]return [color=blue]false; } [color=blue]catch([color=#2B91AF]IOException) [color=green]// XBOX throws this. { System.[color=#2B91AF]Console.WriteLine([color=#A31515]@"DLL Component {0} not found. Therefore, this will be skipped for late binding.", assemblyFile); [color=blue]return [color=blue]false; } #if[size=2] !XBOX360 [color=blue]catch ([color=#2B91AF]ReflectionTypeLoadException err) { [color=blue]if (err.LoaderExceptions != [color=blue]null) { [color=green]// List out each LoaderException error to console. [color=blue]foreach ([color=blue]var loaderException [color=blue]in err.LoaderExceptions) { if (loaderException.Message != [color=blue]null) System.[color=#2B91AF]Console.WriteLine([color=#A31515]@"LoaderExceptions reflection error - {0}", loaderException.Message); } [color=#2B91AF]MessageBox.Show( @"Late-Binding failed, due to a Loading Exception on the Interface! This usually occurs if you have an outdated interface; please update your interface for the assembly you are trying to late-bind.", @"LateBind Error", [color=fuchsia]MessageBoxButtons.OK, [color=fuchsia]MessageBoxIcon.Exclamation); } System.[color=#2B91AF]Console.WriteLine([color=#A31515]@"DLL Component {0} reflection error. Therefore, this will be skipped for late binding.", assemblyFile); [color=blue]return [color=blue]false; } #endif } The important piece to recognize is the C# line of code ‘instantiatedObject = [color="#2B91AF"]Activator.CreateInstance(t, [color="blue"]this); ’. This is the key to creating the “Late-Binding” component and using it in the runtime. But now I ask you, if the original program is not aware of the code until runtime, how could you possibly use any “Late-Bind” object. Well, this is where ‘Interfaces’ come into play, which means at a minimum, the original program needs to be aware of the interface. However, even with this limitation, this concept does provide benefits. In my TemporalWars 3D game engine, I used the concept of “Late-Binding” to abstract or separate out certain sections of code base from the original program; for example, the ‘AStar’ pathfinding component or the ‘Minimap’ component. This allows the main engine to be used separately without knowledge of these components, other than their interfaces. Then just by dropping one of these ‘Late-Bind’ components into a folder, the program will check for any components and then automatically bind and instantiate them at runtime. Immediately, the component becomes active and usable via the Interfaces. You can download a copy of the “Minimap Component” at the following codeplex addresss => http://temporalwars.codeplex.com[font="Consolas"], which is late-bindable project.[/font]
  12. Hi All! Been working on the following XNA game engine for the past 3 years… http://www.temporalw...tnuke/Home.aspx http://www.temporalw...GameEngine.aspx Contains the following features; Graphics Per-pixel dynamic lighting Normal occlusion mapping Reflection handling Powerful explosions, fire, and smoke particle systems Glow post processing effect Bloom post processing effect Guassian Blur post processing effect Powerful Shadow-Engine World Editing Tools Terrain “Height-Tool” Terrain “Paint-Tool” Terrain “Item-Tool” Terrain “Property Tool” AI Behaviors Aligned Arrive Cohesion Flee Follow Path Obstacle Avoidance Offset Pursuit Seek Turn-To-Face Orientation Wander Available RTS Components 3-Thread A* Pathfinding engine Minimap component Statusbar component Fog-Of-War component
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!