Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: nikitouzz on April 13, 2014, 04:43:37 pm

Title: 2048 (with animations) !
Post by: nikitouzz on April 13, 2014, 04:43:37 pm

Hello everyone! :)


I finally finished my version of the 2048 with animations and everything that follows!


You can download and play (the game works better on 84 + 83 + ...) I'll optimize it but it is playable already!


good game!


ps: if someone finds a bug that prevents me!


ps2 : there exist a cheat code, good luck for found it :p


(http://i.imgur.com/niJRMMX.gif)










Download : http://tiplanet.org/forum/archives_voir.php?id=42889


Peace !
Title: Re: 2048 (with animations) !
Post by: annoyingcalc on April 13, 2014, 04:47:41 pm
Looks great! I think I'll download it.
Title: Re: 2048 (with animations) !
Post by: Sorunome on April 13, 2014, 04:52:40 pm
Nice! What did you write it in? Axe?
Title: Re: 2048 (with animations) !
Post by: Hayleia on April 13, 2014, 04:57:31 pm
Finally a 2048 clone with smooth animations. Great job :)
Title: Re: 2048 (with animations) !
Post by: Streetwalrus on April 13, 2014, 05:47:50 pm
Yup. Gonna download it tomorrow. :)
Title: Re: 2048 (with animations) !
Post by: Runer112 on April 13, 2014, 06:24:55 pm
Aww, I wanted to do this... But then again, I don't ever actually do anything, so probably good someone else did. :P
Title: Re: 2048 (with animations) !
Post by: nikitouzz on April 13, 2014, 06:43:13 pm
i'm more faster than you runer ! i think... definitively... i'm bettre than you in axe !

(joke joke lol)

Title: Re: 2048 (with animations) !
Post by: DJ Omnimaga on April 13, 2014, 07:33:41 pm
Ooh that looks great! I like how smooth it looks like with the animations :D
Title: Re: 2048 (with animations) !
Post by: JWinslow23 on April 13, 2014, 07:42:27 pm
Post the source? :o
Title: Re: 2048 (with animations) !
Post by: ClrDraw on April 13, 2014, 07:58:23 pm
Good job nikitouzz :) dang, you beat me to it! I'm downloading now, it looks fun.
Title: Re: 2048 (with animations) !
Post by: nikitouzz on April 14, 2014, 06:10:42 am
sorry i never posted the source of my programm... ^^
Title: Re: 2048 (with animations) !
Post by: JWinslow23 on April 14, 2014, 01:19:06 pm
Je voulais dire, vas-tu pour poster la code source? :P

Sérieusement, je suis coincé sur un mécanisme coulissant pour mon jeu de 2048, et je pourrais probablement utiliser le vôtre (j'ai besoin de votre permission d'abord, bien sûr ;) ).

Aussi, je tiens à signaler un bug, et donner une suggestion petite.

Il est possible d'appuyer sur une touche de direction et pas de tuiles se déplaceront. Lorsque cela se produit, une nouvelle tuile encore peut apparaître. Cela ne devrait pas se produire, cependant; il n'y avait aucune glissière, et la tuile ne doit pas apparaître.

La suggestion final est pour vos graphiques sur les tuiles, en particulier les tuiles 1024 et 2048. Les 0 et 8 graphiques sur le tuile 2048 sont exactement les mêmes; il ne semble pas naturelle. En outre, le 4 qui est sur les tuiles 1024 et 2048, à mon avis, ne ressemble pas du nombre 4 par toute effort d'imagination.

Ne vous inquiétez pas, cependant; votre jeu de 2048 est le meilleur que j'ai vu! Ces deux suggestions, ainsi que le fait que je ne sais pas comment dire "Perdu!" et "Gagne!" en anglais, sont mes seuls problèmes. Prenez mes suggestions à la légère; votre jeu est bon car il est.

Excusez-moi si mon français est mauvais; si c'est le cas, je blâme Google Translate. :P

Spoiler For English Translation:
I meant, are you ever going to post the source code? :P

Seriously, I've been stuck on a sliding mechanism for my port of 2048, and I could probably use yours (granted I get your permission first, of course ;) ).

Also, I want to report a bug, and give a small suggestion.

It is possible to press an arrow key while still having no tiles move. When this happens, a new tile may spawn. This shouldn't happen, however; no slide had happened, and so the tile should not yet spawn.

The last suggestion is for your tile graphics, specifically on the 1024 and 2048 tiles. The 0 and 8 graphics on the 2048 tile appear exactly the same; it looks unnatural. Also, the 4 on the 1024 and 2048 tiles, IMHO, doesn't look like a 4 by any stretch of the imagination.

