YesNoOk
avatar

Tetris (Read 4800 times)

Started by Bea, June 24, 2013, 04:58:47 pm
Share this topic:

Bea

Tetris
#1  June 24, 2013, 04:58:47 pm
  • *****
  • MUGEN Grandma
    • Brazil
    • www.smeenet.org
Yesterday night, in the middle of my drunken absinthe stupor, Odin Allfather appeared to me (it was either Odin Allfather or Hannibal Lecter, because he looked like Anthony Hopkins) and gave me a mighty mission.
I was to delay the daemons of Ragnarök by correcting a grave mistake and thus, creating a powerful weapon.
"It is unacceptable that no Mugen port of Tetris exist. It is thee mission, Beatrice, daughter of Adolf, to create such port.", said Odin before vanishing in a poof of green mist.

Well, either I was too drunk or that really happened, but anyway, I now must come back from my retirement to deliver what Mugen lacks.
A playable Tetris port.

So today I started working on this project by creating a renderer with Mugen script to render the playfield:





It stores the playfield in an array of variables, using var(0) to var(21) to store the 22 lines with a bitmask.
I then have 1024 animations that store the 1024 possible permutations of the pieces in the 10 slots.
The renderer iterate through that array and draws the appropriate line in the screen using an explod.

While I'd love to use colours, the number of permutations would be entirely too big to handle (I doubt Mugen can handle billions of sprites and animations...)

Next step is working on rendering and controlling the shapes in the playfield and then game logic.
I should have this finished in about two weeks, if that much.
Princess Adora: "My friend saw She-Ra take her dress off in the shower. She said she has an 8 pack. She said She-Ra is shredded."

SF2NES is dead. Long live SF2NES.
Re: Tetris
#2  June 24, 2013, 05:07:47 pm
  • ******
  • 日本は素晴らしい国です。
What is this, i dont even
Re: Tetris
#3  June 24, 2013, 05:08:28 pm
  • ******
  • Limited time to use Infinite power !
    • France
    • network.mugenguild.com/cybaster/
:stare:
You mad!!!

So, how do you plan to make this work ? P1 plays a game of tetris while P2 moves in the BG hitting thin air, or can P2 destroys blocks somehow ?
Or does creating a line or more hurts P2 until you kill him (or you get killed by reaching the top of the screen) ?
Will the difficulty in Mugen 1.0 affect the speed at which blocks fall ?

What's planned next, a game of pong ? :P
Re: Tetris
#4  June 24, 2013, 05:13:03 pm
  • ******
  • JoJo is boring
    • USA
No reflection?  :P
Re: Tetris
#5  June 24, 2013, 05:14:15 pm
  • ****
  • a.k.a DuckSS
    • https://synckmugencentral667.000webhostapp.com/

What's planned next, a game of pong ? :P

that would be nice :P

anyway bea I wish you good luck with this project,but I have sugestions to you:
-well create falling block,that p1 be able to move on ground(just like in tetris,spelling the line)
-set line limiter like 30 lines and round is over
-when is lines to upper level of stage "GAME OVER" or end of battle and p1 wins (in other way)
-destroying blocks can be able(but that can be wast of time :P)

so do my ideas great?
Re: Tetris
#6  June 24, 2013, 05:15:30 pm
  • ****
  • stillRetired.
  • Formerly Known As Genesis
    • USA
    • www.mediafire.com/folder/7j1slkpa7lm0w/Public_Works
Re: Tetris
#7  June 24, 2013, 05:25:05 pm
  • avatar
  • ******
    • Germany
    • www.game-art-hq.com
Looks like something promising :)

Also, all hail Odin!

Bea

Re: Tetris
#8  June 24, 2013, 06:01:06 pm
  • *****
  • MUGEN Grandma
    • Brazil
    • www.smeenet.org
I will capture the P2 at the start of the round and have him sit there like a ghost.
This is a game of Tetris, not a fighter. >:C
I am planning to have your total score to be the damage you deal to the opponent when you hit a Tetris game over condition.
So, if you deal enough damage at that point, you win the round. Otherwise you lose.

And yes, if the triggers allow me, the difficulty will determine the start dropping speed of the pieces.

And also yes, I am mad. And no, no pong. It wouldn't be challenging enough to spark my interest.
I only took on Odin's mission because this will be tough to code. Otherwise I wouldn't have bothered.

Finally, it has no reflection because I am using explods to draw the playfield. :P
Princess Adora: "My friend saw She-Ra take her dress off in the shower. She said she has an 8 pack. She said She-Ra is shredded."

