• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

AvengerDr

Members
  • Content count

    309
  • Joined

  • Last visited

Community Reputation

751 Good

About AvengerDr

  • Rank
    Member

Personal Information

  1. ECS

    It's still there sorry I renamed it to "Epos" (I like greek mythology). I thought Talos (an artificial bronze automaton) would suit better an AI library I am also starting :)
  2. ECS

    If you want to have a look at another implementation, in my engine I have built another ECS inspired by the Artemis framework. Look for the Source/Odyssey.Talos subfolder. It's in C#.   Edit: Talos has now been renamed to "Epos" :)
  3. [color=rgb(51,51,51)][font=Georgia]Last month has seen little development as I needed to move to another city in the UK where I'm going to start a new job. So for the last weeks I have been living among boxes (and still am to some extents). Further, the new development machine I built had to have some faulty components so development has been delayed.[/font][/color] [color=rgb(51,51,51)][font=Georgia]I am still busy implementing some features needed for the introductory cutscene. I have refactored the UI so that it is scalable. The size of every control is expressed in "Units". At 1920x1080 a unit is 32 pixels long. At different resolutions, the basic unit is scaled accordingly. For example 2560x1440 is 1.333 times bigger than 1920x1080, so a unit would become about 42.6 pixels.[/font][/color] [color=rgb(51,51,51)][font=Georgia][/font][/color] [color=rgb(51,51,51)][font=Georgia]The picture is supposed to represent the Commander's HUD as the ship travels near Mars towards Saturn. The game itself will not be in first person. The rendering seemed a bit empty so I added an "atmospheric" HUD control in the lower right, the one with the caption "Singularity Phase". It is a simple column chart implemented in DirectX. The control derives from the basic ItemsControl in my UI library that allows generating templated child control based on its ItemsSource property, just like in WPF. For now, you can simply assign an array of float values and it will create the appropriate number of columns in the chart, giving a relative height depending on the chart's width, height and minimum and maximum values set for it.[/font][/color] [color=rgb(51,51,51)][font=Georgia]While animated, the chart looks like this:[/font][/color] [color=rgb(51,51,51)][font=Georgia][/font][/color] [color=rgb(51,51,51)][font=Georgia]It was really simple to implement and animate. Basically the RandomColumnChart derives from the base ColumnChart and exposes a Period property. The period represent the number of seconds before new random values are generated. During each update, each column is interpolated from the current start values and the next array of values. After the specified period of time has elapsed, those values are used as the new starting values and new ones are generated. Then the cycle runs again.[/font][/color] [color=rgb(51,51,51)][font=Georgia]I might need another of these controls to display some kind of sin waves for example... But I shouldn't let myself be too distracted, I'd like to start working on the main part of the game soon![/font][/color]
  4. I read your post several times but I don't understand what the problem you ran into is, if there is one. If you simply want to know the best method to design a UI then you'll receive an opinion-based answer. I believe the best method to design a UI is to generate it on the fly, that is create it by using geometric primitives. If you wanted to change the rounded corner, you'd have to draw it all again. If you were using vector graphics, it would consist into changing some parameter.
  5. You have to search for "Arcball" rotation. Here is a very basic implementation. That will change the object's orientation. If you want to orbit around it, you can try this one.
  6. [media][/media] For work-related reasons I have been using the Unity engine for the last few months. There are some things I like: it is incredibly easy to set up something and view it live with a few clicks. The editor is very powerful and it is something that I would really like to have for my engine. However, being an incredibly stubborn developer, Unity is not something that I can feel as being "mine", so I'd rather spend twice as much time (or even more) to build my own engine. This brings us to the matter at hand. My engine does not (yet?) have a visual editor with which I can script animations and preview them. As you may recall, I implemented animation features for my UI library. I have extended that system to the rest of my Entity-Component-System framework. Using my xml-like language is the next-best thing, if compared to actually writing the code necessary to create the animation objects from scratch. Instead, I can define them with a few lines and the parser will take care of orchestrating everything. I have thus created a Cutscene class that is able to animate all entities in the Scene and is also able to reference other hardcoded animations such as those belonging to UI controls. I need these animation features for two main reasons: first, I'm working on an "announcement" trailer of sorts and second, once I move to the actual ship-to-ship combat part of the game, once you issue an order, it will be visually shown by a contextual cutscene, similar to the way it happens in the recent X-Com game. Here is an example of the Cutscene animation shown in the above video. [code=xml:0] The top-level object in my ECS is the Scene, an object containing all entities in the game world. As such it implements an interface that is able to return individual entities by name. So when the parser finds a string value in the TargetName attribute it asks the Scene object to return the correct entity. If the value is in array syntax, the Entity object (which implements the same interface as well) will return the component specified as the index of the array. This can go on for more layers as it can be observed from the boolean curves targeting UI elements. Overlay is the UI entity, while UserInterface is the actual UI component holding a reference to the GUI object; the third index is the name of the individual UI control being referenced. I have also implemented a few functions to avoid generating individual keyframes to approximate some effects, such as the SquareWave function that animates the flickering of the target brackets. Finally, the Commands section references other animations that are defined elsewhere, either as other cutscenes or as hardcoded animation. In this case those two animations are the built-in animations of the Typewriter effect. This cutscene will activate the first one two seconds into the animation and the other one ten seconds into. So all things considered, it's a nice compromise if a visual editor is not available. Now, that typewriter definitely needs some sound effects... Also, I can now work on the animation concerning the Campaign Screen!
  7. I assume you are using C++ otherwise I'd be open to the idea of making it cross-platform. But at the moment I only have the time to continue its SharpDX/D2D development. Feel free to have a look anyway, the code is freely available on github.
  8. Do you really need an automatic approach? I would think that having different "themes" for each UI would be the best approach. In my UI library, I have implemented the possibility of parsing UI themes from a XAML-like file. This way you can specify all the UI appearance without needing to recompile everything. You can have a look at this post in my journal.
  9. A while ago I wrote this post. As part of my 3d engine I wrote this shader generation tool that takes a node graph and generates its associated shader code. It is not (yet) visual as VS12's shader designer, but I'd argue it is easier to integrate into your own engine. When a shader is generated through the tool, the system writes some metadata so that when the shader is loaded back into the engine, it know where to fetch the associated parameters. For example if you define a constant buffer containing a world matrix, then the engine will know that the world matrix refers (for example) to an entity's world matrix and will know how to fetch the relevant matrix accordingly. In this way you don't need to write any ad-hoc shader initialization code on purpose.   You can check it out in my GitHub repository, look for the OdysseyTools.sln file.
  10. In the past days, I've been busy working on several things concerning the implementation of cutscenes during the game. In my mind, the game opens on a depiction of the Solar System where the moments just before the Odyssey leaves Earth Orbit would be shown. Imagine yourself as the commander of this ship, in a sci-fi universe of vector graphics and green terminals that beep when keys are typed. Running through the checklist moments before the Odyssey leaves the Solar System you would probably see something like the following image. This would be a part of the introductory cutscene that I hope to show you in the near future. These screens would be interleaved with "cinematic" title screens explaining the back story. In order to draw the purple path you see in the picture, I needed to implement a BSpline plotting algorithm. It's not yet perfect as I would ideally be able to implement constant arc length parametrization (!). You can't see it from the picture, but the path is being rendered as a 3D polyline joining various rectangle polygons. The issue is that the curve segments are not spaced equidistantly. Then again, if you can't see it then it's not really a problem. It's not high priority right now but I would like to have more control over it. The second part of the title gets us to the fundamental typewriter effect we so desperatly need in an universe like this. I have implemented this effect using my UI library: The speed of the Typewriter can be configured using its CharactersPerSecond property. Using this information we can determine how many characters to reveal at each update. The Typewriter is using a Direct2D TextLayout object. Since this object needs to be instantiated with its text content from the beginning, i.e. the text string is an argument of the constructor, I assumed that recreating it at each character update would not be the best approach performance-wise. What I hope is a better solution was to create this object fully invisible (i.e., transparent). The TextLayout allows us to apply brushes (i.e. colours) to specific text ranges. So that's what the animation is doing. At each update it increases the number of character the green brush is applied, while the others stay transparent. Each update generates a TextRangeChanged event, which in turn is used to update the caret's position. The next step will be to implement a blinking animation for the caret and other nice features such as carriage return, line scrolling and so on. This is a feature that will be used extensively in the actual game. The log window, or more enthusiastically, THE COMM CHANNEL, will display information about what's going on in the minds of the AI-controlled ships. So, THE COMM CHANNEL, will describe "in prose" what's happening on screen. I enjoy both seeing space dogfights but also reading about them. Hopefully, reading sentences like "Red 5, breaking formation", "ALL HANDS, BATTLESTATIONS!", "IT'S A TRAP", or "I'll see you on the other side" will add to the idea of witnessing a space battle from the command room of a capital ship. Ideally the radio chatter would also be fully voiced, but that maybe is stretching too far the imagination considering the resources currently available. That's it for now, back to implementing the blinking caret
  11. Thanks for the reply. So how would I go about ensuring C2 continuity? I implemented this algorithm to compute the derivative. However at the moment I haven't Matlab handy so I need to check whether it really works. Assuming that it does, I should be able to recursively obtain the second derivative. How can I use this information to obtain C2 continuity? I googled a bit using the terms you suggested, but so far I've only landed on research papers suggesting ways to calculate this arc length using integration. Maybe there are more real-time friendly alternatives? public BSpline Derivative() { Vector2[] newCPs = new Vector2[Count - 1]; BSpline derivative = new BSpline(Degree - 1); for (int i = 0; i < newCPs.Length; i++) { newCPs[i] = (this[i + 1] - this[i])*(Degree/(knotVector[i + Degree + 1] - knotVector[i + 1])); } derivative.AddPoints(newCPs); float[] newKnotVector = new float[knotVector.Count - 2]; for (int i = 0; i < newKnotVector.Length; i++) { newKnotVector[i] = knotVector[i + 1]; } derivative.knotVector.AddRange(newKnotVector); return derivative; } public BSpline Derivative(int iTh) { BSpline bs = this; while (iTh > 0) { iTh--; bs = bs.Derivative(); } return bs; }
  12. Hi all, I've built an algorithm that displays a B-Spline. I'm not sure if it is working correctly. For example, take this picture:     the red points are the control points and the blue points are the various points on the curve. Each blue point is calculated through a fixed timestep. The Knot vector of this (clamped) curve is [0 0 0 0 0.5 1 1 1 1] and it is calculated using DeBoor's function in the interval [alpha, 1-alpha]. In this clamped case the first and last control points are added back at the end (though there might be some issues with the control points being drawn at their top left corner instead of their center, but it shouldn't matter).   As you can notice, the points towards the first and last control point appear to be more "sparse". I would explain this by it being due to the other control points concentrating the curve in the upper part as the number of points to calculate is constant (100, with alpha incrementing by 0.01).   Are there better ways to sample the curve in order to have a constant displacement between curve segments?
  13. Thanks! And for an even cooler effect, the gradient origin could be animated in the Button's mouse-over event to make it follow the pointer! Well, let's get on with the rest of the game!  :)
  14. Hi all, if you had a look at my devjournal, I'm trying to build an animatable UI framework. I'm going to use C# terminology because I'm using D2D from SharpDX but it shoud apply to C++ just the same. So, every property that can be written to such as the Opacity of a gradient or its RadiusX/Y (in the case of a Radial gradient) can be animated just fine.    I'd like to implement the possibility of animating the colors of a Gradient Brush. Once you create a gradient brush, it seems you can only get a copy of the GradientStops you used returned to you through the GetGradientStops method. Since a GradientStop is a structure, if I were to change their colors, it would have no effect on the actual brush being used.   This seems to be a big limitation, so before going any further I'd like to know if someone has attempted to do anything similar. Is there really no other way? The Color property of a SolidColorBrush can be written to, so that could be animated over time. How to do the same with a GradientBrush? Is the only way to do it to create intermediate gradients so that instead of animating the colors I change the whole brush? For a decent animation, you could need to create dozens of slightly different brushes and that seems terribly inefficient.   I have two alternative approaches in mind: Have the source and target gradient one on top of the other and then animate their opacity so that one goes from 0 to 1 and the other from 1 to 0 in the same interval of time. Though I'm not sure the effect would be the same. Have a greyscale gradient and animate a blended solidcolorbrush on top of it. But these seem more like hacks, so I was wondering if there was a better way to do this.
  15.   Yes sure, but it would be more time-consuming to have them behave the way you want compared to using an explicit approach. You can't throw a ButtonComponent, a PanelComponent and LabelComponents in an Entity and expect a DropDownBox to appear and work like it should unless you coordinate the logic between all of them. I believe that's easier to do if you have a DropDownBox object where you can do everything you need. After all none of the major UI frameworks use anything even remotely similar to an ECS.   In my approach, I only have a UIComponent for the whole HUD. So it gives me the flexibility to switch HUDs at runtime and that's enough I guess. Further, in my approach I am using Direct2D to render controls from scratch. So they aren't simple textures and thus require a different rendering method than if they were billboards.