• What are you working on?
    5,004 replies, posted
[QUOTE=Cold;49872248]Terraria is an ideal candidate for data oriented programming. Program AI/Weapon/Item types, and then everything else can just be data, rather then inheriting a class for every npc, object or enemy.[/QUOTE] The worst part about that NPC class is that all those if-else nightmares are just to pick out a name for the fucking NPC. [B]Why the hell would you hardcode that?? How the hell do they translate the game?[/B]
[QUOTE=Cold;49872248]Terraria is an ideal candidate for data oriented programming. Program AI/Weapon/Item types, and then everything else can just be data, rather then inheriting a class for every npc, object or enemy.[/QUOTE] Maybe, but this is NOT how you do that.
Hey ya'll. Not 100% finished, but the base engine is. Would love to hear about any horrendous bugs/your general comments :smile: (HTML5, plays in browser). You can press R to restart if you need/want. [img]http://s10.postimg.org/4kgxk1th5/screenshot.png[/img] [url]https://dl.dropboxusercontent.com/u/124783721/index.html[/url]
Better look at the wrapping/scrolling/formatted console text, now in GIF form! [img]http://i.imgur.com/RRDS7HP.gif[/img]
[QUOTE=chaz13;49872379]Hey ya'll. Not 100% finished, but the base engine is. Would love to hear about any horrendous bugs/your general comments :smile: (HTML5, plays in browser). You can press R to restart if you need/want. [IMG]http://s10.postimg.org/4kgxk1th5/screenshot.png[/IMG] [URL]https://dl.dropboxusercontent.com/u/124783721/index.html[/URL][/QUOTE] Clicking use on the note completely locked up my browser. Google Chrome 48.0.2564.116 m Edit: Happens everytime.
[code]goto IL_2B846;[/code] This Terraria code was decompiled. Where are the comments?
[QUOTE=Proclivitas;49872459]Clicking use on the note completely locked up my browser. Google Chrome 48.0.2564.116 m Edit: Happens everytime.[/QUOTE] Thanks! fixed that, link updated. [url]https://dl.dropboxusercontent.com/u/124783721/index.html[/url]
Fun with Lorentz attractors in Anaconda. It's so weird to come from C/C++ where return types are so closely monitored and in Python you have no idea what comes out of a function, but it might work anyway :v: I should read the standard python documentation I guess. [IMG]http://i.imgur.com/n2mjDls.png[/IMG] [IMG]http://i.imgur.com/T839SFh.png[/IMG] Code can be found [url=http://pastebin.com/UdmVsDzc]here[/url].
[QUOTE=chaz13;49872513]Thanks! fixed that, link updated. [URL]https://dl.dropboxusercontent.com/u/124783721/index.html[/URL][/QUOTE] [url]https://i.imgur.com/RReediw.png?1[/url] When trying to click that vendor, the character doesn't move to it. You have to click a tile next to it instead. Bug/Enhancement?
Guys, don't you know what this means! We've found the path to extraordinary wealth! All we need to do is follow Terraria's development path, and use IF statements for everything![I] It's so simple! [/I][I][B]We're gonna be rich![/B][/I] [B]IF statements.. IF statements everywhere![/B] :magic101:
[QUOTE=Lumaio;49871411]The four examples in that video were garbage and the people writing them clearly didn't know what they were doing. There are very good reasons to use OOP.[/QUOTE] [QUOTE=Ziks;49871419]Only watched the first three examples, but for the first two he's just picked bad examples of OOP that I agree should have been static, and the third one only makes sense to replace with a switch because each class only has one method with different behavior for each subclass. If it had multiple methods with different behavior, you would need to switch again in each one. That would mean pointless duplication of case names, adding new cases would be a chore, and your implementation couldn't be extended with new cases when your code is used as a library.[/QUOTE] Both examples were written by professionals (gurus) who supposedly know what they're doing. These are not randomly picked examples. [QUOTE]OOP is a great fit for game programming when the purpose of your program is to model objects interacting with each other. It's not a good fit when you are forcing something that isn't obviously an object to be an object.[/QUOTE] I agree that for game objects it's great. This is because your simulation and the objects have a 1:1 mapping. Doing anything else would be stupid. [QUOTE=Ziks;49871489]And if that didn't make you go insane, try this: [url]https://raw.githubusercontent.com/TheVamp/Terraria-Source-Code/master/Terraria/NPC.cs[/url][/QUOTE] Here's the thing I don't understand whenever people point to code like this. He's been updating the game for years now. Clearly the code is, to him, maintainable. If it wasn't he would have just given up on updating the game at all. So why do you use it as an example of bad coding? All the evidence in the universe points to it not being bad coding and points to it being code that is manageable and maintainable over a long period of time. Maybe realize that the rules for single developers are different than the rules for people developing things in teams, and that code like this for single developers is perfectly fine. Or just keep making fun of code like that and never getting anything done because you're not productive enough.
[QUOTE=adnzzzzZ;49872658] Here's the thing I don't understand whenever people point to code like this. He's been updating the game for years now. Clearly the code is, to him, maintainable. If it wasn't he would have just given up on updating the game at all. So why do you use it as an example of bad coding? All the evidence in the universe points to it not being bad coding and points to it being code that is manageable and maintainable over a long period of time. Maybe realize that the rules for single developers are different than the rules for people developing things in teams, and that code like this for single developers is perfectly fine. Or just keep making fun of code like that and never getting anything done because you're not productive enough.[/QUOTE] did you just call fucking Ziks "not productive"? Just because you have an obsession with being a contrarian doesn't mean everyone else is wrong for following the norm. That code is fucking [b]SHIT[/b] by any standard, and just because Terraria makes a lot of money and has had long-term support doesn't mean it's not [b]absolutely shit.[/b]
You often see successful indie games with bad code because the rules for solo indie programmers are different than the rules for normal programming. ECS, data orientation, and good programming practices in general are useless if you're working alone on an indie game and you're wasting your time if you do this. [editline]5th March 2016[/editline] [QUOTE=geel9;49872666]did you just call fucking Ziks "not productive"? Just because you have an obsession with being a contrarian doesn't mean everyone else is wrong for following the norm. That code is fucking [B]SHIT[/B] by any standard, and just because Terraria makes a lot of money and has had long-term support doesn't mean it's not [B]absolutely shit.[/B][/QUOTE] It doesn't matter if it's shit. It's code that works and can be supported over a long time. Breathe a little and look at the reality of the universe. Why are you rejecting the reality of the universe? Are you some kind of religious nut? Are you some kind of "good code" religious nut? Do we have to abide by the Church of Good Code otherwise we're infidels and should be killed? You people follow these rules blindly and you haven't opened your eyes to actually looking at the data and seeing what works and what doesn't. It's very sad.
[QUOTE=adnzzzzZ;49872668] It doesn't matter if it's shit. It's code that works and can be supported over a long time. Breathe a little and look at the reality of the universe. Why are you rejecting the reality of the universe? Are you some kind of religious nut? Are you some kind of "good code" religious nut? Do we have to abide by the Church of Good Code otherwise we're infidels and should be killed? You people follow these rules blindly and you haven't opened your eyes to actually looking at the universe and seeing what works and what doesn't. It's very sad.[/QUOTE] What [editline]5th March 2016[/editline] There's so much bullshit in what you just posted I have no idea how to respond. You seem to admit that it is, in fact, shit code, so I don't know what the issue is. Of course he's allowed to write his own shitty code, but that doesn't make it not shitty?
It doesn't matter if the code is shit if it works and can be supported over a long period of time. The purpose of not having shit code is so that it works and can be supported over a long period of time, right? If some code can do this then by definition it serves that purpose. How can you call it shit when it does what it's supposed to do on all fronts?
[QUOTE=adnzzzzZ;49872689]It doesn't matter if the code is shit if it works and can be supported over a long period of time. The purpose of not having shit code is so that it works and can be supported over a long period of time, right? If code can do this then by definition it serves that purpose. How can you call it shit when it does what it's supposed to do on all fronts?[/QUOTE] Just because he [b]can[/b] maintain it doesn't mean that it is [b]easily maintained.[/b] He is allowed to write whatever code he wants, but that doesn't change the fact that it's bad code. Nobody is calling for Terraria to be pulled or for him to be forced to write his code any differently. It's just an example of bad code.
[QUOTE=geel9;49872704]Just because he [b]can[/b] maintain it doesn't mean that it is [b]easily maintained.[/b] He is allowed to write whatever code he wants, but that doesn't change the fact that it's bad code. Nobody is calling for Terraria to be pulled or for him to be forced to write his code any differently. It's just an example of bad code.[/QUOTE] If it wasn't easily maintained he would have given up on the project a long time ago. For instance, the developer of Risk of Rain didn't update his game anymore because it was his first big game and his code was REALLY bad in a way that made it impossible to update. In his case his bad code was actually bad because it made it impossible for him to maintain the project further. In the case of Terraria the code isn't bad because the developer updated the game with lots of content for years. Why are you saying the code is bad when all the evidence in the universe tells you it isn't?
[QUOTE=adnzzzzZ;49872716]If it wasn't easily maintained he would have given up on the project a long time ago. For instance, the developer of Risk of Rain didn't update his game anymore because it was his first big game and his code was REALLY bad in a way that made it impossible to update. In his case his bad code was actually bad because it made it impossible for him to maintain the project further. In the case of Terraria the code isn't bad because the developer updated the game with lots of content for years. Why are you saying the code is bad when all the evidence in the universe tells you it isn't?[/QUOTE] I know you don't really have much experience with maintaining commercial products, but I guarantee that the reason he continued to maintain it was because of [b]lots and lots of financial incentive to do so.[/b] The game's bad code was bad regardless of the fact that he continued to update it.
[QUOTE=Sidneys1;49872190]Can anyone else not connect? FileZilla just gives me 'cannot connect to server'[/QUOTE] I have a dynamic IP and my router tends to fuck sometimes up and resets and therefore i get a new IP. I need to overengineer a solution for this, i could set up a program which updates my current dynamic IP to a file on my VPS which has a static IP and make it public so everybody can fetch it in real time as it happens. New one is [B]78.1.171.16[/B]
[QUOTE=geel9;49872731]I know you don't really have much experience with maintaining commercial products, but I guarantee that the reason he continued to maintain it was because of [B]lots and lots of financial incentive to do so.[/B] The game's bad code was bad regardless of the fact that he continued to update it.[/QUOTE] Have you seen how many copies Risk of Rain sold? I can guarantee you the developer here also had lots of financial incentive but wasn't physically and mentally capable of doing so because his code was bad. The same goes for the original Binding of Isaac. Florian also had lots of financial incentive to update Isaac in ways that Edmund wanted but he wasn't physically and mentally able to do it because of the way he coded the game (which was originally over a period of 3 months, which made the code bad in very unmaintainable ways). Code like the one in the example is very straightforward to work with because everything follows a set pattern and all you have to do to change things or add new things is look at what the pattern is and do your change. There's no hundreds of levels of indirection hiding things behind things which are hidden behind further things. That's one of the reasons why I think it's not bad code and it's code that's very maintainable. But whatever, keep ignoring the evidences of the universe and keep believing in the Church of Good Code. You're a good boy and you'll go to Good Code Heaven!
[QUOTE=adnzzzzZ;49872754]Have you seen how many copies Risk of Rain sold? I can guarantee you the developer here also had lots of financial incentive but wasn't physically and mentally capable of doing so because his code was bad. The same goes for the original Binding of Isaac. Florian also had lots of financial incentive to update Isaac in ways that Edmund wanted but he wasn't physically and mentally able to do it because of the way he coded the game (which was originally over a period of 3 months, which made the code bad in very unmaintainable ways). Code like the one in the example is very straightforward to work with because everything follows a set pattern and all you have to do to change things or add new things is look at what the pattern is and do your change. There's no hundreds of levels of indirection hiding things behind things which are hidden behind further things. That's the reason why I say it's not bad code and it's code that's very maintainable. But whatever, keep ignoring the evidences of the universe and keep believing in the Church of Good Code. You're a good boy and you'll go to Good Code Heaven![/QUOTE] You are an unbelievably condescending person and it just makes you look absolutely ridiculous. Risk of Rain's developer is not the same as Terraria's developer and it didn't sell as well as Terraria did. The Binding of Isaac ceased being updated because Flash was incapable of loading the large .fla file, not because of the code. You're getting very defensive over this and I have to wonder if perhaps your code is similar and you feel attacked. Nobody's saying you or relogic have to code differently. It's just an example of bad code. [editline]5th March 2016[/editline] To get my point across, should I start saying shit like "Keep drinking that koolaid, SJW!" or "*pats head* b-baka!"
Writing shit code and getting rich is quite lucky, you can pay others to maintain your shit code. They are the ones who cry alone silently. Still, writing good code is even better, it makes chances for success even better.
[QUOTE=geel9;49872766]You are an unbelievably condescending person and it just makes you look absolutely ridiculous. Risk of Rain's developer is not the same as Terraria's developer and it didn't sell as well as Terraria did. The Binding of Isaac ceased being updated because Flash was incapable of loading the large .fla file, not because of the code.[/QUOTE] I'm sure the difference between 1 million sales and 5 million sales will change someone's mind about it. "Oh, it's only 1 million people playing my game! I guess I shouldn't really update it!" And as for the The Binding of Isaac it was both. There were things Edmund wanted in the game that were impossible for Florian to do because of how he coded it. [QUOTE=geel9;49872766] You're getting very defensive over this and I have to wonder if perhaps your code is similar and you feel attacked. Nobody's saying you or relogic have to code differently. It's just an example of bad code.[/QUOTE] I get upset at people who follow things blindly without thinking about them. Wouldn't you be upset if someone kept saying the earth is flat when you know it isn't? It's very unscientific to not look at data when coming to your own conclusions about things.
[QUOTE=adnzzzzZ;49872799]I'm sure the difference between 1 million sales and 5 million sales will change someone's mind about it. "Oh, it's only 1 million people playing my game! I guess I shouldn't really update it!" And as for the The Binding of Isaac it was both. There were things Edmund wanted in the game that were impossible for Florian to do because of how he coded it.[/QUOTE] I mean, first of all, it's 5 times. Which is massively different. Second, you're looking at RoR as "bad code" and Terraria as "bad code" without realizing that perhaps there are differences of scale and measure when it comes to "bad code." IIRC, RoR was made in gamemaker, so it wouldn't surprise me that the developer was far less experienced than Terraria's developer. Just because Relogic can maintain bad code doesn't mean the code is good, how many times do I have to say this before you will understand it? [QUOTE=adnzzzzZ;49872799] I get upset at people who follow things blindly without thinking about them. Wouldn't you be upset if someone kept saying the earth is flat when you know it isn't?[/QUOTE] Yeah, you're so enlightened. If only we could ALL be as smart as YOU! *pats head* Somehow, saying shit like that makes me correct.
WAYWO - What are you whining on
[QUOTE=geel9;49872805]I mean, first of all, it's 5 times. Which is massively different. Second, you're looking at RoR as "bad code" and Terraria as "bad code" without realizing that perhaps there are differences of scale and measure when it comes to "bad code." IIRC, RoR was made in gamemaker, so it wouldn't surprise me that the developer was far less experienced than Terraria's developer. Just because Relogic can maintain bad code doesn't mean the code is good, how many times do I have to say this before you will understand it?[/QUOTE] Or maybe the code isn't bad at all, which is what I'm saying from the start. Maybe, Terraria's developers know something you don't, which is that "good code" for them has different properties than what "good code" has for you. Under different circumstances different set of practices should be considered good and bad. If you're coding some quick throwaway thing you use a scripting language. If you're coding kernel level stuff you use C. If you're coding a compiler you probably wanna use a functional language. And so on. Why do different approaches make sense for programming styles and programming languages, where each one has its own pros and cons, but somehow for programming practices you're not allowed to make those decisions and suddenly there's this global "this is good code!" and "this is bad code!". This is bullshit. There's no global good code and bad code because different circumstances call for different types of practices. [QUOTE=geel9;49872805] Yeah, you're so enlightened. If only we could ALL be as smart as YOU! *pats head* Somehow, saying shit like that makes me correct.[/QUOTE] I'll stop saying it when you become a good code atheist. *tips fedora* Are you mad I'm pissing on the face of your God? :weeb: [highlight](User was banned for this post ("Trolling" - Big Dumb American))[/highlight]
[QUOTE=adnzzzzZ;49872845]Or maybe the code isn't bad at all, which is what I'm saying from the start. Maybe, Terraria's developers know something you don't, which is that "good code" for them has different properties than what "good code" has for you. Under different circumstances different set of practices should be considered good and bad. If you're coding some quick throwaway thing you use a scripting language. If you're coding kernel level stuff you use C. If you're coding a compiler you probably wanna use a functional language. And so on. Why do different approaches make sense for programming styles and programming languages, where each one has its own pros and cons, but somehow for programming practices you're not allowed to make those decisions and suddenly there's this global "this is good code!" and "this is bad code!". This is bullshit. There's no global good code and bad code because different circumstances call for different types of practices. I'll stop saying it when you become a good code atheist. *tips fedora* Are you mad I'm pissing on the face of your God? :weeb:[/QUOTE] Okay, I'll make sure that if you're ever in a position to be hired by me, I won't hire you, because you write bad code. No matter what, regardless of how good your code appears to be, "good code" is entirely, 100% subjective, and therefore your code is entirely bad and will never be considered for hiring at whatever company you're applying for.
I wish both of you would leave and never come back.
[QUOTE=Cold;49872869]I wish both of you would leave and never come back.[/QUOTE] Well the important part is you found a way to be superior to everyone else.
[QUOTE=Number-41;49872527]Fun with Lorentz attractors in Anaconda. It's so weird to come from C/C++ where return types are so closely monitored and in Python you have no idea what comes out of a function, but it might work anyway :v: I should read the standard python documentation I guess. [IMG]http://i.imgur.com/n2mjDls.png[/IMG [IMG]http://i.imgur.com/T839SFh.png[/IMG Code can be found [url=http://pastebin.com/UdmVsDzc]here[/url].[/QUOTE] I love working in Python/Anaconda because of that. You just write stuff and it works. No wonder it's starting to be preferred more over things like Matlab by scientists. [editline]5th March 2016[/editline] Also shut up or ban.
Sorry, you need to Log In to post a reply to this thread.