SF2NES is dead. Long live SF2NES.
Last Edit: June 24, 2013, 06:06:05 pm by Bea

2OS

Re: Tetris
#9  June 24, 2013, 07:35:57 pm
  • ****
  • 608 Wannabe
  • Ich schicke dich zur HOELLE!! STIRB DU FEIGLING!!
    • Egypt
I will capture the P2 at the start of the round and have him sit there like a ghost.

you're not going to be able to do that to every character.

if the triggers allow me, the difficulty will determine the start dropping speed of the pieces.

they will allow you. why wouldnt they.

Finally, it has no reflection because I am using explods to draw the playfield. :P

shadow=r,g,b


i've been playing tetris a lot lately what irony.

Bea

Re: Tetris
#10  June 24, 2013, 07:47:35 pm
  • *****
  • MUGEN Grandma
    • Brazil
    • www.smeenet.org
you're not going to be able to do that to every character.

If I can't, it won't be an issue. It is not like the blocks will have collision boxes to be hit.

they will allow you. why wouldnt they.

I never used those triggers. By default, I assume everything is as unreliable as the Mugen math library.

shadow=r,g,b


i've been playing tetris a lot lately what irony.

Given that I am going to give the play field a frame, what would be the point of having shadows for the blocks?
Princess Adora: "My friend saw She-Ra take her dress off in the shower. She said she has an 8 pack. She said She-Ra is shredded."

SF2NES is dead. Long live SF2NES.
Re: Tetris
#11  June 24, 2013, 10:30:44 pm
  • *****
  • Resident Tosspot
  • Pftheh
    • UK
    • plasmoidthunder.neocities.org

Oh, I want a diagram. I fucking love diagrams.
Re: Tetris
#12  June 24, 2013, 10:56:49 pm
  • ****
    • USA
    • twitter.com/inktrebuchet
This is an awesome project! Can't wait to see how it all works out.
Re: Tetris
#13  June 25, 2013, 03:39:16 am
  • ******
  • Video Game Veteran
  • Can you do it? SUREYOUCAN!
    • USA
    • gcnmario.free.fr
This will be one interesting project. I've seen an actual Tetris game done in Mugen before. I hope this will be as good as your experiments and theories are on this. :)

"You must defeat my flaming
dragon punch to stand a chance."

Bea

Re: Tetris
#14  June 25, 2013, 04:09:30 am
  • *****
  • MUGEN Grandma
    • Brazil
    • www.smeenet.org


960 lines of code later, I don't have that much to show.
For some odd reason, the collision code is failing to tell Tetris to spawn the next piece when the condition for that arises.
I will look at it tomorrow.

Expect much cursing, screaming and frustration through the course of this project. Mugen doesn't have the tools for making it.
But it will be done nonetheless.
Princess Adora: "My friend saw She-Ra take her dress off in the shower. She said she has an 8 pack. She said She-Ra is shredded."

SF2NES is dead. Long live SF2NES.
Re: Tetris
#15  June 25, 2013, 05:43:06 am
  • ******
  • Video Game Veteran
  • Can you do it? SUREYOUCAN!
    • USA
    • gcnmario.free.fr
This is why I don't code action platformers in Mugen. Collision is terrible in this. MUGEN's collision data is only good fro Fighting games as they were meant to be. ;)

"You must defeat my flaming
dragon punch to stand a chance."

Bea

Re: Tetris
#16  June 25, 2013, 12:31:36 pm
  • *****
  • MUGEN Grandma
    • Brazil
    • www.smeenet.org
That is why I discarded it from the beginning.
I am using a 10x22 matrix to control the play field, and logical bit operations (and, or, xor) to make the piece move in it.

Collision code is partially functional, as that piece stopped when it reached line zero, but I will need to determine why the flag to spawn the next piece wasn't set properly.
I guess I will have something more complex working tonight.
Princess Adora: "My friend saw She-Ra take her dress off in the shower. She said she has an 8 pack. She said She-Ra is shredded."

SF2NES is dead. Long live SF2NES.
Re: Tetris
#17  June 25, 2013, 12:47:45 pm
  • *****
  • [The Destroyer]
  • College Life is Killing Me
    • USA
    • Skype - wattawright
    • mugencoder.com/authors/view/watta
:stare:

I didn't know this was even possible....

Just a question but is kfm a part of the tetris character or is that just the p2 standing there? Watched the vid