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 - Kiligolo

Pages: [1] 2 3 ... 15
1
Computer Programming / [VB]IRC connection problem
« on: February 22, 2012, 06:28:07 am »
Hello,

I want to make an IRC client in VB.NET but I have a problem at the connection with the server.
I helped myself with Telnet to make my program and to know when I had to send informations, etc.
Code: [Select]
'Ouverture de la connection
        SocketClient.Connect(Serveur, 6667)

        While Not UTF8.GetString(Stream).Contains("End of /MOTD command")
            SocketClient.Receive(Stream)
            tbChat.Text += UTF8.GetString(Stream) + NewLine    'tbChat is the textbox used to display messages received from the server
            tbChat.Refresh()
            Threading.Thread.Sleep(500)

            If UTF8.GetString(Stream).Contains("Found your hostname") Then
                tbChat.Text += "Identification avec le pseudo" + NewLine
                tbChat.Refresh()
                SocketClient.Send(ASCII.GetBytes("NICK " + Pseudo.ToUpper + "\r\n"))
            End If

            If UTF8.GetString(Stream).Contains("PING") Then
                Msg = UTF8.GetString(Stream).Substring(UTF8.GetString(Stream).IndexOf("PING") + 7, 15)
                tbChat.Text += "Réponse au ping " + Msg + NewLine
                tbChat.Refresh()
                SocketClient.Send(ASCII.GetBytes("PONG :" + Msg + "\r\n"))

                tbChat.Text += "Envoi des informations relatives au client" + NewLine
                tbChat.Refresh()
                If RealName <> "" Then
                    SocketClient.Send(ASCII.GetBytes("USER " + Pseudo.ToUpper + " 0 * :" + RealName + "\r\n"))
                Else
                    SocketClient.Send(ASCII.GetBytes("USER " + Pseudo.ToUpper + " 0 * :" + Pseudo + "\r\n"))
                End If
            End If
        End While
With Telnet, it worked well, the server sent the PING after NICK command and the MOTD after the USER command, but with this program, the server do not send me the PING and Envoi des informations relatives au client (= Sending client informations) is not displayed.
VS10 tell me that My connection is abandonned by a program of my host computer.

Thanks for your help.

2
Calculator C / Re: Sprites and Maps in C 68k
« on: February 19, 2012, 03:32:44 am »
If he want, why not! Even if I learn C with this program, it can be a serious project if it works but now it's still a test game.
Zelda is a goal.

3
Calculator C / Re: Sprites and Maps in C 68k
« on: February 18, 2012, 08:13:53 am »
It's an OR condition : if pUserx = 21 it's true and map[pUsery][pUserx] is useless so it's ok.

4
[FR] Hors-Sujet / Re: Serveur Minecaft
« on: February 18, 2012, 01:49:47 am »
Yep et merci kinder pour le lien :p
Et Torio au cas ou tu accepterais les version crack installe le plugin pour bukkit xauth qui demandera un pass a chaque joueur a la connection (je te laisse lire la page sous bukkit). Sinon un simple noob pourrais se faire passerpour ladmin en mettant Torio comme pseudo au demarrage du jeu.

5
Calculator C / Re: Sprites and Maps in C 68k
« on: February 17, 2012, 04:59:05 pm »
Yes youre right but im not changing value of memory adress so its ok isnt it?

6
[FR] Hors-Sujet / Re: Serveur Minecaft
« on: February 17, 2012, 04:50:04 pm »
Candidature for ever... -_____-'

@torio: demain je tenvoie le lien de ce qu a dit notch sur le piratage j ai la flemme de le faire maintenant je suis sur mon portable.

7
[FR] Hors-Sujet / Re: Serveur Minecaft
« on: February 17, 2012, 01:52:35 am »
Il faut que le serveur soit sous craftbukkit.. le problème c'est que les admin qui ont acheté le jeu ne pense pas forcément à ça, alors que c'est super simple à installer et que ça ne leur coûte rien. :/
Go server.proprieties (fichier présent dans le serveur). Il y a une ligne qui se nomme online-mode : true qui faut mettre a false et c'est bon. Avec un serveur vanilla ça marche aussi (j'en ai un avec siegecraft, un mod, qui accepte les version piratées).
Sinon je voudrais bien venir si j'ai le temps, mon pseudo c'est... Kiligolo (-> o_O).

EDIT@Kindermoumoute: Je pense que son serveur est déjà sous craftbukkit vu qu'il a installé des plugins (notamment pour l'économie).

