How The 'Code-Off' Began...

Status
Not open for further replies.

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,340
Reaction score
2,503
First Language
Binary
Primarily Uses
RMMV
I was actually going to post that code instead, but I figured the array would still need to be iterated over for it to be equally comparable ^_^

I always thought moghunters code looked real nice but upon further investigation and modificaiton of the scripts, I founds slightly better ways to do certain things. The loops where definitely one of those things :p

That being said, there are undoubtedly scripts of mine which have less than ideal code.
 

Solistra

Veteran
Veteran
Joined
Aug 15, 2012
Messages
593
Reaction score
244
Primarily Uses
I was actually going to post that code instead, but I figured the array would still need to be iterated over for it to be equally comparable ^_^
It doesn't need to be -- the only reason they were iterating that way was to ensure that any nil values would not be included in the encountered enemies. Since compact removes those values from the array, the iteration becomes unnecessary.


Likewise, the reason your inject solution wasn't ideal is because it still uses the conditional and iterates rather than simply grabbing the size of the compacted array.


Also, everyone writes stupid code. Everyone.
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,784
Reaction score
2,683
First Language
French
Primarily Uses
.

Sure. Actually, just because you asked, I started up my VM so I could take a close look at some of Moghunter's code, considering I originally said that simply based off of my initial reactions to seeing some of it, which isn't really specific enough for me to answer your question.So I'm looking at the Atelier "Master Demo" now -- in particular, the "Monster Book", since that seems the most relevant at the moment.Basically, while Moghunter seems to know generally how to write... programmatically, they don't seem to show much understanding of Ruby or how Ruby itself operates. Their code technically works, but it's inefficient and ultimately doesn't show much ability to understand how and why to design an approach -- rather, it operates everything very bluntly, which tends to make the solutions rigid.As a fantastic example of what I mean by this, here's a small bit of the code from the "Monster Book" script:

for i in 0...$game_system.bestiary_defeated.size comp += 1 if $game_system.bestiary_defeated != nilendThis is wildly inefficient and shows a lack of knowledge about one of the most basic features of Ruby: iterators. Basically, for loops are iterators on training wheels (and with different lexical scoping, but that's not usually relevant in most cases). In this particular example, it's causing far more array indexes than are actually necessary to perform the operation needed.
Code:
$game_system.bestiary_defeated.each { |enemy| comp += 1 unless enemy.nil? }
I'd also be remiss if I didn't point out that the code is around 600 lines and could easily be half of that, and even then could be made far more modifiable and extensible. Personally, I'd redesign almost every single element of it.None of those suggestions make use of everything I mentioned -- in fact, most of them completely work around RGSS3 entirely (except the path-finding algorithm). Those seem more like general programming exercises than ones with RPG Maker scripting in mind.I honestly think that the bestiary is the best possible script given the options that have been given in terms of being the most pertinent all-around while making use of multiple areas of RGSS3, and I think that's a good starting point for something "challenging."I'm opinionated enough to do that entirely on my own, thank you very much.

In my own personnal opinion i think yes is make the coding a little rigid but it work perfectly in my opinion

And in moghunter aprentice i dont think moghunter is a bad exemple to follow i think is simply a coding taste

And is coding is simple to understand and we have to take in consideration moghunter principaly use the sprite method

Plus the beastiary script is a old script and dont represent anymore the new way of how moghunter do is code...
 
Last edited by a moderator:

Galenmereth

B___ _E__
Veteran
Joined
May 15, 2013
Messages
2,220
Reaction score
2,008
First Language
English
Primarily Uses
RMMV
And in moghunter aprentice i dont think moghunter is a bad exemple to follow i think is simply a coding taste

And is coding is simple to understand and we have to take in consideration moghunter principaly use the sprite method

Plus the beastiary script is a old script and dont represent anymore the new way of how moghunter do is code...
It is still important to point out that the script in question is not optimal, nor as easy to read as it could be if done the "ruby" way. Enumerators and blocks are ruby solutions that are also optimized for performance, and they come with the added benefit of being much more humanly readable than for loops.

When we come with criticizism it is only meant to be helpful; to the author as well as those that read the script. Without this criticizm, we will never grow as scripters / programmers :)
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,784
Reaction score
2,683
First Language
French
Primarily Uses
It is still important to point out that the script in question is not optimal, nor as easy to read as it could be if done the "ruby" way. Enumerators and blocks are ruby solutions that are also optimized for performance, and they come with the added benefit of being much more humanly readable than for loops.

When we come with criticizism it is only meant to be helpful; to the author as well as those that read the script. Without this criticizm, we will never grow as scripters / programmers :)
sure i understand this and i never say we dont have to critisism XD i just dontt thinked moghunter is considered like a bad exemple to follow And yes i admit this script need some optimisation and i think i should speak with about this script

:3

(Sorry if my coment was bad interpreted)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,413
Reaction score
12,947
First Language
English
Primarily Uses
RMMV
We're getting a little bit off topic now ;)
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,340
Reaction score
2,503
First Language
Binary
Primarily Uses
RMMV
We're getting a little bit off topic now ;)
Only slightly ^_^

Anyway, I was planning on leaving the poll active until Sat the 31st. Then which ever script has won the vote can begin being written.

I was also thinking a date of either Monday the 16th or Monday 23rd June for all entries to be 'entered'.

