Author Topic: Burguer stuff  (Read 10120 times)

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4185
    • View Profile
    • Portfolio
Burguer stuff
« on: 2017-Jun-10 »
Hello chaps.

I have been working on a food game. Here the (last version) beta project for you to try and a screen shot to wet appetites.

CONTROL:
Arrows for movement
Z for jump
X for pepper

DEBUGG:
F1 for info and grid
Q W E A S D for simulating different hits
R F for simulating hard stomp
I O P to open doors

LOG:
2d  layout
3d  player mechanics + player gfx
1d  level mechanics + burguers gfx
1d  burguer mechanics
...

« Last Edit: 2017-Jun-15 by erico »

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2613
    • View Profile
Re: Burguer stuff
« Reply #1 on: 2017-Jun-11 »
I like it. From the little bob of his head to the way his eyes rotate around the body.

The walking is fine but there is a pause after each jump, stopping you walking which feels very awkward.
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4185
    • View Profile
    • Portfolio
Re: Burguer stuff
« Reply #2 on: 2017-Jun-11 »
hmmm, I will look into it.
If you fall a small distance, there is no stop. If the distance is a bit big, you stop a little and if the distance is big, you stop for quite a while.
I think I will take the pause off a normal jump. Thanks bigsofty.

Offline dreamerman

  • Global Moderator
  • Dr. Type
  • *******
  • Posts: 288
    • View Profile
    • my personal website
Re: Burguer stuff
« Reply #3 on: 2017-Jun-11 »
I have similar thoughts as bigsofty, if you are jumping and you land on same level platform there shouldn't be that stop / crouching. But overall movement is good.
btw. how you check for collisions? grabbing pixels from map or something hard-coded into game?
Check my source code editor for GLBasic - link

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4185
    • View Profile
    • Portfolio
Re: Burguer stuff
« Reply #4 on: 2017-Jun-11 »
I thought that making a little stop on a normal jump would make the player jump only when necessary, the idea was to prevent constant jump walking when chased. I will make it with no stop on the same level though.

The map (while an image) has an equivalent array under it.
I´m converting player´s sprite coords to the array and there checking whether it is ground or not. I´m doing that only when the player is falling.

Here is an .exe with that said in visuals, you can see the map array, the black block is the player´s position converted.
The Y coordinate has a twist, it converts to the array but then it fits into an 8 slot variable(size of the titles), the player is only at ground if the array has a ground value and the Y coord is at slot 7.

If you are interested, I may share the code.
Thanks for the feedback.

Offline dreamerman

  • Global Moderator
  • Dr. Type
  • *******
  • Posts: 288
    • View Profile
    • my personal website
Re: Burguer stuff
« Reply #5 on: 2017-Jun-11 »
In such case, it all depends how fast enemies will move and so on, but thats good point, it's not Quake to do jump runs :D
That collisions are nice and efficient for gravity, with second layer (for bonuses / enemies) would be interesting approach in opossite to classic rect-based collision checking. This version and your description is sufficient, it could serve as solid tutorial on player movement. :)
Check my source code editor for GLBasic - link

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4185
    • View Profile
    • Portfolio
Re: Burguer stuff
« Reply #6 on: 2017-Jun-11 »
yep, but I will still use rect collision for the player to player to enemy ones, and also for the burguers walk over.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4185
    • View Profile
    • Portfolio
Re: Burguer stuff
« Reply #7 on: 2017-Jun-12 »
Updated the project on the first post to reflect many changes to the player´s control.
Apart from fixing the jump as you guys recommended (yeah, muuuch better now), I also fixed some tweaks on the movements and its animations and added the pepper throw, you can do so by pressing X.
The movement should be much better now, it must be butter smooth!

Leave the player facing left or right for a while and a random looking around anim kicks in, kind makes it a bit more alive.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4185
    • View Profile
    • Portfolio
Re: Burguer stuff
« Reply #8 on: 2017-Jun-15 »
Re updated the project, now you can walk over the burguers and they will fall and stack.
Updated first post too so it feels more organized.

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4144
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: Burguer stuff
« Reply #9 on: 2017-Jun-15 »
That's working really well now erico :)
I came. I saw. I played.

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2613
    • View Profile
Re: Burguer stuff
« Reply #10 on: 2017-Jun-15 »
Yup much more fluid and natural now. I like the jiggly of the burgers when they hit the ground, it's a nice touch.

This may be a feature of the original game but should the character be facing away from the ladder when descending?
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4185
    • View Profile
    • Portfolio
Re: Burguer stuff
« Reply #11 on: 2017-Jun-15 »
I´d like the ladder to actually be a stair, not sure yet how to depict it visually.
The background is probably going to be pixel drawn. Would be nice to have some further background movement too.

On the code,
I suspect I´m going to have trouble sorting the z part on displaying the players/enemies above each other.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4185
    • View Profile
    • Portfolio
Re: Burguer stuff
« Reply #12 on: 2017-Jun-16 »
Another thing on the player movement...

Some friends of mine complained one could just fall through a "ladder" to death on the water while going down.
My original thought was to have a very movable player, no constrains any where.

I don´t what to do with such without complicating the movement.
Ya, start constraining movements based on the last vertical/horizontal input.

The build that is up running has a temp fix:
.If the player is going down and it hits an end of ladder that has nothing under it, it stays in place.
But that also plays weird, if you have to escape down on such places, you won´t be able.

Any thoughts about that?
« Last Edit: 2017-Jun-16 by erico »

Offline dreamerman

  • Global Moderator
  • Dr. Type
  • *******
  • Posts: 288
    • View Profile
    • my personal website
Re: Burguer stuff
« Reply #13 on: 2017-Jun-16 »
hm.. everyone may have  some preferences about such situations.. Some solutions:
1. Player can only climb up on ladders, every time he will press down key he will fall normally to lower platform, but if he is falling on ladder then there is no that stop/crouch after falling. So down key is like 'drop from current platform'.
2. Same movement as in current verision + if player is on a ladder that has nothing beneath it, he needs to press down again to fall from it - even if he is climbing down - something like double tap with key.

btw. nice effect with that falling burgers :)
Check my source code editor for GLBasic - link

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4185
    • View Profile
    • Portfolio
Re: Burguer stuff
« Reply #14 on: 2017-Jun-17 »
Your second suggestion is good, but it would also make the controls more complex.
Since it is going to be a crowded screen full of action, I´d want the controls to be extremely simple.
I might revert to the fall-through that I had before, I will leave this issue for later.

Added an enemy (just the action now) that will freeze a burger piece on contact.
The player will have to slooowly walk to its center to unfreeze it, stomps are reseted.
If something falls over a frozen piece, it shatters and you loose the piece.

Pretty much everything player, map and burger related is coded and working.
The idea is that a level has a time and if you run out or finish with the burgers, the whole thing colapses.

I want to award points for complete burgers (ye, at least 2 breads+meat) of the final platform a player is standing.
Should you not make at least a single one, the game is over.

Here a collapsing video...
<a href="http://www.youtube.com/watch?v=K77aFNs0GiY" target="_blank">http://www.youtube.com/watch?v=K77aFNs0GiY</a>