Jump to content
  • Advertisement

Rich Brighton

Member
  • Content Count

    40
  • Joined

  • Last visited

Community Reputation

101 Neutral

About Rich Brighton

  • Rank
    Member

Personal Information

  • Interests
    Design
    Education
    Programming
  1. Rich Brighton

    Inspirations

    In a few weeks time, once I've upgraded my code to Scala 2.13 and I've sorted out my tooling story, I want to make a serious push to find collaborators. The natural way for me to begin that would be to start by describing both the old board games from decades ago and the video games that I have enjoyed playing. Ideally with a bit of a critique of what I liked and disliked. This is to help others identify if they share my passion for certain types of games. But also to explain why I feel there is an area of the video game design space that has been barely explored. Is this a legal no-no? Does it open myself and any future collaborators to being sued for copy right? I feel totally confident from a moral perspective that I'm not stealing anyone's hard work. In algorithmic terms, I actually find very little of use in the games I have played over the decades
  2. Rich Brighton

    Hexagonal movement

    Checkout my work here: https://richstrat.com/zug.html code at https://github.com/richtype/openstrat to convert from integer coordinates to regular 2d space you just multiply the y coordinate by the square root of 3. I have doubled up the integer coordinates to allow the hexagon tile sides to have integer coordinates. Most even moderately complex tile games require values for the tile sides as well as the tiles. So the hex side between Hex(10,10) and Hex(12, 12) is HexSide(11, 11). Under this system even the Hex tile vertices can be given a unique integer coordinate, which can be useful, although that requires a slightly more complex mapping. In the following yRatio is square root of 3: def coodToVec2(cood: Cood): Vec2 = coodToVec2(cood.x, cood.y) def coodToVec2(x: Int, y: Int): Vec2 = { def yAdj: Double = y * yRatio (x % 4, y % 4) match { case (xr, yr) if yr.isEven && xr.isEven => Vec2(x, yAdj) case (xr, yr) if yr.isEven => throw new Exception("HexCood, y is even but x is odd. This is an invalid HexCood") case (xr, yr) if xr.isOdd && yr.isOdd => Vec2(x, yAdj) case (0, 1) | (2, 3) => Vec2(x, yAdj + yDist /2) case (xr, yr) => Vec2(x, yAdj - yDist / 2) } }
  3. Rich Brighton

    Software for designing a 2D world map?

    You might find some of my work of interest: https://richstrat.com/ww2.html Code at: https://github.com/richtype/openstrat
  4. Rich Brighton

    Is it worth learning WPF now?

    I went for WPF over WinForms and am happy with that choice. I don't use xaml. xaml makes a right mess of your code structure and introduces partial classess which are horrendous. I also avoid the Application class. As for windows 8, the only reason to dance to microsofts tune is if you want to get on their App store. From what I can make out WinRt seems to be a big step down from WPF. As for writing apps in HTML5 and JS. Its great to see they've still got a sense of humour. Anyway Microsoft when you've got a sensible candidate for WPF replacement get back to me. Lets take C# 5.0, frameworlk 4.5# and visula studio 11, but I think I'll pass on Windows 8. That also means passing on bulldozer as windows 7 can't tell the differece between a separate core and a seperate Module, but no loss there eithor. Once Windows 8 has successfully flopped, we might be able to start looking forward to a new 64 bit XBox. Even if one doesn't intend to use Xna, it might be propt Microsoft to produce something usefullly new in terms of API
  5. I'm developing a strategy game in C# and that's coming along slowly but steadily. However I've felt for a long time that the UI would be vastly improved if I had 2 separated Mouse inputs. I'm currently using Windows Presentation Foundation for my GUI. The best solution I've come up with is to write an independent utility that would redirect the second mouse to the stylus pen. That would give me a mouse position and one button. Presumably a more sophisticated version could later be made later, where other mouse buttons were redirected to Touch gestures or Keyboard keys. I assume that C++ would be the obvious candidate to write the utility in as that's what windows is written and as well as the Direct Input documentation. My thinking was that even if I changed API to the Jupiter interface and maybe even to XNA the utility would still probably work. Is this a huge and incredibly difficult undertaking or should it be relatively simple and straightforward?
  6. Rich Brighton

    [.net] XAML inheritence - i r confused

    Maybe the mistake is using XAML. In the end I chose WPF for my first GUI with C#. I still feel that was the right choice rather than forms or XNA, but after a while I completely abandoned XAML. I found it messed up my programme structure. Every-things much cleaner witout it. I've just started using WCF for networking, seems good but again no XAML nonsense for me -everything in C#. No doubt there's many scenarios where code behind is minimal and XAML is highly productive and delivers good UI design, but I don't think its generally suited to the needs of game developers.
  7. Rich Brighton

    AMD Bulldozer: Good for gaming?

    I have read a few articles on Bulldozer but none have given an opinion on whether it will be well suited to gaming. The distinctive feature of the Bulldozer is the Module with its two integer cores and one floating point unit. Do games or certain types of games which are physics and graphics focused, rely heavily on floating point calculations? Will the extra Integers cores be sitting around idle? Is it possible to programme games and keep the number of floating point operations down, which are highly expensive in any case of system resources and processor time? Any thoughts appreciated!
  8. Rich Brighton

    Developing MultiPlayer functionality with c#

    Ah thanks for the advice. Aren't proxy objects better than messages then? As they allow you to programme your components Player interface, Core functionality AI, etc in an object orientated manner. Don't messages to some extent break the heavy type checking of c#. Which is its great beauty. Although I haven't done networking, obviously it must be able to deal with messages. I'm just a bit worried about designing around proxy objects and then discovering down the road that they don't work quite like how I imagined and having to rewrite non-network functionality. With proxy objects can I just pass in the proxy via a method/ constructor parameter same as a non proxy object. You recommend separate processes, if one is going to start playing around with multi-player? is it better to start with completely separate processes as opposed to multi threading or multiple application domains within the same process? I just checked and visual studio will seem to allow 2 versions of the project solution to run at the same time, so that should help. edit: Perhaps I should say that I've already got the multi-player infrastructure in place. so I could simulate multi-player just by opening another (non dialogue) window in WPF. As I'm learning, I don't mind restructuring and partly rewriting my code multiple times as my understanding and knowledge of the best solution increases, but I'd like to at least aim for the correct solution to start of with and I guess on reflection its the networking aspect rather the multi player aspect itself that concerns me.
  9. I'm building a Civilisation type game, but with simultaneous Turns / Real-time. I went with C# in the end. I'm loving the language and I'm at least familiar now with all major language features if far from experienced in their application. From the start I've tried to completely separate the core functionality from the GUI. For a short while I had 3 projects in my VS solution, the core, a windows forms project and a WPF one. For the time being I've got rid of forms and am just using WPF without XAML. It does what I want for the time being: puts Hex Shapes and Rectangles on the screen where I want them and allows me to easily interact them with clicks and context menus. So I have built a very basic scenario editor and am starting to build some very, very basic game play:just allowing units to move around. I've separated the description of the scenario, how things really are from the view of the scenario that the player sees. The player may not see everything and may even see units in the wrong place etc. So far I'm just working on Single Player on one machine. Now with the scenario editor, I'm happy that you can only edit a scenario on the local machine. However Game-play is different. I want the Player User Interface to work the same whether its on the same computer as the Core scenario Game processor or if its on a remote machine across the internet. So am I right in saying that I need to use messages? I presume there is no way to make it look like you're directly accessing methods on a local instantiated object unless you actually are. My thinking is that simple messages can be passed out by event. For the time being those messages can be passed on to the Core by the Player message handler using a simple method call. In the same way the Core can pass out messages to the player without knowing their destination by event and handled by the Cores Message handler. This way at later point hopefully I can write the networking functionality without having to touch the rest of the games functionality. Comments on the above appreciated, but also how easy is it to network some messages in C#? Is networking easy enough that you might as well introduce it earlier. Or should I simulate Multilayer through multiple processes on the same machine for the time being? Should I use Windows Communication Foundation or is it unnecessarily complicated? WCF does seem incredibly difficult to penetrate, worse even than C++ and DirectX 11.
  10. I've made some simple 2 D graphics in windows forms to display a hex grid and units counters. I'd got to a similar point on the UI using C++ and Directx11, before I decided to abandon the code and switch to C#, so I'm happy to switch again for a better long term solution. I'm trying to make a simple scenario/ world editor for a turn based strategy game. However I want to make the map area scrollable and combine it with other controls for data entry/display. I could do it by using multiple forms, but that feels messy, so I was thinking of gong over to WPF. I think, I'm finally starting to get to grips with WPF. Its supposed to have a steep learning curve. This seems mainly due to Microsoft's irritating habit of desgning everything around the complete novice and hiding everything but the flashy interface away. Meaning you waste loads of time as soon as you want / need to know what's actually going on. What the justification for hiding the 'main' function away is in a development tool beats me. Anyway any thoughts. I'm using C# so the options seem to be Forms, WPF or XNA. I understand integrating graphics and controls in XNA is even more difficult. Is this correct?
  11. Rich Brighton

    Coding 'Eloquence' - C#

    Just from a quick glance I'd put attackChoice as an enumerated type. I'm sure there are functions so you can actually display the object name, so you never have a manual conversion between values. Take's a bit more time to set up initially, but for me the beauty of c# is that you can so heavily type everything that you can get the compiler to do a huge amount of the validation of your code. I'm just learning myself, but its amazing how much of the time that when you've got it to compile, it actually does what you want it to do first time.
  12. I've got an abstract base class Hex and and I'm instantiating an array of Hex in an abstract base class Scenario. In the derived class ScenarioC I instantiate an array of HexC. HexC is derived from Hex namespace RichStrat { public abstract class Hex { public List<long> unitIds; } } namespace RichStrat { public class HexC: Hex { public Terr terr; public HexC() { terr = Terr.Plain; unitIds = new List<long> { }; } } } namespace RichStrat { public abstract class Scenario { public long xDim; public long yDim; public DateTime currGameTime; public Hex[,] hexs; public List<Unit> units; } } namespace RichStrat { public class ScenarioC: Scenario //The Core Database for the game scenario. Theoretically multiple secenarios can be loaded into memory at the same time { public HexC[,] hexs; /But when I comment this line out it still compiles public ScenarioU[] userView; // A database for every user and AI entity public ScenarioC(TestScenario t) { xDim = 4; yDim = 5; hexs = new HexC[xDim, yDim]; for (long x = 0; x < xDim; x++) { for (long y = 0; y < yDim; y++) hexs[x, y] = new HexC(); } units = new List<Unit> () {}; units.Add(new Unit(this, units.Count, 3,3)); } public void InitUserData() { } } } But when I comment out the line: public: HexC[,] hexs; // It still compiles. Haven't I just instantiated an abstract class? Edit: Ah silly me! I've just realised that I'm not instantiating any Hex only an array of Hex.Should I be using an interface instead here to force the derived Classes of scenario to implement a Hex derived Class?
  13. Rich Brighton

    Strategy Game: Language and other questions

    Yes which is easier using C# arrays or C++ vectors? And then can you trust that everything in the STL is always safe? Lots of people seem to say give Boost a wide birth. Although I have seen some doubt cast on whether the C# foreach loop is always safe. My fundamental issue with C++ is not whether there is a steep learning curve, but whether the language is any good. No matter how much of a beginner one is, when experts disagree one has to make ones own judgement. Amongst other things, I've read through quite a bit of Yossi Kreinin's "Frequently Questioned Answers." Anyway the conclusion I've come to is that C++ was mis-designed at its inception as a marketing ploy to provide pseudo compatibility with C. C++ never was a superset of C and couldn't have remained so even if it had been. So my own thoughts on languages from my limited research and understanding. Main Game language: C++: The main industry language, but maybe that's due to legacy code, and no really good alternative to switch to. C#: Pretty Good, .net, lots of support for beginner, better intellisense than C++. Negative: as far as I can make out, you can code down to the metal with C#, but it doesn't have the documentation/ tutorial support that C++, has for low level work. Even Microsoft documents the Windows API with C++. D Looks good, it would be great if the Game Development Community really embraced it but its no use for a beginner and probably not for an intermediate becasue of lack of support. Python: Although it was a long time back, I did a modest amount of programming in C and more recently I've done a bit of C++, so for me going over to C# is easier. Also Learning c# through Visual Studio is very straight forward, so much help and support for beginners and intermediates that, I can't imagine that overall learning Python would be easier.As far as scripting languages go Lua seems to be the language of choice for the gaming industry. Python is a lot slower than Lua. Its notable that Civilisation dropped Python for Lua when they went from IV to V.
  14. Rich Brighton

    Strategy Game: Language and other questions

    I don't know if I've gauged it right, but my impression is that Microsoft are going to concentrate on developing WPF rather than forms from now on. So my thinking was that as I need to learn which ever one I use I might as well learn the newer technology.
  15. Rich Brighton

    Strategy Game: Language and other questions

    I'll have to think about this, but currently I'm thinking being able to use all the functionality of the c# array class could be useful. I'm feeling I need to implement some kind of GUI just for developing the core functionality, before I go any further. Console is very slow for testing a programme. I'm thinking of using Windows Presentation Foundation. Does anyone have an opinion about WPF? Also I've had a look at Windows Communication Foundation. Trying to comprehend WCF makes learning Directx 11, the Windows API and C++ look like a doddle. Are there any better / easier alternatives for communicating with processes, on the same machine and across LANs and the Internet?
  • 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!