Oui, c'est officiel ! Je pensais que nous avions besoin d'un peu de compétition dans la catégorie ASM grin, alors je vous présente un jeu que j'ai commencé à écrire il y a quelques jours (mais auquel j'ai pensé presque dix ans) et que vous tous sûrement connaissez: Monopoly! Maintenant on ne peut pas faire grand-chose et il me reste beaucoup a faire, à vrai dire je ne sais pas même si je le terminerai, mais le voici, ce qui peut-être sera une version graphique du célèbre jeu, pour votre TI !

So a few days ago i started working on a little project of mine that i've had for almost a decade now: Monopoly for the TI. I decided that my old code, apart from being completely lost with the RevSoft forums going down, was completely unorganized and ugly and too difficult to work with. Thus, i've started anew, this time trying to organize things a bit better. I'm not sure if i'll actually finish it or not, but i figured we could use a little healthy competition in the ASM category smile

I'll try to put up some screenshots later tonight.


I've already seen some screenies on another website and I would say it's simply incredible.

Good luck with this project smile


Thanks, i've got an updated screenshot with some of the new features i've added in, namely the random routine for the dice (which turned out to be a bit more complicated than i thought, 'cuz only values 1-6 are useful), the text routine is finally functional (because of the way the map scrolling is handled, i can't use TI's text routines), and also snapped together a simple binary to decimal routine which you can see as the dice numbers in the upper left corner wink. You can also move the map to see other parts of the board, though currently my sprite drawing routine doesn't handle sprites drawn offscreen, hence sometimes the hat is drawn in the middle of nowhere.


tromb Fichier joint : Monopoly.zip (Source code/developing environment, .8xp file)


Really incredible !

I will look into your code to learn some tips and new things tomorow.

Keep the good work !!


Ah, on en manquait en ASM !
Celui de zero44 était pas mal aussi,à toi de faire mieux ! wink


Merci, noelthebest ! Je ne connais pas ce jeu de zero44, tu as un lien ou quelque chose où je peux y jeter un coup d'oeuil ? Je savais qu'il y avait une version (en asm) à ticalc mais elle n'est pas très graphique et d'ailleurs je ne sais pas s'il a de l'IA smile


Je pense qu'il veut parler de ce jeu :

C'est en tibasic pas asm z80...
Mais c'est vraiment beau malgré tout smile


C'est bien ça.
Les graphismes sont petis, mais à ans faire un tel prog' faut le faire comme même. wink


Ah merci Contra, il est assez nouveau alors ! Moi je parlais de ceci:

Je vais jouer avec les deux à voir s'il y a des choses que je veux copier (ou que je n'aimerais pas faire wink).


C'est quoi ça :
scf \ rr d \ rr e \ rra \ djnz $-6

et ça :
dec b \ inc b \ jr z,skipMaskClip scf \ rr d \ rr e \ rra \ djnz $-6 ;rotate mask

Surtout les djnz $-6 ??

tripo trifus


Ahh... le $ signifie l'octet actuel dans notre code, alors avec $ - 6 nous sautons en arrière 6 octets, c'est à dire a le scf, on peut le voir comme ci:
9327h: scf     ;1 octet
9328h: rr d    ;2 octets
9330h: rr e    ;2 octets
9332h: rra     ;1 octets
9333h: djnz $-6 
On l'utilise au lieu d'un label. Tu pourrais aussi bien faire:
scf \ rr d \ rr e \ rra \ djnz boucle
C'est le même. Mais il faut noter quelque chose: si tu veux sauter en avant, il faudra ajouter la taille de la commande.
9327h: or a
9328h: jr z,$+2
9330h: inc a
9331h: inc a
Ici, si a=0, nous sauterons au premier "inc a" car la commande "jr" prend 2 octets. Donc si nous voulons sauter les deux "inc a", il faudra "jr z,$+4". Moi, je l'utilise parce que ainsi mon code est plus "propre", quelquefois le code est encombré de labels et il est assez difficile à lire (ou tout simplement je ne veux pas inventer de nom pour le label :P).

"scf" signifie "set carry flag". d = premier octet du masque, e = le second, a = $FF, b = l'offset (décalage?) X. Le masque normalement prend deux octets, mais si le sprite n'est pas aligné, il en faudra un troisième. Un exemple peut-être éclaircira les choses:
Notre masque:
si le offset = 5, nous aurons comme valeur de DEA (d, e et a):
%11111111,%00110 001,%10111111

Je ne sais pas si je l'ai bien expliqué, mais il est assez tard et je devrais vraiment me coucher. Si tu as plus de questions, n'hésite pas à me les poser wink

