Some simple sample levels and code

2 views
Skip to first unread message

Greg DeKoenigsberg

unread,
Jun 23, 2011, 10:22:39 AM6/23/11
to tinygames
A lot of what I'm focusing on right now is just turning around small
game levels that illustrate Akihabara concepts -- and building out
libraries.

A few levels, with code to illustrate. The basic structure: the game
file itself (game-foo.html) sets up the context, glues together the
Aki libs, adds some more game-specific libs, sets up the game loop,
and starts by loading the first level, which is by default
"bundle-map-begin.js". And these levels can be *incredibly* simple.

1. The most basic level.

GAME: http://gregdek.org/MONGO/akihabara/game-tutorial1.html
CODE: https://github.com/gregdek/akihabara/blob/master/resources/tutorial1/bundle-map-begin.js

2. Connecting to other levels.

GAME: http://gregdek.org/MONGO/akihabara/game-tutorial2.html
CODE: https://github.com/gregdek/akihabara/blob/master/resources/tutorial2/bundle-map-begin.js

3. Rudimentary puzzle blocks.

GAME: http://gregdek.org/MONGO/akihabara/game-tutorial3.html
CODE: https://github.com/gregdek/akihabara/blob/master/resources/tutorial3/bundle-map-begin.js

All of this needs love, of course, and my time is still limited while
I work on other projects -- but I wanted to share and let people know
the direction I'm moving in. Any questions, just ping.

--g

Robyn Bergeron

unread,
Jun 23, 2011, 1:51:40 PM6/23/11
to tiny...@googlegroups.com
On Thu, Jun 23, 2011 at 7:22 AM, Greg DeKoenigsberg
<greg.deko...@gmail.com> wrote:
> A lot of what I'm focusing on right now is just turning around small
> game levels that illustrate Akihabara concepts -- and building out
> libraries.
>
> A few levels, with code to illustrate.  The basic structure: the game
> file itself (game-foo.html) sets up the context, glues together the
> Aki libs, adds some more game-specific libs, sets up the game loop,
> and starts by loading the first level, which is by default
> "bundle-map-begin.js".  And these levels can be *incredibly* simple.

This is actually *super* cool - for someone like me, with fairly
primitive (and I'm being generous, really) coder-skills, having all
the comments about what the code is doing really gives me the feeling
that, "Hey, I could get in and actually play with this and make
something on my own." I *really* like the ease of reading it; it's
not condescending, doesn't assume that you know certain things
already, or overly technical, but just the right amount to get people
thinking that this isn't so hard. And it makes it seem a lot less
overwhelming.

Of course, my primitive skillset is still the key here -- I read
through some of the readme's and so forth, and it seems like some
really basic information might be helpful for someone who is curious
and wants to dig in -- they're also the people we don't want to get
bogged down in other details, generally. (Strike while the iron is
hot, so to speak, eh?) And maybe the information is there, but it's
not really jumping out at me, and in that case maybe it's just a
detail of making it more obvious.

* How can I make something and test it on my desktop, without having
to have a webpage?
* Do I need to be running apache?
* Where does the magic lie that converts
https://github.com/gregdek/akihabara/blob/master/resources/tutorial1/bundle-map-begin.js
to a webpage at http://gregdek.org/MONGO/akihabara/game-tutorial1.html
? In other words -- once I do have an edited .js file and all the
other associated magic, where do I go to try it out, where do I define
the .html page name?

... and so forth.

And it really could be that all this stuff happens magically, and is
obvious -- but for someone like me, who knows just enough to be really
dangerous :) , I wind up thinking about that stuff, and just when I'm
thinking, "I Can Do This!" -- I'm missing the last piece of the
puzzle, so to speak. ("That stuff" being things like - I know that I
could look at things on my computer using the magic of 127.0.0.1 /
localhost, but how the heck does it get there?)

I think that for something like this, where it's appearing to be
easily grasped, the last thing we want to do is lose a potential
developer when they've come 90% of the way. If they've already
glanced at the code and think they can do it, they probably can;
having that second-to-last 5% of "How do I get it someplace to
actually use?" not be a hurdle seems really important. (The last 5%,
of course, is showing them how to get that code off of their computer
and share it with other folks, which is another email for another
time.) If I'm just getting started and interested, before even trying
to code, is to see if I can get existing code to work on my computer
-- and if I can't figure out how to do that, I'm probably going to
quickly lose interest in playing with the code.

Anyway - I really like what you've done here, it seems like it would
be great for someone like *me*, or someone like a high school student
or intro-level college student, who has the curiosity to get started
and has a basic understanding of how code works. It's almost an
education double whammy -- educational games for kids, and easy (and
thus fun and rewarding) learning of coding for ... bigger kids, like
myself. :)

Oh, right -- I'm not just complaining without offering a solution, of
course. I'll think a bit over the next day about "what pieces am I
still missing to really get started" -- and then see if I can figure
them out on my own, or ask questions, and see about piecing together
some sort of easy-start guide over the weekend. I'm probably a
reasonable example of the audience of such a thing -- curious, knows a
little, thinks she could probably do it.