Don't worry about it, though; your 2048 game is the best I've seen! Those two suggestions, as well as my not knowing how to say "Perdu!" and "Gagne!" in English, are my only problems. Take my suggestions with a grain of salt; your game is good as it is.

If there were translation errors, pardon my French (pun intended). I blame Google Translate. :P
Title: Re: 2048 (with animations) !
Post by: Streetwalrus on April 14, 2014, 01:22:05 pm
If there were translation errors, pardon my French (pun intended). I blame Google Translate. :P
There are tons of 'em. :trollface:
Also I didn't get the pun. ???
Title: Re: 2048 (with animations) !
Post by: JWinslow23 on April 14, 2014, 01:23:32 pm
If there were translation errors, pardon my French (pun intended). I blame Google Translate. :P
There are tons of 'em. :trollface:
Also I didn't get the pun. ???
1. Are there? Because if I took each paragraph separately in Google Translate, it translates about right. :P
2. Pardon my French? You don't get that? :P
Title: Re: 2048 (with animations) !
Post by: Streetwalrus on April 14, 2014, 01:39:43 pm
There are some indeed :
-La instead of le in the first paragraph.
-Votre instead of ton, vos/tes, vous/tu, that's like thou instead of you. :P
-Petite is better before suggestion than after, since it's more common that way.
-Pas de tuiles se déplaceront => aucune tuile ne se déplacera.
-Encore shouldn't be there.
-Il n'y avait pas de glissière => il n'a a pas eu de glissement.
-Suggestion finalE. A ton of French people make this mistake too. :P You don't have gender differences for objects though, that's why.
-Les 0 et 8 graphiques => les graphiques du 0 et du 8.
-ça ne semble pas naturel
-ne ressemble pas AU
-bon COMME il est
-graphismes is better than graphiques (actually the meanings are way different, graphique = graph (yes, the math thing)).

That's about it.
Gagné and Perdu mean Won and Lost.

And I got it now, pardon is a French word originally. :P
Title: Re: 2048 (with animations) !
Post by: JWinslow23 on April 14, 2014, 01:41:34 pm
There are some indeed :
-La instead of le in the first paragraph.
-Votre instead of ton, vos/tes, vous/tu, that's like thou instead of you. :P
-Petite is better before suggestion than after, since it's more common that way.
-Pas de tuiles se déplaceront => aucune tuile ne se déplacera.
-Encore shouldn't be there.
-Il n'y avait pas de glissière => il n'a a pas eu de glissement.
-Suggestion finalE. A ton of French people make this mistake too. :P You don't have gender differences for objects though, that's why.
-Les 0 et 8 graphiques => les graphiques du 0 et du 8.
-ça ne semble pas naturel
-ne ressemble pas AU
-bon COMME il est
-graphismes is better than graphiques (actually the meanings are way different, graphique = graph (yes, the math thing)).

That's about it.
Gagné and Perdu mean Won and Lost.

And I got it now, pardon is a French word originally. :P

No, people say "Pardon My French" if they swore. As in, cuss.

Look it up. :P
Title: Re: 2048 (with animations) !
Post by: Streetwalrus on April 14, 2014, 01:41:57 pm
Hmm okay.
Oh lol OK. This is better though. (http://www.urbandictionary.com/define.php?term=pardon+my+german) Sorry Soru, but I had to post it. :P
Title: Re: 2048 (with animations) !
Post by: nikitouzz on April 14, 2014, 01:49:42 pm
ok i'll correct all this bug tonight or tomorrow... i need some time !


anyway thanks for you suggestion :) i think that i go correcte the 1024 and 2048 graphique ! ^^


sorry for my english too :p




i don't remenber who have ask the questions but this game is very easy to programme ^^ but sorry i don"t post my source...
Title: Re: 2048 (with animations) !
Post by: Hayleia on April 14, 2014, 03:45:23 pm
Could you implement game saving ? Like, I quit the game then come back and I continue the previous game and don't have to start over ?
__

Tu pourrais implémenter la sauvegarde ? Genre je quitte, je reviens et je continue ma partie au lieu d'en recommencer une ?
Title: Re: 2048 (with animations) !
Post by: JWinslow23 on April 14, 2014, 04:18:11 pm
Could you implement game saving ? Like, I quit the game then come back and I continue the previous game and don't have to start over ?
__

Tu pourrais implémenter la sauvegarde ? Genre je quitte, je reviens et je continue ma partie au lieu d'en recommencer une ?
Your French is better than mine. :P

And I might put that in my port...if I had one. :/
I STILL need help with the basic SLIDING! :mad:
Can someone please help? None of my implementations are working! :/
Title: Re: 2048 (with animations) !
Post by: Hayleia on April 14, 2014, 04:39:51 pm
Your French is better than mine. :P
Well I am French, so... :P

