d2jsp
Log InRegister
d2jsp Forums > Off-Topic > International > Magyar > Official /care Topic
Prev1194919501951195219535001Next
Closed New Topic New Poll
Member
Posts: 44,578
Joined: Aug 15 2007
Gold: 2.84
Warn: 10%
Mar 6 2012 02:07pm
Quote (meatyowllegs @ 6 Mar 2012 22:06)
wat?
kijott mar? :D


aha, mar jön is le
Banned
Posts: 6,409
Joined: Sep 9 2011
Gold: 1,090.00
Warn: 10%
Mar 6 2012 02:10pm
Quote (RRC @ Mar 6 2012 10:07pm)
aha, mar jön is le


lol
es telleg
wtf
Member
Posts: 31,291
Joined: Jun 18 2007
Gold: 280.00
Mar 6 2012 03:39pm
ki akarja kipróbálni a space impactem 0.1es verzióját? csak fél mega, és installálni sem kell!

http://dl.dropbox.com/u/33602012/space%20impact.zip
Member
Posts: 31,291
Joined: Jun 18 2007
Gold: 280.00
Member
Posts: 22,735
Joined: Apr 30 2011
Gold: 122.92
Mar 6 2012 04:20pm
Quote (anyd @ Mar 7 2012 12:19am)


ugyan olyan rossz a link, mint az előző

de a játék egész fasza :D
Member
Posts: 18,418
Joined: May 17 2008
Gold: 1,694.20
Mar 6 2012 04:24pm
Quote (anyd @ 6 Mar 2012 22:39)
ki akarja kipróbálni a space impactem 0.1es verzióját? csak fél mega, és installálni sem kell!

http://dl.dropbox.com/u/33602012/spaceimpact.zip


kipróbáltam, tecik
Member
Posts: 31,291
Joined: Jun 18 2007
Gold: 280.00
Mar 6 2012 04:25pm
Quote (cowding @ Mar 6 2012 11:20pm)
ugyan olyan rossz a link, mint az előző

de a játék egész fasza :D


http://filefeltolto.hu/letoltes/2e56c110a3bdfc93/space-impact.zip
Member
Posts: 17,322
Joined: Apr 29 2007
Gold: 26.00
Mar 6 2012 04:31pm
Quote (anyd @ 6 Mar 2012 23:25)


forráskódot nem posztolsz hozzá?
Member
Posts: 31,291
Joined: Jun 18 2007
Gold: 280.00
Mar 6 2012 04:56pm
Quote (ace07 @ Mar 6 2012 11:31pm)
forráskódot nem posztolsz hozzá?


még a végén ellopod :D

Code
#include "graphics.hpp"
#include <ctime>
#include <vector>
#include <sstream>
#include <iostream>
#include <cstdlib>

using namespace std;
using namespace genv;

const int szeles=800;
const int magas=400;

struct koord
{

   int x;
   int y;
};
struct loves
{

   koord hely;
   bool van;

   loves()
   {
       van=false;
   }

   void rajz()
   {
       if (van)
       {
           gout << move_to(hely.x,hely.y) << color (245,245,0);
           gout << box(6,2);
       }
       if (hely.x>=szeles)
       {
           van=false;
       }
   }

   void mozog()
   {
       hely.x=hely.x+8;
   }
};
struct csillag
{
   koord hely;
   int p;

   csillag()
   {
       hely.x=rand()%szeles;
       hely.y=rand()%magas;
       p=rand()%3+3;
   }

   void rajz()
   {
       gout << move_to(hely.x,hely.y);
       gout << color(200,200,200) << box(p,1);
   }

   void mozog()
   {
       if (hely.x<=0)
       {
           hely.x=szeles;
           hely.y=rand()%magas;
       }
       hely.x=hely.x-p;
   }
};
struct urhajo
{
   koord hely;

   urhajo()
   {
       hely.x=20;
       hely.y=magas/2;
   }