EDIT2:
Quote
Bon vieux Pentium IV avec 1,25 Go de RAM, ouais, c'est borderlimit.
Il y a des pack de textures 8x8 et 4x4 (contre 16x16 pour le pack de base). Tu peux aussi changer les options graphiques (comme le smooth lighting), c'est ce que j'avais fait quand mon ordi déconnais (même avec un pack 2x2 et toutes les options graphique au min j'avais un FPS de 1...).

8
Calculator C / Re: Sprites and Maps in C 68k
« on: January 31, 2012, 02:37:57 pm »
It's not pokémon but zelda (at the beginning i wanted to make a pokemon game but now it's more a zelda game, i am too tired to rename files... ^^')

9
Calculator C / Re: Sprites and Maps in C 68k
« on: January 31, 2012, 02:29:38 pm »
If he want, why not! Even if I learn C with this program, it can be a serious project if it works but now it's still a test game.

10
Calculator C / Re: Sprites and Maps in C 68k
« on: January 31, 2012, 02:09:29 pm »
Thanks for your help! My program is okay now :p

11
Calculator C / Re: Sprites and Maps in C 68k
« on: January 30, 2012, 01:37:10 pm »
Ok i'm going to try without it.

12
Calculator C / Re: Sprites and Maps in C 68k
« on: January 30, 2012, 12:55:41 pm »
Hi! I have a big problem with dynamic allocation...
Here is the code:
Code: [Select]
int i, j;
unsigned char ** map = malloc(MAP_Y * sizeof(unsigned char));
for (i = 0; i < MAP_Y; i++)
{
map[i] = malloc(MAP_X * sizeof(unsigned char));
}
and at the end :
Code: [Select]
for (i = 0; i < MAP_Y ; i++)
{
free(map[i]);
}
free(map);
When i start the program, the Ti89 display BUSY icon and freeze but when i add ngetchx(); in this part of code:
Code: [Select]
int i, j;
unsigned char ** map = malloc(MAP_Y * sizeof(unsigned char));
for (i = 0; i < MAP_Y; i++)
{
                printf("%d",i);
                ngetchx(); //Here
map[i] = malloc(MAP_X * sizeof(unsigned char));
}
The 89 don't freeze and the program start but when i stop the program and i go to Var-Link menu, my asm program is now and expression (64000bytes).
I'm lost

13
Calculator C / Re: Sprites and Maps in C 68k
« on: January 29, 2012, 03:33:35 pm »
Thanks lionel im very tired today i go to sleep! :p

14
Calculator C / Re: Sprites and Maps in C 68k
« on: January 29, 2012, 03:27:32 pm »
Lionel > Yes
Xeda >
Code: [Select]
#include <tigcclib.h>

#define MAP_X 20
#define MAP_Y 12
It's the map size.
For map1 error:
Code: [Select]
unsigned char game_sprites[2][8] = //array of sprites
{ //Grass
   0b00000000,
   0b00101000,
   0b00010000,
   0b00000000,
   0b00000101,
   0b00000010,
   0b01010000,
   0b00100000,
},
{ //tree
   0b00000000,
   0b00000000,
   0b00111110,
   0b01111111,
   0b01111111,
   0b01111111,
   0b00111110,
   0b00001000,
}

unsigned char map[8][8] =
{
   {1,1,1,1,1,1,1,1},
   {1,0,0,0,0,0,0,1},
   {1,0,0,0,0,0,0,1},
   {1,0,0,0,0,0,0,1},
   {1,0,0,0,0,0,0,1},
   {1,0,0,0,0,0,0,1},
   {1,0,0,0,0,0,0,1},
   {1,1,1,1,1,1,1,1},
};
//0 = Grass and 1 = Tree
//Drawing:
int tilemap_x, tilemap_y;
int lcd_x, lcd_y;
unsigned char* pSprite;
unsigned char sprite_index;

// initialize the lcd Y value since we starting the first row
lcd_y = 0;

for (tilemap_y = 0; tilemap_y < 8; tilemap_y++)
{
  // initialize the lcd X value since we are starting a new collumn
  lcd_x = 0;

  for (tilemap_x = 0; tilemap_x < 8; tilemap_x++)
  {
    // first, get the sprite index from the tilemap
    sprite_index = game_tilemap[tilemap_y][tilemap_x];

    // second, get the pointer (address) to the sprite
    pSprite = &game_sprites[sprite_index][0];

    // draw the sprite to the screen
    Sprite8 (lcd_x, lcd_y, 8, pSprite, LCD_MEM, SPRT_RPLC); // --> TIGCC lib

    // increment the lcd X position in preparation for next sprite
    lcd_x = lcd_x + 8;
  }

  // increment the lcd Y position in preparation for next row of sprites
  lcd_y = lcd_y + 8;
}

15
Calculator C / Re: Sprites and Maps in C 68k
« on: January 29, 2012, 02:58:42 pm »
Thanks it's works!

But now i have a problem when i stop the program. The light plane is displayed in black and there is white rectangles which appear and disapear on the screen, i can't do anything. (Fortunatly i am on tiEmu)...

Pages: [1] 2 3 ... 15