The ongoing 1.3 update epic

A place to talk to other users about the mod.
Post Reply
User avatar
BrainNoMore
Posts: 62
Joined: Sun Jul 22, 2012 3:09 pm

Re: The ongoing 1.3 update epic

Post by BrainNoMore »

I am kind of shy, noobish on forums, scared of ban due to misread rules and also for most part I don't think I have anything important to say... but I am hopping it's not to late to wish FC good luck and once again I really do respect everything you go through for us :)

Also I am wishing it here instead of proper topic viewtopic.php?f=8&t=5040&hilit=good+luck because I'm scared that would be considered necro.
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: The ongoing 1.3 update epic

Post by FlowerChild »

Yay! I fixed the hearts on animals issue, and it wasn't too painful in the end :)

Didn't take a custom packet or anything. What I did was convert the inLove variable within EntityAnimal into watchable data. This does much the same thing as what I was talking about earlier in the thread about blocks automatically transmitting their metadata when you call setRequiresSelfNotify() on them, but it works on individual variables as opposed to the whole set of data.

It's a bit messy in terms of the base-class mod required, as I had to change a whole whack of references to that variable to call an accessor function instead, but it shouldn't have any impact on compatibility.

Anyways, don't sweat it if you don't understand the above, as I'm posting it mostly for the benefit of other modders. You can take a look at EntityAgeable (which is a parent class for all animals I believe) for a simple example of how to set up watchable data within an entity.

Raust, you'll probably want to check that out in particular. I think that should be the bulk of what you need to do to get your nasty little curs working again ;)

Oh, one thing though: be careful with adding those objects and back up your save before doing so. An initial error on my part completely wiped out and reset the chunks my animals were in.
User avatar
Eriottosan
Posts: 656
Joined: Sat Nov 26, 2011 8:27 am
Location: U.K.

Re: The ongoing 1.3 update epic

Post by Eriottosan »

Thanks for the continued insight, FC. It is enlightening, and has given a fair few reference points for when I start updating to 1.3.1. Keep up the good work - I've said it before, but you truly are inspirational!
私は日本語が大好きだ。だから、私と話すとき、日本語で書けば、日本語で書いてください。
I like Japanese, can you tell?
User avatar
TheAnarchitect
Posts: 1010
Joined: Fri Jan 13, 2012 6:21 pm
Location: St. Louis

Re: The ongoing 1.3 update epic

Post by TheAnarchitect »

Honestly even as a non-coder I appreciate the insight into how you work on your code. I enjoy going through it and stripping out useful general-purpose problem-solving principles.

Do recall that you single-handedly restored my faith in design as something other than taking credit for accidentally having a good idea. I'd kill to get this kind of insight into how Corbusier worked.
The infinitely extendable Pottery system
Real Life is an Anarchy Server.
User avatar
RaustBlackDragon
Posts: 1748
Joined: Fri Oct 14, 2011 6:25 pm

Re: The ongoing 1.3 update epic

Post by RaustBlackDragon »

Thanks a ton, this info will really help out! I've been feeling like a 100% noob modder again these past few days because of all the utterly alien SMP concepts I'm confronted with, and this is extremely appreciated :)
What's the price of freedom now?
Can you cut me a deal?
A crate of wholesale liberty,
or a justice combo meal?
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: The ongoing 1.3 update epic

Post by FlowerChild »

Eriottosan wrote:Thanks for the continued insight, FC. It is enlightening, and has given a fair few reference points for when I start updating to 1.3.1. Keep up the good work - I've said it before, but you truly are inspirational!
No prob man, it helps keep me sane to be talking about this stuff too :)

I'm just happy my house didn't get wiped out by the bug I mentioned. I had my animal pits right next to it, but luckily they were separated by a chunk boundary. I hadn't made a backup since coming through my portal, so I'd be swearing bloody murder right now if all my play had gotten wiped out by a single oversight like that.