And I might put that in my port...if I had one. :/
I STILL need help with the basic SLIDING! :mad:
Can someone please help? None of my implementations are working! :/
Are you talking about animations or "just" detecting where a tile should go and whether it should merge with another one ?
Title: Re: 2048 (with animations) !
Post by: JWinslow23 on April 14, 2014, 04:43:11 pm
Your French is better than mine. :P
Well I am French, so... :P

And I might put that in my port...if I had one. :/
I STILL need help with the basic SLIDING! :mad:
Can someone please help? None of my implementations are working! :/
Are you talking about animations or "just" detecting where a tile should go and whether it should merge with another one ?
I'm having trouble with the actual detection and sliding itself, not the animations. For some reason, all my slides either rotate the board or delete tiles (and don't actually merge, mind you). Help with a basic implementation?

I swear, I am trying SO hard.
Title: Re: 2048 (with animations) !
Post by: ClrDraw on April 14, 2014, 07:15:36 pm
Area you using a tilemap? How do you store what your tiles are on? I used the first 16 bytes of L1 to store the blocks.
Title: Re: 2048 (with animations) !
Post by: JWinslow23 on April 14, 2014, 07:41:45 pm
Area you using a tilemap? How do you store what your tiles are on? I used the first 16 bytes of L1 to store the blocks.
So do I. I store a 2 tile as 1, 4 as 2, 8 as 3, 16 as 4, etc.
Title: Re: 2048 (with animations) !
Post by: ClrDraw on April 15, 2014, 09:33:59 am
Same, and 0 is no block. The only problem is the animations aren't smooth like nikitouzz's version :/
Title: Re: 2048 (with animations) !
Post by: JWinslow23 on April 15, 2014, 10:11:19 am
Same, and 0 is no block. The only problem is the animations aren't smooth like nikitouzz's version :/
Well, help? :/

The first person to help me will have first access to the game prototypes and all other of my games afterwards.

(Except you, Hayleia. You got that privilege already. :P)
Title: Re: 2048 (with animations) !
Post by: nikitouzz on April 15, 2014, 01:42:57 pm
pour faire court, j'ai codé que le deplacement vers le bas... ca evite d'en coder trois ! ;)


for short, I coded the displacement down ... it avoids to encode three! ;)
Title: Re: 2048 (with animations) !
Post by: Streetwalrus on April 15, 2014, 04:08:39 pm
Clearer explanation : He coded movement only one way and rotates the board to make the other moves.

C'est bien ça hein, tu tournes le plateau ? :P
Title: Re: 2048 (with animations) !
Post by: Hayleia on April 16, 2014, 12:55:01 am
Bug report !
I had on the bottom row, in that order, 2, 8, 256, nothing, and when I pressed right, I had nothing, nothing, 2, 8 and the 256 was offboard.
I don't remember what I had on the other rows though.

J'avais dans cet ordre là sur la dernière ligne, 2, 8, 256, rien, et quand j'ai appuyé sur droite j'ai obtenu rien, rien, 2, 8, et le 256 était à côté du plateau.
Je ne me souviens plus de ce que j'avais sur les autres lignes par contre.

Well, help? :/
I'd say that you should just try to make something really stupid, not something geniusly optimized fast and small.. Like a If for each directionnal key and 4 times "the same" code. Then, you'll optimize that if you want.
Let's take the left key as an example. What you do is go through your board from left to right, and move the tiles you encounter to the left if they can move. I'd suggest you actually have two boards, one being the board before the movement, and the other one being the board after the movement (and then you store the "after" in the "main").
Same for the right key, except that you go through your board from right to left this time, and you move your tiles to the right, obviously.
Title: Re: 2048 (with animations) !
Post by: JWinslow23 on April 16, 2014, 09:56:10 am
Bug report !
I had on the bottom row, in that order, 2, 8, 256, nothing, and when I pressed right, I had nothing, nothing, 2, 8 and the 256 was offboard.
I don't remember what I had on the other rows though.

J'avais dans cet ordre là sur la dernière ligne, 2, 8, 256, rien, et quand j'ai appuyé sur droite j'ai obtenu rien, rien, 2, 8, et le 256 était à côté du plateau.
Je ne me souviens plus de ce que j'avais sur les autres lignes par contre.

