π
<-
Chat plein-écran
[^]

Age of CEmpires I

Assembleur, Axe, C/C++, ICE...

Re: Age of CEmpires I

Message non lude PT_ » 05 Jan 2017, 13:26

Ti64CLi++ a écrit:
PT_ a écrit:Uncompressed about 120kB :troll:
With compression, around 42kB or so, perfectly for an appvar ;)

120kB if uncompressed :#fou#:
How is it possible?

Ehm, I have a 255x100 sprite :troll:
Age of CEmpires I - In progress!
40%
Avatar de l’utilisateur
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Prochain niv.: 57.2%
 
Messages: 259
Inscription: 09 Fév 2016, 23:06
Genre: Homme
Calculatrice(s):
MyCalcs profile

Re: Age of CEmpires I

Message non lude PT_ » 05 Jan 2017, 13:48

Progress so far:

- Rendering of all the buildings is ready, I only need to add one thing, and that is when the building is entirely offscreen, it would skip the decompression + displaying part, to save speed.
- Resources (Wood, food, gold, stone) + population/max population at the top of the screen.

Image

The crash at the end only happened special for this screenshot.

Oh, and my lil' bro said the lumbercamp and the miningcamp are 2x2 tiles, so I need to change that.

EDIT:
Image
Age of CEmpires I - In progress!
40%
Avatar de l’utilisateur
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Prochain niv.: 57.2%
 
Messages: 259
Inscription: 09 Fév 2016, 23:06
Genre: Homme
Calculatrice(s):
MyCalcs profile

Re: Age of CEmpires I

Message non lude Ti64CLi++ » 05 Jan 2017, 17:58

I did a clash of clans like only in offline, about a month ago, but I abandoned :D
Good job PT_ :bj:
I wait the alpha ;)
Image
Avatar de l’utilisateur
Ti64CLi++Modo
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Prochain niv.: 32.3%
 
Messages: 3441
Images: 75
Inscription: 04 Juil 2014, 14:40
Localisation: Clermont-Ferrand 63
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: ENS Rennes
GitHub: Ti64CLi

Re: Age of CEmpires I

Message non lude Wistaro » 06 Jan 2017, 08:58

You should rename it to "Âge of Eripmec" to avoid copyright infringment ;)
Nouveau sur le site, Anonymous ? Avant de poster sur le chat et sur le forum, n'oublie pas de lire les règles. En cas de problème, tu peux m'envoyer un message, je réponds rapidement.

Liens utiles:
Image
Découvre mes programmes et mon site!
Avatar de l’utilisateur
WistaroSuper Modo
Niveau 15: CC (Chevalier des Calculatrices)
Niveau 15: CC (Chevalier des Calculatrices)
Prochain niv.: 88%
 
Messages: 3158
Images: 37
Inscription: 25 Fév 2013, 16:21
Localisation: Toulouse
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: Ingénieur en électronique
YouTube: Wistaro
Twitter/X: Wistaro
GitHub: Wistaro

Re: Age of CEmpires I

Message non lude PT_ » 07 Jan 2017, 16:54

Wistaro a écrit:You should rename it to "Âge of Eripmec" to avoid copyright infringment ;)

You are playing Oiram, right? :P I will try to find something about that copyright stuff ;)

The last screenshot I posted was about 2 FPS (it took 20 million clock cycles), but I made some changes which speeds it up. First of all, I've decreased all buildings to 50%, to see more buildings at the screen. This lifts the FPS up to about 9. Next, I heard Runer112 and Mateo are writing a new TransparentSprite routine, which could lead to an FPS of maybe 20 or even more. But while that routine is not available yet, TheMachine02 decided to write a special routine for me, which displays only the isometric tile, not the transparent corners. The unclipped version was about 7 times faster than the clipped TransparentSprite routine, but he needs to add clipping to it, so I don't know how much faster it would be. My last point is that I'm now going to write a routine to display only a part of the tilemap. My current routine is just 2 For-loops, but that is bad, because with large maps 90% of the tiles will be entirely offscreen, so if my routine just stops with drawing if the tiles are offscreen, I could save a lot of time, which lifts the FPS again up! :roll:
Age of CEmpires I - In progress!
40%
Avatar de l’utilisateur
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Prochain niv.: 57.2%
 
Messages: 259
Inscription: 09 Fév 2016, 23:06
Genre: Homme
Calculatrice(s):
MyCalcs profile

Re: Age of CEmpires I

Message non lude PT_ » 09 Jan 2017, 11:30

Good news: I found this thread: http://www.java-gaming.org/index.php?topic=24922.0 which explains pretty well how to draw only a part of the isometric tilemap, and hopefully it is enough to speed it up a lot :)
Age of CEmpires I - In progress!
40%
Avatar de l’utilisateur
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Prochain niv.: 57.2%
 
Messages: 259
Inscription: 09 Fév 2016, 23:06
Genre: Homme
Calculatrice(s):
MyCalcs profile

