taskSavannah Administration - Tasks: task #4025, Submission of Star Voyager - The...

 
 

task #4025: Submission of Star Voyager - The new Aim

Submitter:  Gabor Unger <lgpg>
Submitted:  Mon 18 Apr 2005 07:48:52 PM UTC
   
 
Should Start On:  Mon 18 Apr 2005 12:00:00 AM UTC Should be Finished on:  Thu 28 Apr 2005 12:00:00 AM UTC
Category:  Project Approval Priority:  * 5 - Normal
Status:  Done Privacy:  Public
Assigned to:  zeus Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 12 May 2005 10:16:38 PM UTC, comment #9: 

Hi,

I have approved your project.  You will receive an automated e-mail
containing detailed information about the approval.

Regards.

Jonathan Gonzalez V. <zeus>
Thu 12 May 2005 12:22:08 AM UTC, comment #8: 

Hi,

You have the FSF address missing in the license notice, in both files,
consider to fix this. You have the 'COPYING' file missing, this file
must contain a verbatim copy of the GNU GPL, you can get this copy
from this URL: 'http://www.gnu.org/licenses/gpl.txt'. In order to
learn more about the GNU GPL, consider to read these URLs:

      http://www.gnu.org/licenses/gpl-howto.html
      http://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html
      http://www.gnu.org/prep/maintain/html_node/License-Notices.html

If you are willing to make the changes mentioned above, please provide
us with an URL to an updated tarball of your project.  Upon review, we
will reconsider your project for inclusion in Savannah.

Regards.

Jonathan Gonzalez V. <zeus>
Mon 09 May 2005 02:19:29 PM UTC, comment #7: 

First gz`s codetable wrong.
The cecond file`s uth8
Thx.

Gabor Unger <lgpg>
Mon 09 May 2005 02:11:15 PM UTC, comment #6: 

/*

  • This program is free software; you can redistribute it and/or modify
  • it under the terms of the GNU General Public License as published by
  • the Free Software Foundation; either version 2 of the License, or
  • (at your option) any later version.

*

  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  • GNU General Public License for more details.

*

  • You should have received a copy of the GNU General Public License
  • along with this program; if not, write to the Free Software
  • Foundation, Inc.

*/
/********************************************************************

  • Description:Server list ring class header
  • Author:  Gabor Unger
  • Created at: Fri Apr 29 23:42:23 CEST 2005
  • Computer: magic
  • System: Linux 2.6.11-fw2 on i686
  •   
  • Copyright (c) 2005   All rights reserved.

*
******************************************************************/


#include<sys/socket.h>
#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
#include<arpa/inet.h>
#include<netinet/in.h>
#include<netdb.h>
#include <fcntl.h>
#include <string.h>

