Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Chockosta

Pages: 1 ... 27 28 [29] 30 31
421
TI Z80 / Re: AXLE - 2011 Axe Platformer Contest
« on: June 19, 2011, 02:08:10 pm »
Couldn't you just archive your programs to free up some RAM, or do you not have the archive space?
The 10 KB were my remaining archive space... My RAM is empty because of all my RAM clears :D.

Well, once again, good luck. At the end of the contest, that will be the first game that I'll try :)


422
TI-Nspire / Re: [Lua] Bobby Carrot
« on: June 19, 2011, 01:21:21 pm »
Thanks for the comments !
For the rabbit, I can't make his movement "smooth". It would become too slow.
I could make him looking into the direction where he's walking (I don't know how to say it better :D ), but I'd have to add 3 sprites. The tns file is already 34 KB heavy. Adding these 3 big sprites would make it ~50 KB heavy. Is it too much or not ?

423
TI-Nspire / Re: [Lua] Bobby Carrot
« on: June 19, 2011, 10:44:25 am »
Beta version of the game !
You can try the 10 first levels (good luck for level 10).

I didn't add a readme, so here are the controls :
arrows : control Bobby / select the level
escape : quit the current level
enter : select the level.
There are  6 kinds of blocks :
-bush : it blocks you.
-rotating pipes : they rotate 90° clockwise each time you go on them.
-buttons : if you push them, all the pipes rotate.
-spikes : you can walk on them only once.
-carrots : eat them all !
-target : when you have eaten all the carrots, go on the target in order to complete the level.

You can see a video of the level 8 here

If someone could make some maps, It would be very nice :). It's pretty hard to do a good level...

424
News / Re: Juju2143 and Netham45 becomes managers
« on: June 19, 2011, 10:22:44 am »
Good luck, enjoy your new power !
And too bad for the decreasing activity of DJ_O...

425
TI-Nspire / Re: [Lua] Bobby Carrot
« on: June 18, 2011, 01:01:47 pm »
Yeah, but I have OS 2.0.1 on my calc. (I love oslauncher !)

I finished the level creator (beta).
I attach it in the first post. You can try it if you already know the game...
There's a readme in the ZIP file
For the ones who like C code, I post the code here :
Code: [Select]
#include <SDL.h>
#include <SDL_image.h>
#include <stdio.h>
#include <stdlib.h>

typedef struct
{
    uint8_t quit;
    uint8_t clic;
    uint8_t key[SDLK_LAST];
    SDL_Rect mouse;
} eventsManager;

void updateEvents(eventsManager *evts)
{
    SDL_Event event;
    while (SDL_PollEvent(&event))
    {
        switch (event.type)
        {
            case SDL_KEYDOWN:
                evts->key [event.key.keysym.sym] = 1;
                break;
            case SDL_KEYUP:
                evts->key [event.key.keysym.sym] = 0;
                break;
            case SDL_QUIT:
                evts->quit=1;
                break;
            case SDL_MOUSEBUTTONDOWN:
                evts->clic=1;
                break;
            case SDL_MOUSEBUTTONUP:
                evts->clic=0;
                break;
            case SDL_MOUSEMOTION:
                evts->mouse.x=event.motion.x;
                evts->mouse.y=event.motion.y;
                break;
            default:
                break;
        }
    }
}