Re: Age of CEmpires I

Message non lude sautax » 12 Jan 2017, 14:22

Have you made it with the online project builder ?
Mes projets :
-Environnement numworks sur PC
-TILIB
-AGAME
Avatar de l’utilisateur
sautaxProgrammeur
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Prochain niv.: 21.6%
 
Messages: 65
Inscription: 21 Sep 2016, 14:31
Localisation: Quelque part dans le sud
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: Terminale S-SI
YouTube: sautax

Re: Age of CEmpires I

Message non lude PT_ » 12 Jan 2017, 14:22

sautax a écrit:Have you made it with the online project builder ?

No, as it is now writting in ASM ;)
Age of CEmpires I - In progress!
40%
Avatar de l’utilisateur
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Prochain niv.: 57.2%
 
Messages: 259
Inscription: 09 Fév 2016, 23:06
Genre: Homme
Calculatrice(s):
MyCalcs profile

Re: Age of CEmpires I

Message non lude PT_ » 25 Jan 2017, 19:48

'Long' time no update, I was pretty busy with exams and stuff, but I picked it up again, now that I have some more free time, and decided to implement the algorithm I already mentioned before. But the problem is that that algorithm doesn't work fine, and I don't know how to quickly solve it :(

The algorithm is basically like this:
Image

with this code:
Code: Tout sélectionner
{...}
        boolean nBump = false, mBump = false;
        int n = 1, nStart = 1, nBuffer = 1;
        int m = 1, mStart = 1, mBuffer = 1;

        for (int i = iStart; i < iMax; i++) {

            // Testing Purposes
            // Sleep 1 second each i iteration and paint the screen
            // TODO
            // .......


            for (int j = jStart - n; j < jStart + m; j++) {
                // paint the column
                colArray[ hWrap(i)][ vWrap(j)].paintAll(g);
            }
            // adjust m and n to keep us within the screen

            // adjust n
            if (!nBump) {
                //we have not yet reached the lowest j point
                // increment n to go even lower next iteration
                n++;
                // Check if we have reached the lowest j point
                if ((jStart - n) == jMin) {
                    nBump = true;
                    //System.out.println("Bump N");
                }
            } else {
                // we have reached the deepest j and are now going back
                // start decreasing after the buffer is gone
                if (nBuffer > 0) {
                    nBuffer--;
                } else {
                    // The buffer is gone, start decreasing n each iteration
                    n--;
                    // check that n never exceeds its starting point
                    if (n < nStart) {
                        n = nStart;
                    }
                }
            }

            // adjust m
            if (!mBump) {
                // we have not yet reached the HIGHEST j point
                // increasee m to go even higher next iteration
                m++;
                // Check if we have reached the highest j point
                if ((jStart + m) == jMax) {
                    mBump = true;
                    //System.out.println("Bump M");
                }
            } else {
                // we have reached the maximum j point
                // and are now moving back.
                // start decreasing m after the buffer is gone
                if (mBuffer > 0) {
                    mBuffer--;
                } else {
                    // The Buffer is gone
                    // decrease m each iteration
                    m--;
                    // check that m never exceeds its starting point
                    if (m < mStart) {
                        m = mStart;
                    }
                }
            }
        }
    }
}


But if I do almost the same steps in my own tilemap, I get this:
Image
(I assume now that the blue rectangle is the visible screen)

The orange line is how it should be, but the yellow line is the outcome of the algorithm.. Anybode that can help me out? :)

EDIT: 1 minute after posting, I got the solution... I need to change nBuffer to be not 1, but the amount of tiles that can fit horizontally in the screen... Sorry for disturbing you ;) :roll:
Age of CEmpires I - In progress!
40%
Avatar de l’utilisateur
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Prochain niv.: 57.2%
 
Messages: 259
Inscription: 09 Fév 2016, 23:06
Genre: Homme
Calculatrice(s):
MyCalcs profile

Re: Age of CEmpires I

Message non lude PT_ » 28 Jan 2017, 13:11

Got a non-working homescreen done! :D

Image

Total size of the images is around 15K.
Age of CEmpires I - In progress!
40%
Avatar de l’utilisateur
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Prochain niv.: 57.2%
 
Messages: 259
Inscription: 09 Fév 2016, 23:06
Genre: Homme
Calculatrice(s):
MyCalcs profile

PrécédenteSuivante

Retourner vers Langages alternatifs

Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 41 invités

-
Rechercher
-
Social TI-Planet
-
Sujets à la une
Comparaisons des meilleurs prix pour acheter sa calculatrice !
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
Phi NumWorks jailbreak
123
-
Faire un don / Premium
Pour plus de concours, de lots, de tests, nous aider à payer le serveur et les domaines...
Faire un don
Découvrez les avantages d'un compte donateur !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partenaires et pub
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
1434 utilisateurs:
>1381 invités
>47 membres
>6 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)
-
Autres sites intéressants
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)