Log In  
Follow
Olivander12
[ :: Read More :: ]

Hey guys,

I am new to programming in general and started coding with the Pico-8 a few days ago. I did read/watch a lot of tutorials and got some small "games" already working. I want to take it slowly so that I understand what I am doing. My main goal is to program a simple jump'n'run game.

Now my questions is: Is it possible to add certain things (modules) to my existing code (basic movement with walking animation) or do have to to re-code everything when things get more complicated? I am asking since I did two tutorials. The first one did movement like this (example for left button)

 if(btn(0)) player.x-=player.speed

Then I read another in the fanzine #2 where movement was done in a way I could not follow. The author used different states for walking, jumping and being idle. The whole thing was called "finite state machine".

Now I am unsure about two things: Does the first approach allow jumping, falling, etc or do I have to work with the states? Secondly, I would like to add things like particle effects or shooting bullets to my game. Can these (and other) modules (do not know if that's the correct expression) be simply added without having to re-code everything?

Tl;dr:

  1. Can things like jumping, falling etc. be added to the abovementioned example for movement?

  2. Can modules like shooting bullets, particles, enemy ai etc. be simply added to the existing code or do they need a whole different "frame" each depending on how they work?

I hope my questions are clear and they are not too nooby. Thanks in advance for your answers.

P#38507 2017-03-21 10:22 ( Edited 2017-03-23 07:20)

Follow Lexaloffle:          
Generated 2024-04-19 19:23:46 | 0.064s | Q:5