Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

4095 Excellent

About Madhed

  • Rank

Personal Information

  • Interests

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Small update:   The parser and themeing system is now fully customizable. Programmers can add new style properties, types and style sheet functions with a few lines of code.   The previously hardcoded parts are now rewritten to use this extension system themselves. It's already nice to work with but will be refactored to reduce the needed code even more.   As a normal user of the system you won't have to touch this code, of course. It is geared towards developers who want to customize the system.   The default theme extension: /// <summary> /// The default extension for uGUI functionality and basic types /// </summary> public class DefaultExtension : ThemeExtension { public override void AddTypeHandlers(Theme t) { t.AddTypeHandler(new FloatTypeHandler()); } public override void AddFunctionHandlers(Theme t) { t.AddFunctionHandler("lerp", new ColorLerpFunctionHandler()); t.AddFunctionHandler("lerp", new FloatLerpFunctionHandler()); t.AddFunctionHandler("lerp", new Vector2LerpFunctionHandler()); t.AddFunctionHandler("lerp", new Vector3LerpFunctionHandler()); t.AddFunctionHandler("vec2", new Vec2FunctionHandler()); t.AddFunctionHandler("vec3", new Vec3FunctionHandler()); t.AddFunctionHandler("rgba", new RGBAFunctionHandler()); } public override void AddPropertyHandlers(Theme t) { t.AddTweenablePropertyHandler("font-size", new FontSizePropertyHandler()); t.AddTweenablePropertyHandler("color", new ColorPropertyHandler()); t.AddTweenablePropertyHandler("scale", new ScalePropertyHandler()); t.AddPropertyHandler("font", new FontPropertyHandler()); t.AddPropertyHandler("sprite", new SpritePropertyHandler()); } } The lerp function for colors: public class ColorLerpFunctionHandler : GenericParserFunction<Color, Color, float, Color> {    protected override Color CalculateResult() {        return arg1 + (arg2 - arg1) * arg3;    } }
  2. Hi there!   I've always found the styling process of UIs in Unity3D a bit frustrating.   For the last month or so I have been working on a system that let's you use CSS-like stylesheets to control every aspect of your UI design. Colors, sizes, sprites, fonts, tweens, etc.   The stylesheets are a bit more advanced than "regular" CSS. You can use named constants that can be edited from within the Unity editor. Also included are math functions like lerp(), max(), etc. to let you calculate colors/vectors/etc. based on multiple values.   It's currently WIP but already pretty usable. I would love to know what you think of this and let me know if you have any suggestions!   Here are some gifs/videos of the system in action:   Editing styles while playing in editor   "Mines" demo: 160 lines of C#, 100 lines of CSS     "Loot" Demo: 230 lines of C#, 100 lines of CSS  
  3. Madhed

    How do you like your eggs in the morning?

      *Bird period. Unless you're eating balut.   Mmh yummy
  4. What is the problem with your current implementation? It seems you believe there is a better way, what do you have in mind?
  5. Ha, found it!   The game is called Roketz and was released in 1994 on the Amiga and 1996 on the PC.  
  6.   Nope...     I believe the game also had some kind of racing element IIRC but I'm not sure. I think the main objective was to finish laps and shooting the other player was just a bonus.
  7. @ncsu   Thanks, but that's not the game I was looking for. The gameplay was exactly the same though. It only had better graphics and I think it was only split screen multiplayer.
  8. Nah, not Descent. Thanks though
  9. So I was just thinking about this game I played when I was younger but I can't for the life of me remember its name.   It was a top down shooter where you control a spaceship similar to asteroids. It had a multiplayer deathmatch mode and was taking place in some kind of factory or space station, so not open space.   The graphics, if I remember correctly, were pretty detailed prerendered sprites and it supported SVGA resolutions. I don't know if it was a DOS or windows game, however.   This must have been around 1995-1998 and I think I only ever played the demo version that came with a games magazine in germany.   Anyone have any hints?   Thanks   EDIT: It was in 2D
  10. Madhed

    How do you like your eggs in the morning?

    Ah you are ok. I was worried there for a moment.    Boiled somewhere between liquid and hard. With a bit of butter and a pinch of salt.
  11. Madhed

    Suggest a name for my game(15$)

    Brawling Bunch Red Rock Rumble Wacky Warfare     And yes, I like alliterations.    To add to what Servant said:   A name is really not *that* important. Nobody is going to buy your game just because the name sounds cool. If you deliver a quality product, people will automatically associate something positive with its name.   Id, Nintendo, Quake, Final Fantasy, Sim City, ... etc.   If you didn't know anything about these games or companies would you think that these names are particularly creative or catchy?   The most important thing to consider is that you choose a unique name. You don't want to choose a name that is super generic or too similar to another game. It prevents people from finding you game via search engines or will make it easier for people to accuse you of just being a rip-off. Also consider the legal aspect of picking a name that is already in use or a slight variation of it. (Trademarks!)
  12. Madhed

    GUI for tools

    Yeah the editor can be pretty buggy sometimes...   The imgui approach defenitively has its problems when it comes to automatic layouting. So if you need a powerful layout system you should probably try something different.
  13. Madhed

    GUI for tools

    IMGUI is pretty popular for tools, unity3d uses it to draw its entire editor gui,   However, It's immediate mode so a completely different approach than "classical" object oriented gui libraries but IMHO very well suited for rapid prototyping and tool guis.   EDIT: IMGUI wasn't mentioned in the original post because of an editor bug apparently.
  14. You have tagged your post as c++ but with the typedefs, #defines and void pointers it looks pretty much like c code.   I suggest you look up on c++ templates and function overloading when you are ready. Both are used to execute different code based on the types you are supplying.   Something like this:   // function overloading: We have two functions named FillVertices // but they take different typed arrays as parameter, so they can do different things void FillVertices(PosCol* vertices, size_t length) { // set position and color } // overload of FillVertices void FillVertices(PosTex* vertices, size_t length) { // set position and texture coords } // Templated function: This takes a type argument // and generates code where "T" is replaced by the actual type you pass in template<typename T> T* CreateShape() { T* vertices = new T[8]; FillVertices(vertices, 8); return vertices; } // Used like this PosCol* vertices = CreateShape<PosCol>();
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!