Whats your guys thoughts on those kind of time frames ?
 

Galenmereth

B___ _E__
Veteran
Joined
May 15, 2013
Messages
2,220
Reaction score
2,008
First Language
English
Primarily Uses
RMMV
Both the 16th and 23rd sound really good to me. Then I should be able to find the time no matter how busy I am :)
 

BadMinotaur

You can do it!
Veteran
Joined
Mar 13, 2012
Messages
260
Reaction score
115
First Language
English
Primarily Uses
RMVXA
I think from the 31st to the 16th of June would be just fine for this. 23rd might be giving us a little too much time IMO, but I know how it can be to be busy.
 

Venka

Veteran
Veteran
Joined
Jun 20, 2012
Messages
945
Reaction score
365
First Language
English
Primarily Uses
I really like this idea :) I've been hoping for something like this since there are other contests that I couldn't even begin to participate in :)

I'd like to enter in this one and will try to put my fragile ego aside since in reality I am still learning lots. The only thing is, I'd rating voting be done via the boards if this event becomes mod supported. They can prevent some of the drama that has happened in the art contests with repeat votes and user creating multiple accounts to vote up their entries.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,340
Reaction score
2,503
First Language
Binary
Primarily Uses
RMMV
lol I didnt even think of that. With that taken into consideration, maybe it would be best if it was just a simple, 'whos script did you preffer' question, but thats not really adequate information for helping people improve their own scripts :/
 

Venka

Veteran
Veteran
Joined
Jun 20, 2012
Messages
945
Reaction score
365
First Language
English
Primarily Uses
Or could do a simple overall vote on the forums via a pole and ask if the votes have the time to fill out the offsite vote to help with the feedback on the scripts. I like the more detailed option since it gives more information to work with. And it'd still be anonymous.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,340
Reaction score
2,503
First Language
Binary
Primarily Uses
RMMV
Yea I prefer the detailed option as well. Thats kind of the whole point in this - to help script writers get feedback on scripts and see how they can improve their code via comparison against code that does something similar.

If anyone has any other thoughts on how the voting should / could take place, please leave your comments.
 

Galenmereth

B___ _E__
Veteran
Joined
May 15, 2013
Messages
2,220
Reaction score
2,008
First Language
English
Primarily Uses
RMMV
I think it's important we get feedback not only from seasoned scripters or similar judges, but users who are more used to using scripts than writing them. It's the only way to really get good at writing scripts for RM's :)
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,784
Reaction score
2,683
First Language
French
Primarily Uses
I think it's important we get feedback not only from seasoned scripters or similar judges, but users who are more used to using scripts than writing them. It's the only way to really get good at writing scripts for RM's :)
I understand what he wanted to say yup it will be cool if we can write feedback for each script so it can help a lot  for improving like

exemple if I do a super wardrobe script really awesome but it was to hard to edit I will be happy to heard some feedback like : I like How look your script in game but..it was a pain to edit

so after this feedback I will think : Ho I really should change some part for make him more easy to edit!

so improvement improvement improvement~

(another question : after the contest the script will still be usable to use? it will be cool if we do a compilation after a certain moment~)
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,340
Reaction score
2,503
First Language
Binary
Primarily Uses
RMMV
I guess its upto the script writer as to whether the script can be used afterwords or not :)

Mine will probably be released with the same t+c's as my other scripts :)
 

Ruby

Of the Earth
Veteran
Joined
Apr 19, 2012
Messages
1,987
Reaction score
893
First Language
English
Primarily Uses
If this is going to be detailed (as it should be), why not make a little subforum for this? It will allow for it's own thread per each contest period and allow us users to give accurate feedback on how we feel about the script. Rather than this one large thread that could easily be way too overwhelming to post in every period.
 

Galenmereth

B___ _E__
Veteran
Joined
May 15, 2013
Messages
2,220
Reaction score
2,008
First Language
English
Primarily Uses
RMMV
If this is going to be detailed (as it should be), why not make a little subforum for this? It will allow for it's own thread per each contest period and allow us users to give accurate feedback on how we feel about the script. Rather than this one large thread that could easily be way too overwhelming to post in every period.
Oooh, I like this! It could be really nice to have these coding "fights" be something that happens at regular intervals, and each time the desired script is voted on. This would not only be fun for scripters and users, but it would also provide an added incentive for all parties to come together and create the scripts we all want :)
 

Venka

Veteran
Veteran
Joined
Jun 20, 2012
Messages
945
Reaction score
365
First Language
English
Primarily Uses
@Ruby you mean like how the pixel madness events are set up? That actually sounds perfect :) Each entry gets it's own thread that folks can respond to it.. with what they like or don't like
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Karen: Hi, I have a condition that prevents me from wearing a mask. :)

Employee: Can you tell me what it is?

Karen: >:(
Feeling a little overwhelmed... There are so many things to do.
- Building a simple website for portfolio
- Setup *******
- Manage social media
There are so many things inside of these tasks :(
Meet the cute little ghost, FhooFhoo. :kaopride:
If anyone here is looking for another high-potential RPGMaker game--besides She Dreams Elsewhere--be sure to follow Lawmage Academy. Good social media presence will take that game far.
Lol, I was about to write a small tutorial and realized it would belong to the MZ section ....that does not exist yet.

Forum statistics

Threads
99,576
Messages
966,832
Members
131,233
Latest member
Mzar
Top