Anyways, that takes care of hearts, which was the primary player feedback issue. I still have to resolve the birthing particles (PLACENTA! WHY DO YOU BETRAY ME?!!!), but those are strictly cosmetic not really providing any useful info to the player, so I feel much more comfortable letting them slide for the time being.

<runs off to make backups...>
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: The ongoing 1.3 update epic

Post by FlowerChild »

RaustBlackDragon wrote:Thanks a ton, this info will really help out! I've been feeling like a 100% noob modder again these past few days because of all the utterly alien SMP concepts I'm confronted with, and this is extremely appreciated :)
It'll come man. For your entities, once you get a handle on this watchable data stuff, it should be relatively easy. I think the main other problem you'll face is spawning your custom entities, as I believe that part requires custom packets, as all the ents in the MC-code base are basically special cased for this (take a look in EntityTracker.java).

Once I get to Wind Mills and Water Wheels, I should be able to provide additional info on that part.
User avatar
Graphite
Posts: 390
Joined: Sun Mar 18, 2012 3:12 am

Re: The ongoing 1.3 update epic

Post by Graphite »

Yay for being a software developer that can follow an explanation like that. Generally when I hear about bugs, I try to figure out what might've gone wrong, but to be honest I'm drawing blanks on how a mistake here could wipe out entire chunks. Hope you'll excuse me for saying this, but I'm as interested in the errors as in the successes in cases like that :P
User avatar
RaustBlackDragon
Posts: 1748
Joined: Fri Oct 14, 2011 6:25 pm

Re: The ongoing 1.3 update epic

Post by RaustBlackDragon »

Custom packets? Ones that vanilla minecraft isn't capable of reading?

That sounds unpleasant, but I'll worry about that later, and I will get through it :)
What's the price of freedom now?
Can you cut me a deal?
A crate of wholesale liberty,
or a justice combo meal?
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: The ongoing 1.3 update epic

Post by FlowerChild »

Graphite wrote:Yay for being a software developer that can follow an explanation like that. Generally when I hear about bugs, I try to figure out what might've gone wrong, but to be honest I'm drawing blanks on how a mistake here could wipe out entire chunks. Hope you'll excuse me for saying this, but I'm as interested in the errors as in the successes in cases like that :P
I think what happened is that it caused the MC code-base to think particular animals were corrupt, and it reset the chunks they were in to get rid of them.

That's my best guess anyways, and I'm not interested enough to dig into it further as soon as the game crashed I realized I had forgotten to initialize the variables in question. It's only when I fixed it and reloaded my world that I realized the chunks had reset in a "wtf?" moment.
User avatar
Sarudak
Site Admin
Posts: 2786
Joined: Thu Nov 24, 2011 7:59 pm

Re: The ongoing 1.3 update epic

Post by Sarudak »

FlowerChild wrote: Hehe...maybe, but I don't think that's what they teach in school anymore. Over-architecting is definitely a problem that I see a lot of junior programmers develop, and it winds up just slowing down their development speed to a crawl while often creating an inflexible code-base that will ultimately need to be ripped apart and refactored at some point.

I tend to just apply the KISS principle at all stages, keep the code I do write modular and easy to swap out, and get the job done. You'll notice I've never felt the least bit compelled to do a complete rewrite of the BTW code-base, but I will go back from time to time to refactor sections of it when I see the necessity, and rarely will it break anything else.
Lol. When did I say anything about school? I think I could erase everything I learned at school and continue performing my job at the same level. I'm talking about accepted best practice in the field. After all big upfront design and over-architected solutions was one of the things the agile movement was rebelling against. Hence the principle of "maximize the work not done" and the corresponding response of YAGNI (You ain't gonna need it) in response to a proposed 'improvement' to the code that will provide greater 'flexibility' for future features.
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: The ongoing 1.3 update epic

Post by FlowerChild »

