Journal #8696

Posted 7 years ago2016-04-22 08:31:49 UTC
We have to deal with complex entity systems quite often in Goldsource. Until recently, I used to start working on them directly in Hammer without any preparation beforehand.
However, as a computing student, we've been taught Oriented Programming and the analysis and design process. Basically, it's about finding requirements for a software and designing the code before actually starting coding it. Naturally, I wondered: why not try the same for Goldsource entities systems? I always struggled to make complex entity systems and the method I used to use makes the system a real pain to build, to understand and to maintain, so it sound like a good idea.
So here it is, I tried to design the entity system of an elevator using the software Visual Paradigm with an object diagram. Each type of entity is a class and each entity is an object. Targets are represented with dotted arrows.
https://onedrive.live.com/redir?resid=A52162CFA2ECDDBB!28411&authkey=!AN3aD6RykHcT_i8&v=3&ithint=photo%2cjpg
Classy, isn't it? The only problem is: for some unknown reasons, it doesn't work… -_- But I'm working on it!

11 Comments

Commented 7 years ago2016-04-22 08:56:39 UTC Comment #67374
Visual Paradigm, now there's a software I haven't thought about in a long time. That thing had a properties dialog that had like 20 tabs in it. From one of the tabs, you could open another dialog with another 20 or so tabs. Then you could open yet another properties dialog with yet another 20 or so tabs. It's a shining example of terrible UI design. This was 8 or so years ago though, I hope they've improved it since then...

They made us use it to generate Java code templates for a uni course I did. In the end it would have been 10 times faster to just write the damn code, but the tutor insisted using the diagramming tool was better somehow. Academic type people are strange.
Commented 7 years ago2016-04-22 09:16:24 UTC Comment #67381
Ouch... I've never been asked to use Visual Paradigm to generate code template. Instead, since we're asked to provide a class design for each for our assignments, I use it on my own to generate class diagrams from my code instead! :P
It will deceive you, but Visual Paradigm is still the same, there's at least 3 rows of tabs for each panel, opening each another panel. I'm not sure it's a bad UI. You just have to know where are the options of interest for you, and you can be sure to see every possible options available in one place.
However, you can also sometimes made a right click and make changes without opening a panel, it's quite rare though.
Commented 7 years ago2016-04-22 09:37:53 UTC Comment #67378
Am I the only one who has an Oriented Object Programming teacher that ask us to do the unit tests first and the code itself later ?
Commented 7 years ago2016-04-22 11:05:43 UTC Comment #67375
My OOP and unit test courses were in the same course as well, but they handled it really poorly, in my opinion. Instead of testing interfaces, like you're supposed to, they gave us some shitty code and some shitty unit tests and asked us to un-mangle them. I had a negative impression of unit tests for quite a while, it wasn't until I worked full time for a couple of years that I realised the proper way to use them and how helpful they can be.

I still don't write them though.
Commented 7 years ago2016-04-22 11:25:06 UTC Comment #67373
I never really wrote anything down, I just jumped right in.
Commented 7 years ago2016-04-22 18:44:00 UTC Comment #67377
I've had profs tell me I have to make class diagrams, logic flowcharts, figure out the Big O complexity, yadda yadda yadda. Never really saw the point of all the paperwork.

Now, I don't code much out of class since I'm focusing on the art and design side of things, but I find it much easier to just simply describe how it works from a high-level perspective on paper in plain english, then make a step-by-step comment skeleton of what goes where before diving right into the code.
Commented 7 years ago2016-04-22 18:56:18 UTC Comment #67376
As a maker at heart, I will always hate testing. Ok maybe it's too early to generalize, I don't have much experience. But testing stands in the way of my creativity flow.
Commented 7 years ago2016-04-22 19:21:00 UTC Comment #67380
I dont think goldsrc entity systems are complicated enough to need some kind of management tool. Dont you have 1 or 2 multimanagers handle everything anyway?
Commented 7 years ago2016-04-23 08:47:21 UTC Comment #67382
I personally prefer to make as much design as possible. Otherwise I get lost when I have to resolve any unexpected problems or question like the need of a new class, or any kind of design change / addition.

@2muchvideogames Now that you mentioned it, I feel like my elevator system is quite too much complicated! :P But there's actually a reason for that. I made it so any new floor possibly added later do not interfere with the previous floors. In other words, it doesn't need to know what the other floors are and at which floor the elevator is, nor if the elevator is moving or not.
Commented 7 years ago2016-04-23 10:22:30 UTC Comment #67379
You might be interested by that Loulimi (WARNING : french language with an Italian accent).

And the map itself.

There was parts 1 to 7 which he explained how the whole system worked but due to the limit of size of his hoster he had to remove them.
Commented 7 years ago2016-04-25 06:34:57 UTC Comment #67383
Aha, Comatrix and his accent, I haven't forgotten yet! :P
His elevator is quite classy, I may peek in the rmf a little if I'm not too much pretentious! ^_^

You must log in to post a comment. You can login or register a new account.