   void rajz()
   {
       gout << move_to(hely.x,hely.y) << color(255,255,255);
       gout << move_to(hely.x-11,hely.y);
       gout << box(22,2);
       gout << move_to(hely.x-3,hely.y-2);
       gout << box(6,2);
       gout << move_to(hely.x-7,hely.y+2);
       gout << box(14,2);
       gout << move_to(hely.x+5,hely.y+4);
       gout << box(2,2);
       gout << move_to(hely.x-7,hely.y+4);
       gout << box(2,2);
       gout << move_to(hely.x-5,hely.y+6);
       gout << box(4,2);
       gout << move_to(hely.x+1,hely.y+6);
       gout << box(4,2);
       gout << move_to(hely.x-11,hely.y+2);
       gout << box(2,4);
       gout << move_to(hely.x+9,hely.y+2);
       gout << box(2,4);
       gout << move_to(hely.x-9,hely.y-2);
       gout << box(4,2);
       gout << move_to(hely.x+5,hely.y-2);
       gout << box(4,2);
       gout << move_to(hely.x-7,hely.y-4);
       gout << box(14,2);
       gout << move_to(hely.x+3,hely.y-6);
       gout << box(2,2);
       gout << move_to(hely.x-5,hely.y-6);
       gout << box(2,2);
       gout << move_to(hely.x+5,hely.y-8);
       gout << box(2,2);
       gout << move_to(hely.x-7,hely.y-8);
       gout << box(2,2);
   }

   void mozog(int y)
   {
       if(hely.y+y<10)
       {
           y=y-y;
       }
       if(hely.y+y>magas-10)
       {
           y=y-y;
       }
       if (hely.y>10 && hely.y<magas-10)
       {
           hely.y=hely.y+y;
       }
   }

};
struct gonosz
{
   koord hely;
   bool van;

   gonosz()
   {
       hely.x=szeles-11;
       hely.y=rand()%magas;
       van=true;
   }

   void rajz()
   {
       if (hely.x<0+11)
       {
           van=false;
       }
       if (van)
       {
           gout << color(255,255,255);
           gout << move_to(hely.x-11,hely.y);
           gout << box(22,2);
           gout << move_to(hely.x-3,hely.y-2);
           gout << box(6,2);
           gout << move_to(hely.x-7,hely.y+2);
           gout << box(14,2);
           gout << move_to(hely.x+5,hely.y+4);
           gout << box(2,2);
           gout << move_to(hely.x-7,hely.y+4);
           gout << box(2,2);
           gout << move_to(hely.x-5,hely.y+6);
           gout << box(4,2);
           gout << move_to(hely.x+1,hely.y+6);
           gout << box(4,2);
           gout << move_to(hely.x-11,hely.y+2);
           gout << box(2,4);
           gout << move_to(hely.x+9,hely.y+2);
           gout << box(2,4);
           gout << move_to(hely.x-9,hely.y-2);
           gout << box(4,2);
           gout << move_to(hely.x+5,hely.y-2);
           gout << box(4,2);
           gout << move_to(hely.x-7,hely.y-4);
           gout << box(14,2);
           gout << move_to(hely.x+3,hely.y-6);
           gout << box(2,2);
           gout << move_to(hely.x-5,hely.y-6);
           gout << box(2,2);
           gout << move_to(hely.x+5,hely.y-8);
           gout << box(2,2);
           gout << move_to(hely.x-7,hely.y-8);
           gout << box(2,2);

       }
   }