Well, help? :/
I'd say that you should just try to make something really stupid, not something geniusly optimized fast and small.. Like a If for each directionnal key and 4 times "the same" code. Then, you'll optimize that if you want.
Let's take the left key as an example. What you do is go through your board from left to right, and move the tiles you encounter to the left if they can move. I'd suggest you actually have two boards, one being the board before the movement, and the other one being the board after the movement (and then you store the "after" in the "main").
Same for the right key, except that you go through your board from right to left this time, and you move your tiles to the right, obviously.
Having two boards...I never thought of that...that could help later, too, with animations (possibly)... ^-^
Title: Re: 2048 (with animations) !
Post by: nikitouzz on April 25, 2014, 02:24:21 pm
UPDATE :

I've make another version of my game 2048 ! with different graphic and different option !

NEW :

-When you quit the game, the game have saved ;)  :#top#:
-You can restart when you want :)
-the graphics are better
-some bug have corrected !


But... i need correct some bug... but this version is playable :) there exist juste a bug that i can't find the solution...

Good game !


(http://i.imgur.com/y5zAPiu.gif)


Download link : http://tiplanet.org/forum/archives_voir.php?id=42889
Title: Re: 2048 (with animations) !
Post by: TheMachine02 on April 25, 2014, 02:27:57 pm
it is me gameover screen is flashing  O.O
 
Btw, great update.
Title: Re: 2048 (with animations) !
Post by: nikitouzz on April 25, 2014, 02:32:22 pm
it's wabbitemu, not the game !
Title: Re: 2048 (with animations) !
Post by: JWinslow23 on April 25, 2014, 09:53:05 pm
O.O

Before the update, I wanted to report a bug in your program where, if you edit saveSScreen (L1 in Axe) in a certain way (I don't know exactly how, but running Fill(L1,17,1) is known to work), some blocks may slide off of the play area. Here is a screenshot (Axe doesn't work in my Wabbitemu, so instead, I made the program and compiled it on my calculator and transferred it to the computer):

(http://img.ourl.ca/2048BugNikitouzz.gif)

However, I see that you updated your game, and it doesn't happen anymore with your version. :/ Consider this a warning for people who haven't upgraded.
Title: Re: 2048 (with animations) !
Post by: Sorunome on April 26, 2014, 03:57:30 am
Looking nice again niki :D
Title: Re: 2048 (with animations) !
Post by: Hayleia on April 26, 2014, 05:26:06 am
O.O

Before the update, I wanted to report a bug in your program where, if you edit saveSScreen (L1 in Axe) in a certain way (I don't know exactly how, but running Fill(L1,17,1) is known to work), some blocks may slide off of the play area. Here is a screenshot (Axe doesn't work in my Wabbitemu, so instead, I made the program and compiled it on my calculator and transferred it to the computer):

(http://img.ourl.ca/2048BugNikitouzz.gif)

However, I see that you updated your game, and it doesn't happen anymore with your version. :/ Consider this a warning for people who haven't upgraded.
I had already reported it here http://www.omnimaga.org/ti-z80-calculator-projects/2048-%28with-animations%29-!/msg381313/#msg381313

And I agree, nice update :)
Title: Re: 2048 (with animations) !
Post by: JWinslow23 on April 26, 2014, 12:45:44 pm
I had already reported it here http://www.omnimaga.org/ti-z80-calculator-projects/2048-%28with-animations%29-!/msg381313/#msg381313 (http://www.omnimaga.org/ti-z80-calculator-projects/2048-%28with-animations%29-!/msg381313/#msg381313)
Well, at least I knew a possible way to trigger it. :P
Title: Re: 2048 (with animations) !
Post by: Streetwalrus on April 28, 2014, 02:56:58 pm
Axe doesn't work in my Wabbitemu, so instead, I made the program and compiled it on my calculator and transferred it to the computer.
That's probably because you didn't dump the ROM from your calc but used the "Open source software" option.
Title: Re: 2048 (with animations) !
Post by: nikitouzz on April 29, 2014, 08:39:39 am
the hight score bug... i need correcte it !
Title: Re: 2048 (with animations) !
Post by: JWinslow23 on May 01, 2014, 06:12:52 pm
Axe doesn't work in my Wabbitemu, so instead, I made the program and compiled it on my calculator and transferred it to the computer.
That's probably because you didn't dump the ROM from your calc but used the "Open source software" option.
I DID dump it from my calc. :P I just had to patch the OS before being able to put it on my calculator (that's why the check triggered by MODE + ALPHA + S always fails). I dunno if it's you can't downgrade or what, but it's a bit modified from the original to get it to work.
Title: Re: 2048 (with animations) !
Post by: Streetwalrus on May 02, 2014, 01:11:44 am
Oh, you have a bootcode 1.03 calc. D:
Title: Re: 2048 (with animations) !
Post by: DJ Omnimaga on May 02, 2014, 01:16:02 am
Glad you added a save feature. I liked that in Kerm's color 2048 clone. :D