I know this isn't strictly speaking Pico-8 related but I'm not much of a programmer and I get the feeling that a lot of the clever techniques that I see used here are...um...algorithmically standard things in terms of doing 2D graphics and movements and things like that and can probably be used in any 2D game programming language/library.
Does anyone know of any 2D gamedev resources to learn more that explain the math/algorithms involved in simple 2D games and effects? I've done exactly one game in Pico8 and it took a very long time because I don't know how to implement things that appear to be standard 2D videogamey things. Absolutely everything I know about game programming is in that game and it's basically just Pong (again).
Sorry for the off-topicness and potentially vague question.
Same here, man. I knew the concepts of programming but not any of the low-level math stuff that you need in Pico-8 and that seems second nature for a lot of these guys that are pumping out bad ass games.
I don't have any specific resources but my journey usually starts with outlining exactly what I'm trying to do and from there just Googling what I can or asking here on the boards about the topic.
For example, moving an object along a curve was well beyond me. I asked for some clues from folks on here and with a few code snippets I copied and pasted, I got something working. It involved using sin() and cos() functions that are pretty foreign to me (still). Then I work backwards to try and understand it. Learning how to make a guy jump was another...again, more math that I never learned.
So start with listing out the concepts you're after and then find resources for that one thing. Learn, try and repeat.
Thankfully, unless you're making a big complex game, Pico-8 is very forgiving in that it'll run and play even if your code is spaghetti. As I've been told many times, don't pre-optimize. Just get it working and go from there.
I can relate here also. Though previously I had completed a few programs in basic and some web coding, I still come up rather short on programming fundamentals and specifically the general use of math functions.
Atm I'm trying to not just rote copy every pico 8 app from the zines so I can glean a little deeper understanding (so far, mostly from breaking and fixing code, substituting variables etc). At present I seem to be blocked - for lack of a more structured way to break down what a piece of code does, though I'm at least noting which built-in functions are most frequently used (and have even begun to recognise equivalent examples in unity c#).
So far shorter tutorials (such as the zine #2 -FSM exercise) seem more helpful since they reinforce the basic structure of a program, while implementing a limited number of features at a time. I would also support the general approach of 'need do x, learn how to do x' since this keeps focus directly on code applicable to your goals and keep design concepts separate from programming, at least in the initial idea/brainstorming phase. I will let you know if I come across a suitable general reference for programming fundamentals for 2d games. In the meantime, any further advice would also be appreciated!
I think here is a nice article to start with - http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-1/
It maybe not well on explaining it all but atleast gives a view of some approaches. You could just build on that later on. I had to refigure a lot of math I used to learn in another context and man I wish I was explained it better back then.
Also, you might check some pixel shader programming practice. I found a nice resourse here - http://pixelshaders.com/proposal/
It might not be very relevant but It helped me a lot to understang many things about graphics and stuff. Since you could control every pixel in pico you could apply those methods sometimes.
Yes, thank you - those will be very useful.
I guess the frustrating thing is that once I know what I need to do, the actual coding is a breeze. It's coming up with the math that makes it so difficult or not know how on earth a certain thing is done.
It's great that the code for Pico-8 games is available to look at and I've learnt a fair bit just from that but sometimes the most interesting stuff is written by experienced coders trying to do things as small and tightly as possible which makes trying to work out how it works that much harder for us mere mortals.
I cn recommend the book "Introduction To Computer Graphics" by Foley, Van Dam, Feiner, Hughes and Phillips. It's old. Like very old. My version is from 1996.
Nevertheless it is insanely useful for learning the basics of graphics programming and actually understand them. Even the mathematics involved get explained in detail, so no need to read them up elsewhere.
There's probably a PDF file of it. But it helped me a lot to actually have the book in hand and I also have a little notebook (paper, not a computer) to write stuff and ideas in. It helped me more often than not while doing music programming for some of the weirder systems out there and at the moment is helping me with getting down on some ideas for little "demo scenes".
[Please log in to post a comment]