Sarudak wrote:Lol. When did I say anything about school? I think I could erase everything I learned at school and continue performing my job at the same level. I'm talking about accepted best practice in the field. After all big upfront design and over-architected solutions was one of the things the agile movement was rebelling against. Hence the principle of "maximize the work not done" and the corresponding response of YAGNI (You ain't gonna need it) in response to a proposed 'improvement' to the code that will provide greater 'flexibility' for future features.
Hehe...yeah. I kinda got a kick out of when the academics decided to formalize "agile development" by giving it a label. My reaction was along the lines of "you mean keep doing what I've been doing all along? All right then" :)
User avatar
morvelaira
Posts: 2406
Joined: Tue Jul 05, 2011 1:56 am
Location: Seattle

Re: The ongoing 1.3 update epic

Post by morvelaira »

Programming is like fashion. Keep doing your own thing for long enough and eventually it will be in style!
She-who-bears the right of Prima Squee-ti
I make BTW videos! http://www.youtube.com/user/morvelaira
The kitten is traumatized by stupid. Please stop abusing the kitten.
User avatar
Sarudak
Site Admin
Posts: 2786
Joined: Thu Nov 24, 2011 7:59 pm

Re: The ongoing 1.3 update epic

Post by Sarudak »

FlowerChild wrote: Hehe...yeah. I kinda got a kick out of when the academics decided to formalize "agile development". My reaction was along the lines of "you mean keep doing what I've been doing all along? All right then" :)
Heh... Yeah. But on the other hand for people who have to work with other people it can be helpful to have a set of principles to look to when you are discussion design decisions. As it can be helpful for those who are not extremely experienced to learn how good programming is done.
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: The ongoing 1.3 update epic

Post by FlowerChild »

Sarudak wrote: Heh... Yeah. But on the other hand for people who have to work with other people it can be helpful to have a set of principles to look to when you are discussion design decisions. As it can be helpful for those who are not extremely experienced to learn how good programming is done.
Yup, for sure. Heck, I may have even pulled the "it's Agile" card out a couple of times myself during my career.

Still though, I couldn't help but smile at it. I get a kick out of labels in general, like I'm sure you've heard me going on about the whole "AAAAAA game" thing on multiple occasions.

We're going off-topic though. Let's bring this back on course.
User avatar
Sarudak
Site Admin
Posts: 2786
Joined: Thu Nov 24, 2011 7:59 pm

Re: The ongoing 1.3 update epic

Post by Sarudak »

FlowerChild wrote: We're going off-topic though. Let's bring this back on course.
Righto. Sorry about that. You know how I like my debates... ;)
User avatar
Ulfengaard
Posts: 546
Joined: Sun Apr 08, 2012 4:03 pm
Location: The Mountain of Dis Pear

Re: The ongoing 1.3 update epic

Post by Ulfengaard »

Thanks for doing this ongoing thread, FC. It is like a backstory video during installation: you're aching to play, and you are grateful that the dev took the time to give you a piece of candy while you wait.
Awfulcopter wrote:...nothing says harmony with nature better than leaves that bleed. AMIRITE?
dawnraider wrote:I think we need to stop asking how stupid people can be. I think they're starting to take it as a challenge :)
Image
User avatar
Ethinolicbob
Posts: 460
Joined: Sat Feb 25, 2012 2:03 pm

Re: The ongoing 1.3 update epic

Post by Ethinolicbob »

Forgive me as I am asking this from memory whilst at work. has/do you anticipate the server-client changes to impact much of the mechanical aspect of BTW code?
Just figuring out if how far I should go before you are able to release
User avatar
matty79321
Posts: 95
Joined: Sun May 06, 2012 1:20 pm
Location: public Location getLocation() { return new Location("Neeeerrrrrrddd"); }

Re: The ongoing 1.3 update epic

Post by matty79321 »