If anyone has any other similar "how do I get started" types of
questions -- speak up, you're not alone :) Would be happy to add them
as at least "to-do's" to the easy-start info -- even if I can't answer
them, maybe someone else can, and incorporate those bits of
information so others can get started just as easily. (I'm now
thinking, would this stuff be better as an FAQ in html-land, rather
than as a easy-start file? Or maybe a combination of both would be
helpful? Things to think about, I suppose.)

-Robyn

Greg DeKoenigsberg

unread,
Jun 23, 2011, 3:13:28 PM6/23/11
to tiny...@googlegroups.com
To address a specific point or two inline:

On Thu, Jun 23, 2011 at 1:51 PM, Robyn Bergeron
<robyn.b...@gmail.com> wrote:
> This is actually *super* cool - for someone like me, with fairly
> primitive (and I'm being generous, really) coder-skills, having all
> the comments about what the code is doing really gives me the feeling
> that, "Hey, I could get in and actually play with this and make
> something on my own."  I *really* like the ease of reading it; it's
> not condescending, doesn't assume that you know certain things
> already, or overly technical, but just the right amount to get people
> thinking that this isn't so hard.  And it makes it seem a lot less
> overwhelming.

Literate programming ftw. :)

> Of course, my primitive skillset is still the key here -- I read
> through some of the readme's and so forth, and it seems like some
> really basic information might be helpful for someone who is curious
> and wants to dig in -- they're also the people we don't want to get
> bogged down in other details, generally.  (Strike while the iron is
> hot, so to speak, eh?) And maybe the information is there, but it's
> not really jumping out at me, and in that case maybe it's just a
> detail of making it more obvious.
>
> * How can I make something and test it on my desktop, without having
> to have a webpage?
> * Do I need to be running apache?

For me, Firefox 3 allowed me to load all of these pages locally, and
so long as the directory structure was intact, everything would "just
work". For Chrome, I had to run Apache.

> * Where does the magic lie that converts
> https://github.com/gregdek/akihabara/blob/master/resources/tutorial1/bundle-map-begin.js
> to a webpage at http://gregdek.org/MONGO/akihabara/game-tutorial1.html
> ? In other words -- once I do have an edited .js file and all the
> other associated magic, where do I go to try it out, where do I define
> the .html page name?

Yep. This is probably text that belongs in the HTML files themselves.
I need to write some of that up -- or someone else who has a few
minutes to figure it out could write it up too. :)

> ... and so forth.
>
> And it really could be that all this stuff happens magically, and is
> obvious -- but for someone like me, who knows just enough to be really
> dangerous :) , I wind up thinking about that stuff, and just when I'm
> thinking, "I Can Do This!" -- I'm missing the last piece of the
> puzzle, so to speak.  ("That stuff" being things like - I know that I
> could  look at things on my computer using the magic of 127.0.0.1 /
> localhost, but how the heck does it get there?)

It's all javascript in the client. The only reason it doesn't always
run locally is because AJAX for some browsers needs to have a domain
name for detecting cross-site scripting issues.

> I think that for something like this, where it's appearing to be
> easily grasped, the last thing we want to do is lose a potential
> developer when they've come 90% of the way.  If they've already
> glanced at the code and think they can do it, they probably can;
> having that second-to-last 5% of "How do I get it someplace to
> actually use?" not be a hurdle seems really important. (The last 5%,
> of course, is showing them how to get that code off of their computer
> and share it with other folks, which is another email for another
> time.) If I'm just getting started and interested, before even trying
> to code, is to see if I can get existing code to work on my computer
> -- and if I can't figure out how to do that, I'm probably going to
> quickly lose interest in playing with the code.

Yep. I see that these things need to be done -- right now I'm in the
"release early, release often" mindset. Making downloading, editing,
and uploading *dead easy* is a project that I will work on as soon as
I can scrape together the time.

> Anyway - I really like what you've done here, it seems like it would
> be great for someone like *me*, or someone like a high school student
> or intro-level college student, who has the curiosity to get started
> and has a basic understanding of how code works.   It's almost an
> education double whammy -- educational games for kids, and easy (and
> thus fun and rewarding) learning of coding for ... bigger kids, like
> myself. :)
>
> Oh, right -- I'm not just complaining without offering a solution, of
> course. I'll think a bit over the next day about "what pieces am I
> still missing to really get started" -- and then see if I can figure
> them out on my own, or ask questions, and see about piecing together
> some sort of easy-start guide over the weekend.  I'm probably a
> reasonable example of the audience of such a thing -- curious, knows a
> little, thinks she could probably do it.

Want a wiki account? Let me know. That goes for all of you. :)

> If anyone has any other similar "how do I get started" types of
> questions -- speak up, you're not alone :) Would be happy to add them
> as at least "to-do's" to the easy-start info -- even if I can't answer
> them, maybe someone else can, and incorporate those bits of
> information so others can get started just as easily.  (I'm now
> thinking, would this stuff be better as an FAQ in html-land, rather
> than as a easy-start file? Or maybe a combination of both would be
> helpful? Things to think about, I suppose.)

Thanks Robyn.

--g

Robyn Bergeron

unread,
Jun 23, 2011, 3:17:32 PM6/23/11
to tiny...@googlegroups.com

Yup. Hook me up!

Reply all
Reply to author
Forward
0 new messages