   void mozog()
   {
       hely.x=hely.x-2;
   }
};
void torles()
{

   gout << color(0,0,0) << move_to(0,0) << box(szeles,magas);
}
int main()
{
   gout.open(szeles,magas);
   bool fel=false;
   bool le=false;
   bool van=false;
   int szamlalo=0;
   int pontszam=0;
   string pontszams;
   stringstream buffer;

   vector<csillag>univerzum;
   for (int i=0; i<30; i++)
   {
       csillag temp;
       univerzum.push_back(temp);
   } //csillagok
   vector<gonosz>gonoszok;
   for (int i=0; i<7; i++)
   {
       gonosz temp;
       gonoszok.push_back(temp);
   } //gonoszok
   vector<loves>lovesek;
   for (int i=0; i<7; i++)
   {
       loves temp;
       lovesek.push_back(temp);
   } //lovesek

   urhajo hajo;

   gin.timer(40);

   event ev;
   while(gin >> ev)
   {

       if (ev.type==ev_key)
       {
           if (ev.keycode==key_up)
           {
               fel=true;
           }
           if (ev.keycode==key_down)
           {
               le=true;
           }
           if (ev.keycode==-key_up)
           {
               fel=false;
           }
           if (ev.keycode==-key_down)
           {
               le=false;
           }
           if (ev.keycode==key_space)
           {
               van=true;
               for (int i=0; i<lovesek.size(); i++)
               {
                   if (van)
                   {
                       if (lovesek[i].van==false)
                       {
                           lovesek[i].hely.y=hajo.hely.y;
                           lovesek[i].hely.x=20;
                           lovesek[i].van=true;
                           van=false;
                       }
                   }
               }
           }
       }


       if (ev.type==ev_timer)
       {
           torles();
           hajo.rajz();

           if (fel)
           {
               hajo.mozog(-4);
           }
           if (le)
           {
               hajo.mozog(4);
           }
           for (int i=0; i<univerzum.size(); i++)
           {
               univerzum[i].rajz();
               univerzum[i].mozog();
           }
           for (int i=0; i<gonoszok.size(); i++)
           {
               gonoszok[i].rajz();
               gonoszok[i].mozog();
           }
           for (int i=0; i<lovesek.size(); i++)
           {
               if (lovesek[i].van==true)
               {
                   lovesek[i].rajz();
                   lovesek[i].mozog();
               }
           }
           for (int i=0; i<lovesek.size(); i++)
           {
               if (lovesek[i].van==true)
               {
                   for (int j=0; j<gonoszok.size(); j++)
                   {
                       if (gonoszok[j].van==true)
                       {
                           if ((gonoszok[j].hely.x-lovesek[i].hely.x<14) && (8>(abs(gonoszok[j].hely.y-lovesek[i].hely.y))))
                           {
                               lovesek[i].van=false;
                               gonoszok[j].van=false;
                               pontszam++;
                           }
                       }
                   }
               }
           }
           if (szamlalo%150==0)
           {
               for (int i=0; i<gonoszok.size(); i++)
               {
                   if (gonoszok[i].van==false)
                   {
                       gonoszok[i].hely.x=szeles-11;
                       gonoszok[i].hely.y=rand()%(magas-10);
                       gonoszok[i].van=true;
                   }
               }
           }
           buffer << pontszam;buffer.clear();buffer >> pontszams;buffer.clear();
           gout << move_to(magas,szeles/2-20) << color(200,10,10) << text("Score: ") << text(pontszams);
           gout << refresh;
           szamlalo++;
       }

   }
   return 0;
}

/*
gout << color(255,255,255);
gout << move_to(hely.x, hely.y);
gout << color(255,255,255);
gout << move_to(hely.x-11,hely.y);
gout << box(22,2);
gout << move_to(hely.x-3,hely.y-2);
gout << box(6,2);
gout << move_to(hely.x-7,hely.y+2);
gout << box(14,2);
gout << move_to(hely.x+5,hely.y+4);
gout << box(2,2);
gout << move_to(hely.x-7,hely.y+4);
gout << box(2,2);
gout << move_to(hely.x-5,hely.y+6);
gout << box(4,2);
gout << move_to(hely.x+1,hely.y+6);
gout << box(4,2);
gout << move_to(hely.x-11,hely.y+2);
gout << box(2,4);
gout << move_to(hely.x+9,hely.y+2);
gout << box(2,4);
gout << move_to(hely.x-9,hely.y-2);
gout << box(4,2);
gout << move_to(hely.x+5,hely.y-2);
gout << box(4,2);
gout << move_to(hely.x-7,hely.y-4);
gout << box(14,2);
gout << move_to(hely.x+3,hely.y-6);
gout << box(2,2);
gout << move_to(hely.x-5,hely.y-6);
gout << box(2,2);
gout << move_to(hely.x+5,hely.y-8);
gout << box(2,2);
gout << move_to(hely.x-7,hely.y-8);
gout << box(2,2);
*/
Member
Posts: 59,371
Joined: Feb 15 2009
Gold: 80.00
Mar 7 2012 12:16am
csak én nem tudom megnyitni a facebookot?
Go Back To Magyar Topic List
Prev1194919501951195219535001Next
Closed New Topic New Poll