EDIT: Ah, et les "rr" sont des commandes pour le décalage d'un registre, ici pour décaler à droite/mettre le carry au bit 7 (le plus à gauche). rra est une commande spéciale, elle fait la même chose que les autres mais est plus petite (1 octet vs 2) et plus rapide (4 t-states vs 7). Jette un coup d'oeuil au z80 instruction set du 28 days tuto smile


The screenshot looks nice!
go on! smile


Thanks, i haven't had any time this week but this weekend and next week should be less busy smile


O.O Wow, that looks nice O.O Great job!


So i squeezed in a couple hours this morning and after a LOT of typing in street names and renaming all my labels, the text routine is closer to being finished:

Btw, all the property names are entered, but the ones that aren't normal properties (chance, community chest, the utilities and railroads, etc.) currently aren't handled, as they will be handled differently from normal properties (properties you can build on). Also, the two numbers you see are the two numbers rolled, not the total of the two numbers (like in the first screenshot). So 12=1 and 2, 33= 3 and 3, etc.

What do you all think of the text boxes? Que pensez-vous des boîte à textes?

J'ai aussi passé du temps à mieux commenter mon code et à traduire les commentaires espagnols en anglais.
Monopoly.zip (code source: 19 Nov. 2011)

Next up: maybe the chance routine? Also, i'm not really sure how to go about the main menu.


Wow, very cool! And the Text boxes are pretty :3


Haha very nice.

The graphics are pretty cool, nice job smile

I will study your code as soon as I can. I have a lot of stuff to learn from your code smile

My screenie :



Thanks Contra smile I've been working on documenting it better (well, yesterday, today i haven't done anything...yet) and also wrote the Chance/Community Chest routine. Oh, and due to popular demand, i've been rewriting/redrawing some of the letters in the alphabet. Tonight i'll upload the latest source. Oh, and maybe the most exciting part (for me), yesterday i started drawing some of the pieces to start coding in the multiplayer functionality.


How I can build on a house on a compartment?
Is it already possible?

I've tried some different keypress and I can't find how to do that...


I haven't implemented the houses yet, just now i'm writing in the money system and soon the property purchase system. I'm also write up the multiplayer code. So far, the only keys that do anything are:
Clear - quit
2nd - accept, roll dice, etc.
Alpha - hold + arrow keys to move the map


I haven't tried Alpha+ arrow but I will.

In anyway, nice job really smile


Thanks, Contra! Voici le code source que j'avais promis pour ce soir:

Also, multiple players are now implemented. In this screenshot, the other player doesn't do anything because i didn't switch over, but you can see that player 1 walks around the board and player 2 keeps their own coordinates/ship/etc. Btw, the only reason i finished this tonight is because i didn't want to upload my half-broken source :P

You can also see some of the new font, the letters with a "tail" (p,g,y,q, and j) are drawn one pixel lower than the other letters. A few people have mentioned that the lowercase a looks a little weird (personally, it's one of my favorite letters), so i might change that sometime soon. However, i didn't realize that the contest ended so soon so all the little things i was looking at may have to wait to start work on bigger more important things (like buying property).


So i haven't had the chance to work on Monpoly again until today, so i don't have much progress and i'm not sure if i'll have it done by the deadline, but i'll definitely try! New screenshot showcasing the two players and property data:


The buying of properties and a few other new things have been implemented:

EDIT: Voici le code source actuel: Monopoly.7z - code source


Malheureusement, je ne pense pas que je pourrai terminer Monopoly avant la fin du concours. Il ne reste pas beaucoup à faire pour qu'on puisse le jouer avec un(e) ami(e), mais pour pouvoir terminer tout il m'aurait fallu plus de trois semaines wink Bonne chance à tous les autres concurrents !


You can still submit the program, though, right? And you will still try to finish this, right (even if it isn't finished for the competition)?
D: Tu peux presenter la programme, oui? Et tu termineras le jeu, oui?


It looks great! Hoping you can finish this on time smile I love the font, by the way. And smooth-scrolling is always nice. Have you thought about a sort of "swing" motion for scrolling (as in not entirely linear)? Might be hard to implement in assembly though. Great-looking port all around.


Thanks you two smile

Here's the latest screenshot as of last night:

The text routine is currently a little broken because i rearranged how the text is structured and haven't finished updating all the old texts (how it's arranged now should make it easier to update/handle in the future).

Deep thought: i like that suggestion, right now it's not a priority but it'd definitely look a lot prettier!


It's so pretty D:
Great job with it!


Thanks, i tried uploading it to tiforge but it says there's already a final file uploaded. If anyone's interested, here's the file with a very short readme/lisez-moi wink
tromb Fichier joint : Monopoly demo.7z