Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 26

Thread: New language features have a place in game code?

  1. #11
    To Jimmy Valavanis:
    I would really recommend that you learn OOP and possibly get books and take some courses on this. A full software engineering course would be best, but it will take significant time, maybe years. You'll learn that many of the points that you are making here are not true and are mostly due to your lack of knowledge on the matter, which actually you have admitted yourself.

    Long story short: no, procedural programming is neither more efficient, nor it is the best approach at software development, on any possible level. There is no single application that you'd want to develop using procedural approach, trust me on this.

  2. #12
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    OOP, though great if you understand it isn't necessary to make a game, but like Lifepower says, it isn't the "best way." You have to work with what you know, however learning new things is always handy. There is a flip-side to this though.

    Code should aid the programmer in their creations, not take them over. My advice is to be cautious when adding code to your game projects that are in-progress that is new to you. It's great to learn new things, but to actually finish a project, you need to pace yourself and don't over-exceed your knowledge with research beyond what is needed to complete your current project should you actually wish to finish it. You'll find that this will keep you productive, while allowing you to still learn a few things for each project should you choose to keep pushing your programming knowledge.

    I didn't really mean to get into older concepts like OOP, however since we already broached the topic, I do think it was one of the greatest things to happen to the original Pascal syntax. I, myself have a bit of a hybrid style of coding though. I love writing objects and fleshing them out with all the procedures and functions required, but I hate getting too complex with OOP. I find that you can spend hours and hours designing the "perfect" object class and at the end of your day you may have this great code that can do wondrous things, yet where is your actual game in all of this?
    Jason McMillen
    Pascal Game Development
    Co-Founder





  3. #13
    Quote Originally Posted by Lifepower View Post
    To Jimmy Valavanis:
    I would really recommend that you learn OOP and possibly get books and take some courses on this. A full software engineering course would be best, but it will take significant time, maybe years. You'll learn that many of the points that you are making here are not true and are mostly due to your lack of knowledge on the matter, which actually you have admitted yourself.
    I admit that I'm unfamiliar with the most new features mentioned here but I'm not unfamiliar with OOP, as my thesis back in early 90's was involving a lot of OOP programming using Borland Pascal 7.0.
    I still keep in my bookshelf a couple of my old OOP books (not only pascal but also C++). And I've actually read them all

    Quote Originally Posted by Lifepower View Post
    Long story short: no, procedural programming is neither more efficient, nor it is the best approach at software development, on any possible level. There is no single application that you'd want to develop using procedural approach, trust me on this.
    The point is that I don't really like OOP, maybe the majority avoids procedural approaches, but I do like programming this way. Of course I'll re-use a component, or a class to develop something fast, but when I want to write code (not when I want to make a programm to do something - when I want to make something to enjoy making it) I prefer the procedural way.

    Quote Originally Posted by WILL View Post
    OOP, though great if you understand it isn't necessary to make a game, but like Lifepower says, it isn't the "best way." You have to work with what you know, however learning new things is always handy. There is a flip-side to this though.
    Making games it's my hobby, not my profession. If I have to learn new programming techniques, or even new programming languages, for my job as a software engineer, sure I'll do my homework.

    Quote Originally Posted by WILL View Post
    Code should aid the programmer in their creations, not take them over. My advice is to be cautious when adding code to your game projects that are in-progress that is new to you. It's great to learn new things, but to actually finish a project, you need to pace yourself and don't over-exceed your knowledge with research beyond what is needed to complete your current project should you actually wish to finish it. You'll find that this will keep you productive, while allowing you to still learn a few things for each project should you choose to keep pushing your programming knowledge.
    Let's imagine a fisherman: He uses a sophisticated trawl with a GPS, a super-tech radar to track the fishes and he is fishing with nets to gather as many fishes as he can to make the living, but during weekend he prefers his little boat and a simple hook because he likes fishing this way. He'll gather less fish, or he 'll need more time to gather many fishes, but he'll enjoy it!

    Quote Originally Posted by WILL View Post
    I didn't really mean to get into older concepts like OOP, however since we already broached the topic, I do think it was one of the greatest things to happen to the original Pascal syntax. I, myself have a bit of a hybrid style of coding though. I love writing objects and fleshing them out with all the procedures and functions required, but I hate getting too complex with OOP. I find that you can spend hours and hours designing the "perfect" object class and at the end of your day you may have this great code that can do wondrous things, yet where is your actual game in all of this?
    Well, I just love writing procedures instead of involving objects, especially with multi-level hierarchy. In addition, when I'm developing something for myself as a hobbyist I tent to be as low level as I can. Maybe sometimes I'm reinventing the wheel, but that's the way I like it ! I like my "USES" section to include only my code

  4. #14
    The way I work is "procedural using objects". That is, the main program flow is procedural but I use objects where I think they should be.

    For example, in games I do all game logic by procedures and functions but I create classes to manage maps/worlds, and also for characters (player, enemies, NPCs ...). So I don't use pure procedural nor pure OOP.
    No signature provided yet.

  5. #15
    Quote Originally Posted by WILL View Post
    Code should aid the programmer in their creations, not take them over. My advice is to be cautious when adding code to your game projects that are in-progress that is new to you. It's great to learn new things, but to actually finish a project, you need to pace yourself and don't over-exceed your knowledge with research beyond what is needed to complete your current project should you actually wish to finish it.
    I agree, there is YAGNI principle that describes exactly that.

    Quote Originally Posted by Jimmy Valavanis View Post
    Let's imagine a fisherman: He uses a sophisticated trawl with a GPS, a super-tech radar to track the fishes and he is fishing with nets to gather as many fishes as he can to make the living, but during weekend he prefers his little boat and a simple hook because he likes fishing this way. He'll gather less fish, or he 'll need more time to gather many fishes, but he'll enjoy it!
    In this case, OOP is the little boat and a simple hook, which later you can upgrade to GPS and super-tech radar. But, you are trying to fish with a fork swimming in an inflatable toy. Sure, it can be a fun sport, but you won't get much fish, if any.

    P.S. Jimmy, please try not to get offended, there is no need to multi-quote everything and argue about what you don't know or don't fully understand (remember unskilled and unaware article). My suggestion to you was to try and learn new things, which could be fun and you might even get surprised.

    The fact is, you can use OOP for the smallest applications and create elegant code, that later you can extend, modify and even reuse. If you "think procedural" and use OOP mostly as a data type (e.g. objects for data) or only because you have to, this approach is called anti-pattern. If you want to keep closed-minded about it, nobody is forcing you to try new/better ways, just keep using what you know.
    Last edited by LP; 27-03-2012 at 01:51 PM.

  6. #16
    It's really difficult not to get offended when someone deliberately offends you

  7. #17
    PGDCE Developer Carver413's Avatar
    Join Date
    Jun 2010
    Location
    Spokane,WA,Usa
    Posts
    206
    Its time's like this when you wish there was an ignore button. don't let it get you down Jimmy some people just don't know when to quit.

  8. #18
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    I don't think that Lifepower meant to be offensive. I've seen him being offensive, this really isn't what I'd categorize it as. (Sorry Yuriy, it's sort of a defense though. ) He just has some strong opinions about code, which is fine, it's primarily a coders forum after all. OOP has it's benefits, yet learning new things does sometimes get in the way of progressing with active projects. Even news ones so I can see why you aren't crazy about the idea of taking up something new. There is validity there.

    If you find you are able to do what you need with your own coding knowledge then stick with it until you feel you want to dig deeper into the rabbit hole. Should you want to learn a more advanced coding style, there is benefit in learning OOP. So when or if you become ready for such, Lifepower's suggestions would help you in that way. I think this is where he was going with it, not meaning to tear your skills apart and tell you you are doing it wrong. Just explain to you that it is an older way and there are much newer ones that have been developed since.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  9. #19
    Quote Originally Posted by Jimmy Valavanis View Post
    It's really difficult not to get offended when someone deliberately offends you
    Can you please send me a PM mentioning what parts of my post did you find offensive? I'm sorry but it was not my intention. I can erase my post, if you wish. In most cases I'm just trying to be direct and straight to the point. My intention was to help/recommend. However, it was not me who was flashing thesis works and books; I think you should put away the pride and chill.

  10. #20
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    As much as I like a good case scenario to try for problem solving, this is getting a tad off topic. Why not start another thread about Object Oriented Programming vs. Procedural Programming?

    UPDATED: Ok I pulled the trigger on it. Sorry, but I had to move it to a new thread. New area of discussion, new thread that's how we roll at PGD. Sometimes small deviations are ok, but not huge full throttle shifts in topic completely. Yours was a doozy.

    However here is the link to the new thread. We do believe in convenience. All are welcome to beat each other to a pulp there. ...just do it nice and politely or I'll send the evil Google preview after you.
    Last edited by WILL; 28-03-2012 at 09:09 PM. Reason: Our policy is that we make new threads for new topics to prevent the forums from becoming a mess.
    Jason McMillen
    Pascal Game Development
    Co-Founder





Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •