zPlat in Retrospect - The Engine That Tried to be a Tutorial

Posted by KNZone2 on Jan. 14, 2016, 12:32 a.m.

I made zPlat because nobody else was really making a platformer engine of its kind. The key difference was not in what it offered in terms of functionality, but what it offered in terms of intent. If you go to zPlat's submission page, you'll see that the one screenshot I provided was not of the engine in play, but instead, it's a screenshot of the code and the *paragraphs* of commentary I made for individual lines explaining how the functions and variables interact and what the design decisions achieve.

Despite it having a fraction of the functionality that bigger engines had, despite it even being somewhat poor coding practice, it received praise and an impressive score. The reason for this is that was made to *teach* people how to code a platformer game.

When I was in High School, I submitted a tech demo of a game called Polish. It was meant to be a full game with graphics and lives and health and all of the other holdovers of arcade platformers that are going out of style, these days. The problem was that I didn't know how to code. Some controls overrode the other, the character got stuck in places, the controls were clumsy and the collisions were sketchy even under regular circumstances. I lacked a fundamental understanding of computers and I didn't know good techniques for coding.

One issue that I find with engines submitted as open source examples is that they provide code, some of it good enough to read, but it's hard to use them as learning tools, and there aren't very many project files that teach you concepts like finite state machines or how to properly calculate your controls. zPlat 8 was rewritten seven times because I kept finding amazing breakthroughs while studying all of the engines I encountered, and I had many ideas to expand into to reach beyond that.

That's the thing, though, is that there's a huge price in making your projects and engines more complex - the code becomes less simple, and simplicity doesn't teach. The major setback that I endured was navigating lines and lines of code from different authors and trying to factor in my own ideas formed from observing these engines simultaneously.

That strain also fails to count the ignorance that I had as an inexperienced developer. I created "action recognition" in my platformer engine, which was just a variable that tracked my character's status, which was sort of how a finite state engine works, except it wasn't structurally set up correctly, so the code is still really complicated. zPlat is anything but perfect, it in fact fails to perform a lot of good coding practice even for its own time.

zPlat attempted to combat its own growing complexity by only offering the most basic possible version of itself as a download, and then anything you could add on to it would be found in a forum thread where you could copy blocks of code that add new features while explaining how they work. zPlat was intended to be distributed as simply as possible and its complexity to be as modular as possible.

As an engine, however, it betrays its own purpose a bit (albeit less so than other engines) because it still is a compilation of techniques into one large project file. This makes it harder to digest than a collection of project files that each explain one concept at a time. I feel like the latter could be more advantageous.

I still feel like zPlat deserves to exist, however. It was intended to see contributions from the community, but sadly its support didn't get off the ground, and lucky it didn't, because the code is pretty bad in a lot of spots, even if it means well. I do think we need an engine like it. There are very experienced programmers out here who can code one particular thing at a time, make the most minimalist possible creations that explain programmer concepts and tools to educate other game developers. Just *how* do you make a binary tree in Game Maker? Some of us have years of knowledge and the capability to put into words just how the pieces of a puzzle fit together.

Open source code can be made to teach, is my philosophy, in small steps, in small solutions. In retrospect, despite its major shortcomings, zPlat as a personal project was very beneficial for my game development skills, and it gave me an ambition to learn how to communicate effectively, as well as provide a platform that I could share with other people. If we can work together on an engine that is designed to teach, we will be provide the community at whole a huge potential for learning.

Comments

KNZone2 8 years, 3 months ago

Yes, Spectre, that is the purposefully condensed code from the backup object in a six year old project file that a kid in high school wrote who yesterday admitted that neither the coding practice nor the code itself was professional.

I mean dude how cool do you think you're feeling from acting all superior about some other person's six year old work that he tried to learn with little help? Like, do you really feel cool for acting like that? Whatever.

And sure StevenOBrien just give me a minute as I made some other changes to other parts of the CSS to avoid breaking the layout.

Cpsgames 8 years, 3 months ago

Quote:
I mean dude how cool do you think you're feeling being all superior about some other person's six year old work that he tried to learn with little help? Like, do you really feel cool for acting like that? Whatever.

Why so defensive? All he did was point out some messy looking code.

Tacos with sriracha are probably pretty good.

KNZone2 8 years, 3 months ago

The CSS was literally made last night dude, and then told just now to change, give me some time.

It's from the wrong part of the project file. The object he copied that code from was player_cond or something similar. It's like going to jquery.min.css and being like "wtf why is it all on 1 line thats stupid." The actual Player object, which is pretty much the first object in the entire project that you could possibly encounter, is better formatted and has lots of documentation around it. It's not *professional* but that's not what I was talking about in the blog post.

Like, I'm making this blog post that basically says "Using comments to explain how code works is really important to teaching newbie players otherwise we will be doing nothing to help them."

And the thing that pisses me off most about Spectre's post is not that he pointed out messy code or even that he's being unfair in his criticism, it's just the attitude around it. That "I'm better at coding heh heh heh" nonsense like… It's juvenile. His header image is a scrolling gif of nested for loops. Like nobody has ever had to meet an unnecessarily tight deadline, before, or whatever. Even if it's bad code, it's juvenile to mock it. It breeds a negative atmosphere in a community.

Like if I'm not coding at a professional level at 17 years old without much of the aid of others and only *other existing engines* to base the work off of, then it's ridicule time for what was at the time months of work and thought and planning, y'know? I'm not defending my work, I'm saying treating someone like that isn't cool. We all have our own pace of learning and honestly? The world we're in today is *WAY* better at teaching how to program than even the world we were in six years ago.

I mean, y'know, it's a matter of politeness.

I honestly *can* defend it because I put a lot of work and thought into it. And this post today was not about the code (which is not really high-quality at all, I mean I literally stated this multiple times in the blog post), but the idea behind the engine's purpose. I made it to teach what I learned to the best of my ability. There isn't an engine in 64Digits that went to the detail and extent that mine did. And people appreciated that time I invested into documentation because they took away a higher understanding of how certain things work. (And yes, misunderstandings, as reluctant as I am to say it).

DesertFox 8 years, 3 months ago

Quote:
it's a matter of politeness.

It's also a matter of politeness to not respond with vehemence like that.

Chill, KNZone. You're getting more mad about how he made you a little mad (strong emotion can recurse like that). He ain't out to get you. You're reading way too much into things.

KNZone2 8 years, 3 months ago

I didn't say he was "out to get me," I said he was rude and that his attitude about an amateur's attempt to code was poor.

The object he took the code from was clearly not meant to be readable, and he presented it like it was a crucial part of the project. It's just the compressed form that's not meant to be read.

I'm not overreacting at all, I'm telling it like it is. I mean I'm not being unreasonable or out of line at all. If anything, it's Spectre who should be asked not to act the way he just did.

DesertFox 8 years, 3 months ago

Quote:
I didn't say he was "out to get me"

I never said you said that. *I* said that. You are over-reading his comment, and you are over-reading mine now in the same manner. You are creating paragraphs of text in response to a single-word comment, and someone /elses/ comment about your reaction.

Puts on official mod hat. Calm down. The ratio of his text to yours over 100 to 1 - you ought to consider that salient fact.

Quote:
It's just the compressed form that's not meant to be read.

If its not meant to be read in this format, then ask yourself why did you post it in that format? I clean up my code syntax before posting, if it needs it. Isn't doing so is a matter of *ahem* programmer politeness?

KNZone2 8 years, 3 months ago

I took offense to a user's snide comment and provided a descriptive explanation about why I felt offended and why the snide comment is destructive in nature… and you're putting on the "mod hat" and telling *me* to "play nice?"

Is your method of preserving peace just shutting down complaints with threats of disciplinary action?

KNZone2 8 years, 3 months ago

Just saw Spectre's apology.

KNZone2 8 years, 3 months ago

I mean, it wouldn't be unreasonable to give you the benefit of the doubt, Spectre, but to be safe, let's have some distance for a while, dude.

DesertFox 8 years, 3 months ago

Quote:
Is your method of preserving peace just shutting down complaints with threats of disciplinary action?

No, my method of peace is to give someone being inflammatory several warnings before disciplinary action. You are accusing others of being rude and snide, while you do not realize that you are displaying those characteristics yourself, here in your comments.

Everybody else is quite within the normal bounds of commentary on this site. You have not been.

3rd time, calm, please. Think before you post again. Wouldn't you rather your blog be about said blog's content, and not about this altercation?

Edit: Matter resolved in between this post and the post this was in response to.

For future reference, there were not any threats of disciplinary action made, contrary to what you may have thought or read into the situation - I only ever asked you to calm down. Strong emotion clouds judgement like that, it makes for rash decisions and affects how we interpret things - I'm not going to punish you for having emotion, not even when you turned it against me.

I put on the "mod hat" (head administrator hat, actually) because when I tried to ask nicely beforehand without it, you refused to listen. You had no way of knowing I was staff as you've not been active, and generally, when I ask someone to calm down, there's a good reason - its because I'd rather avoid having to take any disciplinary action.

Your original reply to Spectre was warranted (which is why I've not hidden/irrelevant-ized it). The 500-word post after that, not so much. Writing long posts fueled by emotion is a recipe for starting an argument, and its my job to put the kibosh on that, because arguments are bad for all involved.

You are still welcome here, there are no hard feelings.