Simple game tutorials

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
pgimeno
Party member
Posts: 3544
Joined: Sun Oct 18, 2015 2:58 pm

Re: Simple game tutorials

Post by pgimeno »

Great resource, good job Santos!

If you make a platformer tutorial, it will probably be quite popular. The question comes around quite often.
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: Simple game tutorials

Post by s-ol »

Santos wrote:I think vector math is definitely something that would be good to include in a tutorial. I think an Asteroids tutorial with vectors all over the place and everything drawn with love.graphics.line and collision detection by line intersection testing and transformation matrices for rotation or whatever (I don't know much about this stuff!) would be great.

Cameras and state systems could be cool too. I feel like OOP and ECS are definitely in "architecture territory" which I want these tutorials to avoid.

I'd point people toward more advanced stuff, but really I'm a noob, so I don't think I should tell people what more advanced stuff is important because I don't know what's important! :P But I really like the "what's next?" idea, because tutorials kind of take you from point A to point B knowledge-wise, and they can leave you stranded at point B. The only learning resource I feel comfortable recommending is Handmade Hero, but that's kind of in another programming world from these tutorials. The Red Blob Games articles seem good also.
Hey, this is awesome! I can't help to notice though how your build process seems a bit messy and your output isn't the most visually pleasing either.
For love2d-book, I set up an AciiDoc(tor) build that can syntax highlight code and have it run in the browser using emscripten/love.js. It might be worth switching to something like that? If you want I could help setting up the infrastructure in a way you like (for example the code doesn't need to be in it's own repo, site can be deployed somewhere else...).

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
Santos
Party member
Posts: 384
Joined: Sat Oct 22, 2011 7:37 am

Re: Simple game tutorials

Post by Santos »

pgimeno, thank you! I think a platformer tutorial would be awesome.

I think an amazing tutorial would be a remake of Spelunky Classic. You can download the source code and it's released under a license which would probably allow the use of its assets in this context!

s-ol, thank you!

In regards to the build process, for changing a tutorial the process is currently:
  • To change the text, edit a text file and run a batch file.
  • To change an image, edit a Lua file, run a program via a batch file and hit a key and exit the program. (This could be changed into just running a batch file.)
  • Copy the new files from the save directory to the repo directory. (A batch file could be made for this too.)
  • Push both repos to GitHub.
Actually a batch file could be created to run all of the steps. :P

So, I'm not sure how this could be improved except for making those batch files, but if you have any suggestions please let me know. (The code for generating the HTML/images is a complete mess though. ;))

Are there any specific things about the visual design that could be better? It's very simple, but, you know, this is the theme. :P But I don't want it to be off-putting.

Live examples are great, like what's linked to from Explorable Explanations. I haven't made use of them, but it's cool that it's possible with LOVE code using love.js.

By the code not needing to be in its own repo, do you mean that the code and the output could both be in the simplegametutorials.github.io repo? The reason why they are in two is because, like you mentioned, the site could be deployed somewhere else. But currently I don't want to have the site anywhere else because I think "simplegametutorials.github.io" is good for a free domain name. :D
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: Simple game tutorials

Post by s-ol »

Santos wrote:pgimeno, thank you! I think a platformer tutorial would be awesome.

I think an amazing tutorial would be a remake of Spelunky Classic. You can download the source code and it's released under a license which would probably allow the use of its assets in this context!

s-ol, thank you!

In regards to the build process, for changing a tutorial the process is currently:
  • To change the text, edit a text file and run a batch file.
  • To change an image, edit a Lua file, run a program via a batch file and hit a key and exit the program. (This could be changed into just running a batch file.)
  • Copy the new files from the save directory to the repo directory. (A batch file could be made for this too.)
  • Push both repos to GitHub.
Actually a batch file could be created to run all of the steps. :P

So, I'm not sure how this could be improved except for making those batch files, but if you have any suggestions please let me know. (The code for generating the HTML/images is a complete mess though. ;))
I guess I wasn't very clear, I was pretty much only talking about this. By using a well-defined markup language that is extensible (like AsciiDoctor) you never need to worry about weird corner cases and shitty HTML generator code, plus having the benefit of an existing ecosystem.

The love2d-book build process is also not perfect right now, but I think I will go at it again some time soon and make it auto-build on pushes so that all you need to do is change the source code and it will rebuild and deploy automatically (deploying works already).

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
Santos
Party member
Posts: 384
Joined: Sat Oct 22, 2011 7:37 am

Re: Simple game tutorials

Post by Santos »

I made an page to introduce LOVE's basic concepts here: https://simplegametutorials.github.io/b ... _concepts/

Admittedly, it's not the simplest introduction for beginners. It covers more of "what I think of as the basic concepts" rather than "what you need to know to get started", and even then maybe what I think of as the basic concepts aren't what everyone would think of.

s-ol, sorry for misunderstanding!

The HTML generation seems pretty trivial except for the syntax highlighting. (Which isn't to say that there aren't unaccounted-for cases in the rest of the HTML generation. :P)

Potentially, robust syntax highlighting would be useful if this thing got popular and lots of people were making tutorials with output that had incorrect syntax highlighting, and potentially people could port the tutorials to other languages, so syntax highlighting for other languages would be useful then too.

But until then, this works for the input it has (I think), and doesn't require extra software besides LOVE.

Also there are some things in the code input that I don't know if all syntax highlighters would account for, such as highlighting parts of the code, but I don't know.
davisdude
Party member
Posts: 1154
Joined: Sun Apr 28, 2013 3:29 am
Location: North Carolina

Re: Simple game tutorials

Post by davisdude »

Hey, I don't know if you saw or not, but I submitted a pull-request to add a game. It's pretty big and might go a bit fast, and I'm sure the formatting's not right, but I thought I'd give it a shot.

Anyway, here it is if you want to look over it.
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
Santos
Party member
Posts: 384
Joined: Sat Oct 22, 2011 7:37 am

Re: Simple game tutorials

Post by Santos »

Awesome! I've pushed some changes related to getting the HTML output to look right (it's not perfect still, my HTML generation code is bad!) on this branch: https://github.com/simplegametutorials/ ... /tree/pr/6

You can generate the HTML by running "_html.bat" and open the HTML page by running "_open.bat". You might need to change them a bit if you're on Linux or Mac, I'm not sure.

I'm kinda torn as to whether it should be on the "simplegametutorials.github.io" page or not. I'm thinking maybe not because I want to keep the tutorials in a very specific style, which might only make sense to me and probably isn't what anyone else would want to make or read.

It might be good if there's a shared way to host tutorials. Maybe in the love2d-community GitHub organization? Right now tutorials are either on the wiki or the blogs or you need to host it yourself. Maybe a shared repo for hosting tutorials would lower the barrier for getting tutorials out there. I dunno.

But regardless, it should definitely be hosted somewhere, it seems like it's one of the more "complete" LOVE tutorials there is! :)
Santos
Party member
Posts: 384
Joined: Sat Oct 22, 2011 7:37 am

Re: Simple game tutorials

Post by Santos »

I've added two new tutorials: a simplified version of Asteroids and a Simon-like game.

https://simplegametutorials.github.io/asteroids/

Image

https://simplegametutorials.github.io/repeat/

Image
Santos
Party member
Posts: 384
Joined: Sat Oct 22, 2011 7:37 am

Re: Simple game tutorials

Post by Santos »

I've updated these tutorials so that you can see the full code at each step, and I've also ported them to Python/Pygame Zero.
Post Reply

Who is online

Users browsing this forum: No registered users and 60 guests