Author Topic: Fangame engine rules  (Read 3234 times)

Adam

  • Trial Wannabe
  • Posts: 3
  • OS:
  • Windows 8.1/Server 2013 Windows 8.1/Server 2013
  • Browser:
  • Chrome 36.0.1985.125 Chrome 36.0.1985.125
    • View Profile
  • Playstyle: Keyboard
Fangame engine rules
« on: August 04, 2014, 11:08:24 PM »
I'm looking for the specific rules usually used by fangames. The things I would need if I were planning to make a similar engine.
- How big is the kid's hitbox? The only sprite I've been able to find of him is 20x20 excluding his gun, and I'm fairly sure that's too big.
- How do you calculate how many pixels the kid should move upwards for each frame the jump key is pressed?
- Is it different for double-jumping, and if so, how?
- What should the FPS be capped at? - I assume the FPS is capped because I know the kid walks at 3 pixels per frame, and without a constant FPS that would mean he moves faster on better computers, which is wrong.

Please don't tell me to use an existing engine. I'm looking to subvert the engine for fun, not just create a fangame.
Thanks!

Swordslinger

  • The Kid
  • Posts: 375
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 33.0.1750.154 Chrome 33.0.1750.154
    • View Profile
  • Playstyle: Keyboard
Re: Fangame engine rules
« Reply #1 on: August 04, 2014, 11:26:02 PM »
I hate to go off topic on this thread, but i really think this topic should be moved into game design, unless i can do it from here, idk what i can do. (I'm still learning my sectional moderator stuff xD)

As for this topic, if you're making a similar engine, then make it similar to Yutuu, I cannot stress this enough, that engine has by far the best stuff in it (Same with Nekoron, Lemon, and Seph) It might be best to at least download the engine and look through it, but not use it.

A Random Signature

Adam

  • Trial Wannabe
  • Posts: 3
  • OS:
  • Windows 8.1/Server 2013 Windows 8.1/Server 2013
  • Browser:
  • Chrome 36.0.1985.125 Chrome 36.0.1985.125
    • View Profile
  • Playstyle: Keyboard
Re: Fangame engine rules
« Reply #2 on: August 04, 2014, 11:35:52 PM »
I hate to go off topic on this thread, but i really think this topic should be moved into game design, unless i can do it from here, idk what i can do. (I'm still learning my sectional moderator stuff xD)

As for this topic, if you're making a similar engine, then make it similar to Yutuu, I cannot stress this enough, that engine has by far the best stuff in it (Same with Nekoron, Lemon, and Seph) It might be best to at least download the engine and look through it, but not use it.
Sure, move it wherever it would best fit. You may have noticed I'm new.
Looking at existing engines sounds like a good idea but it would be hard to do observationally. Do you think decompiling Yutuu would be possible?

Swordslinger

  • The Kid
  • Posts: 375
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 33.0.1750.154 Chrome 33.0.1750.154
    • View Profile
  • Playstyle: Keyboard
Re: Fangame engine rules
« Reply #3 on: August 05, 2014, 12:17:12 AM »
You don't have to decompile Yutuu, all you have to do is download the engine and all of the coding is in there if that is what you mean. I will try moving the topic I've never done it before, If you're new, no problem.
A Random Signature

Sephalos

  • Spike Dodger
  • Posts: 228
  • OS:
  • Windows Vista/Server 2008 Windows Vista/Server 2008
  • Browser:
  • Chrome 36.0.1985.125 Chrome 36.0.1985.125
    • View Profile
  • Playstyle: Gamepad
Re: Fangame engine rules
« Reply #4 on: August 05, 2014, 02:51:42 AM »
1. The player's hitbox uses a seperate rectangle sprite placed around the middle of the player. The sprite is 11 pixels wide by 21 pixel high. It goes from his feets to the top of his head.

2. Gravity is 0.4 and it points down. Jump strength is 8.5. On the first step the player will move 8.5 pixels high, on the second step the player will move 8.1 pixels high, on the third step the player will move 7.7 pixels high. Every step the player looses 0.4 vertical speed (gravity). If the player releases shift and he's going upwards, his vertical speed is multiplied by 0.45.

3. The double jump is the same princible only his jump strenght is 7.

4. The FPS should always 50. This is the number of steps executed per second. The player speed is always 3 pixels. If the FPS is 60 he will seem like he's walking faster but is still 3 pixels per step.
At 50 FPS the player would move 150 pixels in a second. (3*50)
At 60 FPS the player would move 180 pixels in a second. (3*60)

Adam

  • Trial Wannabe
  • Posts: 3
  • OS:
  • Windows 8.1/Server 2013 Windows 8.1/Server 2013
  • Browser:
  • Chrome 36.0.1985.125 Chrome 36.0.1985.125
    • View Profile
  • Playstyle: Keyboard
Re: Fangame engine rules
« Reply #5 on: August 05, 2014, 07:39:03 AM »
1. The player's hitbox uses a seperate rectangle sprite placed around the middle of the player. The sprite is 11 pixels wide by 21 pixel high. It goes from his feets to the top of his head.

2. Gravity is 0.4 and it points down. Jump strength is 8.5. On the first step the player will move 8.5 pixels high, on the second step the player will move 8.1 pixels high, on the third step the player will move 7.7 pixels high. Every step the player looses 0.4 vertical speed (gravity). If the player releases shift and he's going upwards, his vertical speed is multiplied by 0.45.

3. The double jump is the same princible only his jump strenght is 7.

4. The FPS should always 50. This is the number of steps executed per second. The player speed is always 3 pixels. If the FPS is 60 he will seem like he's walking faster but is still 3 pixels per step.
At 50 FPS the player would move 150 pixels in a second. (3*50)
At 60 FPS the player would move 180 pixels in a second. (3*60)
Amazing, thanks!

pieceofcheese87

  • Global Moderator
  • The Kid
  • Posts: 346
  • Personal Text
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 36.0.1985.125 Chrome 36.0.1985.125
    • View Profile
    • Twitch Tv Channel
  • Playstyle: Keyboard
Re: Fangame engine rules
« Reply #6 on: August 05, 2014, 11:31:56 AM »
seph to the rescue
Signature