RaustBlackDragon wrote:Thanks a ton, this info will really help out! I've been feeling like a 100% noob modder again these past few days because of all the utterly alien SMP concepts I'm confronted with, and this is extremely appreciated :)
And you feel like a noob, I can't even write a mod yet I know a lot of the basics of java.

On topic, this update seems like its a b!tch to do, so best of luck to you, FC.
Unfortunately, without a total rewrite, vanilla MC will still be a resource whore.
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: The ongoing 1.3 update epic

Post by FlowerChild »

Ethinolicbob wrote:Forgive me as I am asking this from memory whilst at work. has/do you anticipate the server-client changes to impact much of the mechanical aspect of BTW code?
Just figuring out if how far I should go before you are able to release
Hardly at all. I don't use Tile Entities for any of that stuff really, so it should be very easy to port over, once I get the Wind Mills and Water Wheels settled.

I wouldn't expect any changes to the system really.
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: The ongoing 1.3 update epic

Post by FlowerChild »

In further update news:
Spoiler
Show
Image
I've rebuilt my animal pits after the above-mentioned mishap (a little further from my house mind you ;) ), found myself a few wolves, and...

Collected my first piece of brown gold! WOOT!

In honor of tradition, I made sure to do a little dance while waving it and flinging it about :)

I had to give the same treatment to the fed status of the wolves that I did for the love status of animals to make sure the client and server stayed in sync with regards to that.

Next up, it's time for me to start grinding my Hemp to build myself a Wind Mill.
User avatar
MrLemon
Posts: 59
Joined: Fri Jul 20, 2012 7:05 pm

Re: The ongoing 1.3 update epic

Post by MrLemon »

It's interesting to see you working though the tech tree FC! Good luck with the rest of the updating/bug-fixing for 1.3!
User avatar
Thorium-232
Posts: 121
Joined: Wed Jul 11, 2012 3:20 am

Re: The ongoing 1.3 update epic

Post by Thorium-232 »

FlowerChild wrote:In further update news:
Ha, this is exciting. It's like town building in, say, Heroes of Might and Magic, or the progressive upgrade unlocks in late BC/WotLK WoW. Piece by piece your base is coming back online and each part is adding a new visual element to a static screenshot. When all is said and done and BTW is 1.3 compatible, someone needs to turn these into a .gif.
Stormweaver wrote:Then you can just use the day/night cycle to separate out the adults, and put the kids in storage till you're ready to murder them.
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: The ongoing 1.3 update epic

Post by FlowerChild »

Oh, just as an aside: upon further reflection, I realized my making inLove a watchable object is probably a performance hog.

I've taken a note to revisit it, but for modders, it may be worth noting that you probably don't want to be sending tick-counters like that as I'm pretty sure it'll guarantee you sending a network packet for each animal in love mode every single tick.

When dealing with stuff like that, it's probably best to have a separate boolean variable that is the watchable one, and tracks whether or not the animal is in love mode, as opposed to the count. This should ensure that a packet is only sent when the animal actually changes state, rather than every tick (which in theory could generate 1/600th the amount of packets).

Anyways, just a small note on performance. Generally in anything to do with multiplayer, you of course want to minimize the amount of network traffic you're generating as it is far from being an infinite resource. In a case like this, the client really doesn't need to know the precise state of the counter, as all it's concerned with is whether it should be displaying hearts or not, and for that, a simple on/off will suffice.
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: The ongoing 1.3 update epic

Post by FlowerChild »

...and, if you have a block where only certain settings of the meta-data concern the client, instead of using setRequiresSelfNotify() and forcing info to be transfered every time the meta-data changes, you can instead call:

world.markBlockNeedsUpdate() only when the changes you want to be relayed take place.

Which also means that the Hand Crank is now updated to 1.3 ;)

The Hand Crank maintains an internal counter in metadata which corresponds to the clicks that you hear during its operation. However, those changes are of no relevance to the client (sounds are actually automatically transfered from server to client), only the on/off state.
Post Reply