Jump to content
  • Advertisement

duke_meister

Member
  • Content Count

    43
  • Joined

  • Last visited

Community Reputation

10 Neutral

About duke_meister

  • Rank
    Member

Personal Information

  • Role
    Programmer
  • Interests
    Design
    Programming

Social

  • Github
    vjrossi
  • Steam
    tino_j_rossi

Recent Profile Visitors

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

  1. duke_meister

    Oh, the Little Things - Test Adventure Dev 02

    Yep I realise that, just putting it here while I think of it. See you then.
  2. duke_meister

    Oh, the Little Things - Test Adventure Dev 02

    G'day, hope it's going well. I'd say your ideas overall are quite good. Consider using a standard format such XML or JSON (or other structured text) however. This will save you the time of designing the format of the 'design language' itself and you can concentrate on the data format (the schema in XML). Plus you get many ready-to-go reader/writers. I know you've said (in a forum post) that this is a coding exercise, so if that's the case then fair enough and just ignore. 8<> -------------------------------------- Follows the post I was going to put in the forum, auto-merged here with my previous post. 8<> -------------------------------------- I guess you wanted something like below. There's no need for casting/conversion methods. But back to your requirements. Do you mean parser? Many books have been written just on this subject. But obviously you'd be wanting to keep it simple to start. So I can see why you were experimenting with that test code. But I'm not sure this is the right approach. Each object is not going to 'get' itself. But it might be useful perhaps as a 'reaction' to being taken animal.react(take) { say( "it struggles and squirms")}, person.react(take) { say ("I don't think so") }. Your game engine might be the 'thing' that does the 'getting', being passed the object in question. Not sure what you mean here. Not sure what you mean here either. With the highlighted part, do mean you need with visual studio's debugging features? ---------------------- using System; using System.Collections.Generic; namespace atestadventure { class ClassName { public string Name { get; } = "defaultName"; public virtual void RunAction() { Console.WriteLine( Name); } } class Unique : ClassName { public string UName { get; } = "UniqueName"; public override void RunAction() { Console.WriteLine( UName); } } class YAunique : ClassName { public string YaName { get; } = "YetAnotherName"; public override void RunAction() { Console.WriteLine( YaName); } } class TestingGround { static void Main(string[] args) { var doesThisWork = new Dictionary<string, ClassName> { {"test0", new ClassName()}, {"test1", new Unique()}, {"test2", new YAunique()} }; RunAction(doesThisWork["test0"]); RunAction(doesThisWork["test1"]); RunAction(doesThisWork["test2"]); Console.ReadKey(); } static void RunAction(ClassName behaviour) { behaviour.RunAction(); } } } PS: Is it ok to post this kind of thing here or is the forum preferred?
  3. No problem. I don't recall reading that in any of the prior posts. What you're wanting to do is difficult, which is why I asked the question. Now that I know that, I shall post something after work. I fixed your code to work as you wanted, but I don't have access right now. It comes down to basic OO concepts. Get hold of a good book and get started
  4. duke_meister

    Learning programming/development

    Hi and welcome Do you know programming at all? The first thing I always like to ask is, are you just as interested in the programming as the game itself?
  5. Do you really want to reinvent this wheel? Fine if you do But first have a look at TADS 3
  6. duke_meister

    c# console snake game

    Well, that's progress Look at Console.SetCursorPosition(Int32, Int32) You should be able to move the drawing position around so you can write a draw_board() function without having to clear the screen. I haven't used it before, but maybe look into it. Taking your code: for (int i = 0; i < board_size; i++) { for (int j = 0; j < board_size; j++) { move cursor to i, j; // pseudocode // Look into WriteAt instead of Write Console.Write(board[i, j]); } } draw_board() might be something like that. Perhaps use x and y so you know which way you're drawing the board.
  7. duke_meister

    c# console snake game

    Hi Phil, Interesting you should choose to do this in a console app, but that's fine I think create yourself a function called draw_board() and have this simply draw the state of the current board (array). I don't think clearing the console so often is a good idea. Just change the values of the board array, then call draw_board(). Proably using a c# collection class might be advisable. Also, style-wise, a few suggestions (take it or leave it): - don't hard-code values like 17. Create a variable or constant for it, like board_size. - Instead of looping <= 16 just use < 17. It's the most common convention. - my preference is to use var where the type is obvious. Also in cases like char [,] board which can be hard to remember. But those are minor things. Keep at it. Now you just need to work out your algorithm for calculating the position of the snake's body pieces. P.S and make Main public.
  8. duke_meister

    Limited life time object from a function

    On the surface this makes no sense. Are you actually using code like what you posted, and does it work as you've said, only adding one line? Why would you put code in a loop that you didn't want to be called every iteration? Seems like all the timer stuff is just a red herring here.
  9. My thoughts exactly. In fact I'd argue that's how any game should initially be coded and tested. You should be able to write your main code (e.g. class model, tests) that way then plug it in to your game/graphics engine. Guaranteed you'll have a better architecture and you'll be able to plug it into any game engine*. I did this recently, started a game prototype in Unity then moved it all to Godot with minimal effort. *that supports the language
  10. Hi and welcome. First of all, don't be so hard on yourself. Nobody said game development (or any type of dev) is easy. Programming is not for everyone, keep that in mind. That's just the way it is. You need the patience of a saint, and you need to love it. Of course you won't know that until you try it for a time. If you decide you just can't get into programming you'll need to look into non- or lite-programming game making tools. @jbadams mentioned some above. Another is Godot with VisualScript. If you do think you want to get into programming, e.g. C#, C++, etc. then learn that first, at least to a decent level. Some will say you can learn programming in the process of making a game. Some can, some can't. Don't bite off more than you can chew. It's a long, long road ahead. Can you handle that? Anyway there are too many unknowns here. What exactly are you using to make your game? Share what you've done.
  11. duke_meister

    Help me with my gamedev hobby

    Make the games you like playing. Also agree with @DavinCreed, work on small parts. Before you know it, you can combine them to a whole. Concentrate first on the real guts of the simulation, not the 'window dressing'. Decide whether you are a programmer or a game designer (or both). Then use the appropriate tools (e.g. one with strong programming aspect, or one with little/none). I also put in my vote for GMS2 and Godot (esp. with C#). I used Construct2 for a whole year and wish I could get my time back again. But it might work for you. PS I'm a long-time developer, but currently I'm loving Inform 7 which doesn't use programming. It's an outdated type of game, but I'm having a ball playing with it, just for the fun of it
  12. duke_meister

    c# game

    I take no credit for any of those solutions. A good programmer knows when to write code and when to 'steal' it
  13. duke_meister

    c# game

    The benefit of the other solutions is that they can shuffle a list of *anything*. Your unit test does not really test that the cards are well shuffled I think that would be quite difficult to test. For instance your test would pass the array 5,4,3,2,1.
  14. duke_meister

    Inno Setup for Windows 10 64 bit

    I've used it, pretty easy to use and worked fine for my projects, from memory. What did you want to know? And what's it go to do with reinstalling the OS? ed: can't remember which version, was about 2 years ago
  15. duke_meister

    c# game

    awesome
  • 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!