class master
{
private:
int child_pid; //A gyermek processz azonos&#65533;&#65533;a
int Szerver_Socket;
int port;
#define MAX_Masters 5
#define MAX_Servers 40
#define MAX_Clients 5
int SZERVER_List[MAX_Servers];
int MASTER_List[MAX_Masters];
fd_set Selects_Sockets;
timeval timeout;
int Readable_Sockets;




public:
master()
{
/*A fork fuggveny megduplazza a processzt*/     
printf("Child process starting ");
child_pid=fork(); 
if (child_pid<0){
printf("Child process starting Error");
exit(-1);
}
/*megvizsg&#65533;juk ez melyik p&#65533;d&#65533;y*/
if( child_pid==0 ){
        /*Ha ez a gyermek, akkor lefut a setup_master() fggv&#65533;y &#65533; csatlakozunk a l&#65533;cba*/
printf("Child processz");
setup_master();
}
/*Ha nem ez a gyermek processz, akkor ezzel az oszt&#65533;yal nem kell t&#65533;&#65533;ni t&#65533;bet.*/
}


int getdomain()
{
hostent*    myip_host;
in_addr*    myip_ip;
sockaddr_in myip_address;
int myip_sock;
FILE       *myip_csatorna;

myip_host = gethostbyname("myip.hu");
myip_ip=( in_addr *)(myip_host->h_addr);

myip_sock = socket(PF_INET, SOCK_STREAM, 0);
myip_address.sin_addr =*myip_ip;
myip_address.sin_port = htons(80);       
myip_address.sin_family = AF_INET;


printf("Get domain name.\n");
if(connect(myip_sock, (struct sockaddr*)&myip_address, sizeof(myip_address))==0)
{
printf("Connection Ok.\n");
myip_csatorna = fdopen(myip_sock, "r+");            
fprintf(myip_csatorna, "GET http://myip.hu/update/updateip.phtml?user_name=aimmaster&password=&domain=myip.hu HTTP/1.0\r\n\r\n");   

}
printf("IP cim: %s\n",inet_ntoa(*myip_ip));


 fclose(myip_csatorna);
}


int setup_master()
{
hostent*    master_host;
in_addr*    master_ip;
sockaddr_in master_address;
int master_sock;
FILE       *master_csatorna;
port=3501;

master_host = gethostbyname("aimmaster.myip.hu");
master_ip=( in_addr *)(master_host->h_addr);
master_sock = socket(PF_INET, SOCK_STREAM, 0);
master_address.sin_addr =*master_ip;
master_address.sin_port = htons(port);
master_address.sin_family = AF_INET;

if (connect(master_sock, (struct sockaddr*)&master_address, sizeof(master_address))==0){
}else{
pri_master();
}

}




int pri_master()
{
Socket a k&#65533;&#65533;ek fogad&#65533;&#65533;a
sockaddr_in szerver_address;
Lefoglaljuk a domaint
getdomain();
//L&#65533;rehozzuk a socketet
Szerver_Socket = socket(AF_INET, SOCK_STREAM, 0);
if(Szerver_Socket < 0)
{
perror("Error creating server socket.\n");
exit(-1);
}
Nemblokol&#65533;&#65533;a &#65533;&#65533;juk
SetNonblocking(Szerver_Socket);
Szgs&#65533;es mem&#65533;ia lefoglal&#65533;a
memset((char *) &szerver_address, 0, sizeof(szerver_address));
alapvet&#65533;adatok kit&#65533;t&#65533;e
szerver_address.sin_family = AF_INET;
szerver_address.sin_addr.s_addr = htonl(INADDR_ANY);
szerver_address.sin_port = htons(port);
Socket porthoz k&#65533;&#65533;e
if(bind(Szerver_Socket, (struct sockaddr *) &szerver_address,
sizeof(szerver_address)) < 0)
{
perror("bind");
exit(1);
}
Port megnyit&#65533;a kommunik&#65533;i&#65533;a
if(listen(Szerver_Socket,2) < 0)
{
perror("listen");
exit(1);
}
//F&#65533;urok
while (1)
{
BuildSelectsList();
timeout.tv_sec = 1;
timeout.tv_usec = 0;

/* A select meghivasa. Ez akkor ter vissza, ha a masodik
argumentumban megadott socketekbol lehet olvasni (vagy ha
bontodott a kapcsolat, akkor egy EOF olvashato), vagy ha a
timeout lejart. */
Readable_Sockets = select(FD_SETSIZE, &Selects_Sockets, (fd_set *) 0,
(fd_set *) 0, &timeout);

if(Readable_Sockets == 0)
{
/* Timeout tortent, nincs olvasasra varo socket. */
}
else
{
/* Feldolgozzuk az olvasasra varo socketeket. */
AnaliseSockets();
}


}
}

void SetNonblocking(int sock)
{
int opts;

opts = fcntl(sock,F_GETFL);
opts = (opts | O_NONBLOCK);

fcntl(sock,F_SETFL,opts);
}
Ez a fggv&#65533;y a Linux Programoz&#65533; c&#65533; k&#65533;yv alapj&#65533; k&#65533;zlt!
void BuildSelectsList()
{
int i;

/* A select lista felallitasa. Eloszor belerakjuk szerver
socketet, majd a kliens socketeket. */

/* Kiuritjuk a halmazt. */
FD_ZERO(&Selects_Sockets);

/* A server socket hozzaadasa a figyelendo halmazhoz. */
FD_SET(Szerver_Socket,&Selects_Sockets);

/* A Szerver socketek hozzaadasa. */
for(i = 0; i < MAX_Servers; i++)
{
if (SZERVER_List[i] != 0)
{
FD_SET(SZERVER_List[i],&Selects_Sockets);
}
}
/* A Master socketek hozzaadasa. */
for(i = 0; i < MAX_Masters; i++)
{
if (MASTER_List[i] != 0)
{
FD_SET(MASTER_List[i],&Selects_Sockets);
}
  }

}




int AnaliseSockets()
{




}




Gabor Unger <lgpg>
Mon 09 May 2005 11:13:09 AM UTC, comment #5: 

Hi,

Apologize for the delay in my answer, I missed your answer in my email
box.

In fact yest, I cannot download the file that you point us, can you
fix on this please?

Regards,

Jonathan Gonzalez V. <zeus>
Thu 05 May 2005 09:08:28 PM UTC, comment #4: 

Any problems?

Thx

Gabor Unger <lgpg>
Fri 29 Apr 2005 10:24:19 PM UTC, comment #3: 
Gabor Unger <lgpg>
Sun 24 Apr 2005 09:46:22 AM UTC, comment #2: 

#4025
Hi

>As I see you do not have source code yet, it is that right?

This game true.
But the game few parts bassed starvoyager
http://starvoyager.bluesky.me.uk/.
This parts and own class headers less time arriving a cvs.
But a main code making need more time.

>are you agree with this point?

Yes.

Regards

Gabor Unger <lgpg>
Sat 23 Apr 2005 05:19:36 PM UTC, comment #1: 

Hi,

I'm evaluating the project you submitted for approval in Savannah.

As I see you do not have source code yet, it is that right? in this
case we can approve your project but as without source code, this
means that we will review your source code in a month (more or less)
looking for the any kind of problem that we didn't catch at approval
time, are you agree with this point?

Regards,

Jonathan Gonzalez V. <zeus>
Mon 18 Apr 2005 07:48:52 PM UTC, original submission:  


Site Admin. Approval/Edition URL:
 <https://savannah.gnu.org/admin/groupedit.php?group_id=7527>


###### ORIGINAL SUBMISSION DETAILS ######

System Group Name:
-----------------
  newaim


Full Name:
----------
  Star Voyager - The new Aim


Type:
-----
  non-GNU software & documentation


License:
--------
  GNU General Public License V2 or later


Other License:
--------------



Description:
------------
  3D graphical real-time battle simulation with a Star Trek theme with multiplayer support.

Write in C++.
Using Ogre 3D engine.
Primary using Blender make models and Gimp to images,textures.

Primary goal make real Star Treak simulation.
Long range goals: FPS, RPG, Strategy parts.

Sorry. We don't have source code now, now make models.
The game base code make in summer.


Other Software Required:
------------------------
  Blender www.blender.org
Ogre 3D www.ogre3d.org
Gimp    www.gimp.org
DevIL http://openil.sourceforge.net/



Other Comments:
---------------
  Sorry my terrible English.


#########################################

Gabor Unger <lgpg>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #3613:  sv.tar.gz added by lgpg (8KiB - application/x-gunzip - Final source)
file #3607:  sv.tar.gz added by lgpg (2KiB - application/x-gunzip - Source - good)
file #3606:  sv.tar.gz added by lgpg (2KiB - application/x-gunzip - Source)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 10 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-05-14 zeus Open/ClosedOpen Closed
2005-05-12 zeus StatusNone Done
    Percent Complete70% 100%
2005-05-12 lgpg Attached File- Added sv.tar.gz, #153
2005-05-12 zeus Percent Complete30% 70%
2005-05-09 lgpg Attached File- Added sv.tar.gz, #147
2005-05-09 lgpg Attached File- Added sv.tar.gz, #146
2005-05-09 zeus Percent Complete20% 30%
2005-04-23 zeus Percent Complete0% 20%
    Assigned toNone zeus

Back to the top

Powered by Savane 3.13-caa5.
Corresponding source code