[QUOTE=NeoDement;27209482]"That means that if you want to create your own twisted abomination where the only scares are how unstable the game is, more power to you"
the game was unstable?[/QUOTE]
Read the sentence again slowly.
"You create multiplayer version of this (Uhuh!) in which the only scares are the bugs." in other words
ITT: Programming snobs bash great mod creator.
[QUOTE=FPSMango;27218221]ITT: Programming snobs bash great mod creator.[/QUOTE]
You mean "ITT: Programmers bash someone who knows jack about programming"
[QUOTE=FPSMango;27218221]ITT: Programming snobs bash great mod creator.[/QUOTE]
You're obviously jelly.
[QUOTE=johan_sm;27218322]You mean "ITT: Programmers bash someone who knows jack about programming"[/QUOTE]
ooh my god who cares, it's not like you see the bad code in the game so why the fuck would you care
(not specifically directed at you)
[QUOTE=Foda;27216516]I don't think you realize how bad it is. Don't get me wrong, the mod is still fantastic but good god the code is very terrible.[/QUOTE]
Entirely beside the point, it doesn't matter a single bit how bad the code is, it runs and that's where your business with it ends.
[QUOTE=Bletotum;27218954]Entirely beside the point, it doesn't matter a single bit how bad the code is, it runs and that's where your business with it ends.[/QUOTE]
Yes you are right, discussing flaws in his source code in a thread about said source code is obviously beside the point.
[QUOTE=layla;27219119]Yes you are right, discussing flaws in his source code in a thread about said source code is obviously beside the point.[/QUOTE]
Discussing? Don't you mean making fun of?
Because I've not seen much discussion here.
[QUOTE=layla;27219119]Yes you are right, discussing flaws in his source code in a thread about said source code is obviously beside the point.[/QUOTE]
discussing sourcecode is obviously on topic, but it's pointless to discuss about some minor flaws that don't affect anything at all (except the code itself)
This is quite awesome, shame most of you are neglecting it because of their coding style.
[QUOTE=BrQ;27219649]discussing sourcecode is obviously on topic, but it's pointless to discuss about some minor flaws that don't affect anything at all (except the code itself)[/QUOTE]
Minor flaws? Reading from disk is expensive and should be done few times as possible. Reading and parsing 50 files when you could just load one and set a clipping rect is a sign that the mod creator knows fucks all.
There are plenty of good scary multiplayer games, such as the original Aliens versus Predators, which was fucking scary in multiplayer.
The key is to just make sure it's immersive and a unique experience for each player. I could see a multiplayer NH2 working out well.
[QUOTE=layla;27220190]Minor flaws? Reading from disk is expensive and should be done few times as possible. Reading and parsing 50 files when you could just load one and set a clipping rect is a sign that the mod creator knows fucks all.[/QUOTE]
does it really affect anything, is it actually noticable
The code was written under the assumption that it would not be viewed by anyone else. It was also written to get the job done. Clipping the rect looked ugly as fuck, so did stretching it. Source kindly doesn't support dynamic alpha masks either. It's a quick and dirty solution to a problem that shouldn't have existed in the first place.
[QUOTE=Dj-J3;27219839]This is quite awesome, shame most of you are neglecting it because of their coding style.[/QUOTE]
This goes to you and all the other people who don't understand the point of this thread. We are not discussing gameplay, fun, or the game as a finished product at all. We are discussing the practicality and effectiveness of the code.
I realize without knowing much about programming, it can be hard to understand why it matters. Simply put, there are a 1000+ ways to do [b]anything[/b], but there is a right way and a wrong way regardless if they have the desired output. We are discussing that and merely that. In programming, it does matter how you do something and it is not just about getting the job done. If you do a shotty job in code then adding onto it, reading it, or otherwise changing it will prove time consuming and difficult.
The quality of the code doesn't necessarily affect the quality of the game but the thread is not about the quality of the game its about the quality of the code. Please understand this basic concept and stop getting all emotional about a mod you probably played for an hour or two.
[editline]5th January 2011[/editline]
[QUOTE=eXeC64;27221294]The code was written under the assumption that it would not be viewed by anyone else. It was also written to get the job done. Clipping the rect looked ugly as fuck, so did stretching it. Source kindly doesn't support dynamic alpha masks either. It's a quick and dirty solution to a problem that shouldn't have existed in the first place.[/QUOTE]
I can tell you don't know jack about jack because clipping the rectangle would look identical if you used a cap on the edge of the clipped texture. There are at least 10 ways to do it better than it was done in his code.
Also depending on how you design the texture you could probably 9slice it.
[editline]5th January 2011[/editline]
[QUOTE=iRzilla;27222562]yes it'll have a small drop in FPS drawing 49 textures for 1 health bar.[/QUOTE]
Not if they're batched.
[QUOTE=Mutex;27222272]
I can tell you don't know jack about jack because clipping the rectangle would look identical if you used a cap on the edge of the clipped texture. There are at least 10 ways to do it better than it was done in his code.[/QUOTE]
The healthbar has irregular edges, the cap wouldn't be flush with the end without stretching the rest of the texture, which would defeat the purpose of the caps. The method that I would have preferred over this would be using an alpha mask but source does not support this. Even loading it as an animated texture and displaying it as individual frames would be nicer but source doesn't support that either.
Yes, the code is ugly, inelegant and almost hacky. I'm not proud of the code itself, I certainly wouldn't have written it as sloppily as I did if it were a long-term project or if I was collaborating with other people on the code-base. The entire hud was rushed. It was the final thing to be implemented before the mod was completed. At that point I only cared about getting it working nicely ingame, I wasn't expecting to have the code scrutinized, judged and criticised.
I hope you can see where I'm coming from here. Yes, the code is bad but there are reasons for it.
[quote=iRzilla]yes it'll have a small drop in FPS drawing 49 textures for 1 health bar.[/code]
Only 1 texture is being drawn per frame for the healthbar.
[editline]5th January 2011[/editline]
Yay, I've even managed to mess up the BBCode here and the edit button is no-where to be found :v:
[QUOTE=Mutex;27222272]the thread is not about the quality of the game its about the quality of the code[/QUOTE]
No, this thread is about the code of the game being made open source, and discussion on what can be done with it for the reason it was released. Bitching about the code quality is just being arrogant, you have no reason to care since it is not your code.
You could have just used a texture atlas, there's no excuse to be loading in 50 textures.
[QUOTE=iRzilla;27223827]Why do some sites use 50 different images for HTML pages? Isn't there something in CSS to mimic a "sprite sheet" pattern.[/QUOTE]
I don't think it matters in web programming because you're requesting the image data over a network instead of reading from the disk so sprite sheets aren't really needed.
Oh and
[cpp]
#include <sstream>
for (int i = 0; i < 50; i++)
{
m_nTexture_Bar[i] = surface()->CreateNewTextureID();
std::stringstream ss;
ss << i;
surface()->DrawSetTextureFile(m_nTexture_Bar[i], "VGUI/hud/bar_" + ss.c_str(), true, false);
}
[/cpp]
Would have made it a bit nicer to look at.
[editline]5th January 2011[/editline]
Oops, that string needs to be put in a std::string constructor but you get the point.
[QUOTE=layla;27223953]Oh and
[cpp]
#include <sstream>
for (int i = 0; i < 50; i++)
{
m_nTexture_Bar[i] = surface()->CreateNewTextureID();
std::stringstream ss;
ss << i;
surface()->DrawSetTextureFile(m_nTexture_Bar[i], "VGUI/hud/bar_" + ss.c_str(), true, false);
}
[/cpp]
Would have made it a bit nicer to look at.
[editline]5th January 2011[/editline]
Oops, that string needs to be put in a std::string constructor but you get the point.[/QUOTE]
For some reason in the Source SDK, Valve don't actually use std::string's at all. It's all char arrays and using a sprintf() alias called Q_snprintf()
[QUOTE=SteveUK;27226077]For some reason in the Source SDK, Valve don't actually use std::string's at all. It's all char arrays and using a sprintf() alias called Q_snprintf()[/QUOTE]
Blame Jason, he's one of the reasons that Source is so messy and unworkable.
[QUOTE=Legend286;27228320]Blame Jason, he's one of the reasons that Source is so messy and unworkable.[/QUOTE]
messy, yes. unworkable, no.
i should get nightmare house 2.
is it mac friendly?
[QUOTE=labbet;27229580]i should get nightmare house 2.
is it mac friendly?[/QUOTE]
I dont think its mac friendly, but its one of the best HL2 mods of all time.
What string manipulation source has seems to be completely undocumented.
Layla, source doesn't have support for texture mapping afaik.
Source is nice for players but ugly for developers.
[editline]6th January 2011[/editline]
NH2 isn't mac friendly. We'd have liked to support mac but it was impractical. Only source 2009 onwards supports mac, so far we can only have the code to mod source 2007 and alien swam. Sadly the alien swarm codebase is like spaghetti, the only thing you can do is alter alien swarm. It's far too convoluted to remove the alien swarm stuff and start with a clean slate.
[QUOTE=eXeC64;27235760]What string manipulation source has seems to be completely undocumented.
Layla, source doesn't have support for texture mapping afaik.
Source is nice for players but ugly for developers.
[editline]6th January 2011[/editline]
NH2 isn't mac friendly. We'd have liked to support mac but it was impractical. Only source 2009 onwards supports mac, so far we can only have the code to mod source 2007 and alien swam. Sadly the alien swarm codebase is like spaghetti, the only thing you can do is alter alien swarm. It's far too convoluted to remove the alien swarm stuff and start with a clean slate.[/QUOTE]
String manipulation in source is pretty much the same as string manipulation in C, it only has those weird aliases because it comes from the Quake engine
You could've drawn the health bar as a subrect rather than 50 textures for each "state"
Source is fine for developers once you get your head around it - which doesn't take all that long. The lack of documentation is the main worry but for the most part you can work out things yourself but doing a few "find in files" searches.
Unless source intentionally doesn't allow you to scissor test ([url]http://msdn.microsoft.com/en-us/library/bb147354%28v=vs.85%29.aspx[/url]) Or set different texture coordinates when drawing sprites, I don't see how they can't have support for it.
Sorry, you need to Log In to post a reply to this thread.