int main(int argc, char **argv)
{
    int width,height,startx,starty,i;
    int current=2;
    char title[100];
    char str[100];

    FILE *filein = fopen("in.txt","r");
    fscanf(filein,"%d %d %d %d",&width,&height,&startx,&starty);
    fclose(filein);

    if (width>40)
        width=40;
    if (width<10)
        width=10;
    if (height>20)
        height=20;
    if (height<7)
        height=7;

    sprintf(title, "Bobby Carrot Level Creator - %d x %d - start : %d;%d",width,height,startx,starty);
    uint8_t *array=malloc(width*height*sizeof(uint8_t));
    memset(array,2,width*height*sizeof(uint8_t));


    //vars
    SDL_Surface *window = NULL;
    SDL_Surface *toolbar = NULL;
    SDL_Surface* sprites[14];
    SDL_Rect postb = {0,0};
    SDL_Rect posblit;
    uint8_t end=0;
    unsigned int ellapsed, time;

    //SDL routines
    eventsManager events;
    memset(&events, 0, sizeof(eventsManager));
    SDL_Init(SDL_INIT_VIDEO|SDL_INIT_TIMER);
    window=SDL_SetVideoMode(width*30,height*30+30,32,SDL_HWSURFACE|SDL_DOUBLEBUF);
    SDL_WM_SetCaption(title,NULL);

    toolbar=IMG_Load("toolbar.jpg");
    for (i=0;i<14;i++)
    {
        sprintf(str,"Sprites/Bobby-%d.gif",i+1);
        sprites[i]=IMG_Load(str);
    }

    //render loop
    while (!end)
    {
        //FPS management
        time=SDL_GetTicks();
        //Events management
        updateEvents(&events);

        if (events.quit||events.key[SDLK_ESCAPE])
            end=1;
        if (events.key[SDLK_a])
            current=1;
        if (events.key[SDLK_z])
            current=2;
        if (events.key[SDLK_e])
            current=3;
        if (events.key[SDLK_r])
            current=4;
        if (events.key[SDLK_t])
            current=5;
        if (events.key[SDLK_y])
            current=6;
        if (events.key[SDLK_u])
            current=7;
        if (events.key[SDLK_i])
            current=8;
        if (events.key[SDLK_o])
            current=9;
        if (events.key[SDLK_p])
            current=10;
        if (events.key[SDLK_q])
            current=11;
        if (events.key[SDLK_s])
            current=12;
        if (events.key[SDLK_d])
            current=13;
        if (events.key[SDLK_f])
            current=14;

        if (events.mouse.y>30 && events.clic)
        {
            if (current==14)
                array[(events.mouse.y-30)/30*width+events.mouse.x/30]=0;
            else
                array[(events.mouse.y-30)/30*width+events.mouse.x/30]=current;
        }

        SDL_FillRect(window, NULL, SDL_MapRGB(window->format, 180, 115, 53));
        for(i=0;i<width*height;i++)
        {
            if (array[i]!=0)
            {
                posblit.x=(i%width)*30;
                posblit.y=(i/width)*30+30;
                SDL_BlitSurface(sprites[array[i]-1],NULL,window,&posblit);
            }
        }

        SDL_BlitSurface(sprites[current-1],NULL,window,&events.mouse);
        SDL_BlitSurface(toolbar,NULL,window,&postb);
        SDL_Flip(window);

        //50 FPS
        ellapsed = SDL_GetTicks() - time;
if (ellapsed < 20)
SDL_Delay (20 - ellapsed);
    }

    filein=fopen("out.txt","w+");
    fprintf(filein,"{%d,%d,%d,%d",width,height,startx,starty);
    for (i=0;i<width*height;i++)
    {
        fprintf(filein,",%d",array[i]);
    }
    fprintf(filein,"}");
    fclose(filein);

    //Free
    free(array);
    SDL_FreeSurface(window);
    SDL_FreeSurface(toolbar);
    for (i=0;i<14;i++)
    {
        SDL_FreeSurface(sprites[i]);
    }
    SDL_Quit();
    return 0;
}

426
TI-Nspire / Re: [Lua] Bobby Carrot
« on: June 18, 2011, 09:36:32 am »
Well this could be a good idea, but if I did that, the sprites won't be "mappable" (I really don't know the word)
I'll try that.

427
TI-Nspire / Re: [Lua] Bobby Carrot
« on: June 18, 2011, 09:26:51 am »
He's not animated yet, but I hope I'll can do it.

428
TI-Nspire / [Lua] Bobby Carrot
« on: June 18, 2011, 09:20:50 am »
Hi everybody !
I introduce here my second project in Lua (after my space invaders) : Bobby Carrot.
It's a mobile game which I try to port to the Nspire.
It's a puzzle game about a little rabbit who has to eat all the carrots of each level.
I made the menu, the sprites, the level displaying and the scrolling. It remains the tiles actions and 48 levels :)
(I'm going to do a level creator in C)

First, it was going to be my contest entry. But my free version of Nspire student software expires in 18 days, so I give up (I'll have to ask someone to make the .tns for me, and I can't share the code if it's a contest entry)...  :'(

The level creator is attached, if you know the game, try it. There's a readme in the ZIP file.

429
TI Z80 / Re: AXLE - 2011 Axe Platformer Contest
« on: June 17, 2011, 04:52:47 am »
Sure, but I have a 83+, and all with my progs, it remains ~10 KB

430
TI-Nspire / Re: (Possible) Nspire Contest Entry
« on: June 17, 2011, 04:36:52 am »
Good luck !
The idea isn't really a revolution, but I think that it will look good (first RPG in Lua !)

431
TI Z80 / Re: AXLE - 2011 Axe Platformer Contest
« on: June 17, 2011, 03:52:30 am »
This looks so awesome !
But... 9 KB ? Too bad, I won't keep that game on my calc (I'll just try it).

432
[FR] Hors-Sujet / Re: Un RickRoll à la française?
« on: June 15, 2011, 02:33:56 pm »
Arrête de te dégrader :)
Chacun ses gouts, hein. La chanson de Rick n'est pas atroce, c'est sûr. Il y a pire, prenez n'importe quel chanteur français (je blague, il y en a sûrement des bons, même si je déteste les chansons en français)
Perso, j'écoute plutôt du rock, mais j'aime bien les 90's

433
News / Re: Contest Part 2 starts: TI-Nspire Game
« on: June 15, 2011, 02:27:37 pm »
Maybe I'll try...
I'm not a really good programmer. (I usually do a lot of games, but all my games are really simple)

434
TI-Nspire / Re: [Lua] Space Invaders
« on: June 15, 2011, 02:19:10 pm »
Space Invaders 0.8 is already in my calc and it's pretty great. However, I'd still like an English version and highscores :) I really like it though.

That's done !
Now the game language is the same as your TI-Nspire's language.
And for the high scores, now the game displays the high score when you loose the game. If you beat it, you have to save the document.

Thats the third "final version" of my game  :D
(I also edit the first post)

435
TI Z80 / Re: POP - A game to POP
« on: June 14, 2011, 01:15:40 pm »
Nice !
This must be quite fun.
I could spend hours of math playing this kind of games...

Pages: 1 ... 27 28 [29] 30 31