The Zod Engine

Discussions, requests and appeals to lay open the Z source code

Moderator: Brad

User avatar
Eastwind
Lieutenant
Lieutenant
Posts: 89
Joined: 2005-06-24, 23:22

Re: The Zod Engine

Postby Eastwind » 2010-02-04, 11:31

Hi Freaknigh


I installed the de dev version of differnent libsdl

Code: Select all

 gnu@robby:~$ sudo apt-get install libsdl1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev 
thne I try a make in normal user but give some error :

Code: Select all

gnu@robby:~/z.freedom.and.open.source$ make
g++ -c -g `sdl-config --cflags`  main.cpp
g++ -c -g `sdl-config --cflags`  common.cpp
common.cpp: In function ‘void COMMON::print_dump(char*, int, char*)’:
common.cpp:134: attention : '0' flag ignored with précision and ‘%x’ printf format
g++ -c -g `sdl-config --cflags`  zsdl.cpp
g++ -c -g `sdl-config --cflags`  event_handler.cpp
In file included from event_handler.cpp:1:
event_handler.h: In member function ‘void EventHandler<T>::AddFunction(int, int, void (*)(T*, char*, int, int))’:
event_handler.h:80: erreur: there are no arguments to ‘printf’ that depend on a template parameter, so a declaration of ‘printf’ must be available
event_handler.h:80: erreur: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
event_handler.h:86: erreur: there are no arguments to ‘printf’ that depend on a template parameter, so a declaration of ‘printf’ must be available
event_handler.h:92: erreur: there are no arguments to ‘printf’ that depend on a template parameter, so a declaration of ‘printf’ must be available
event_handler.h: In member function ‘void EventHandler<T>::ProcessEvents()’:
event_handler.h:111: erreur: there are no arguments to ‘printf’ that depend on a template parameter, so a declaration of ‘printf’ must be available
event_handler.h:117: erreur: there are no arguments to ‘printf’ that depend on a template parameter, so a declaration of ‘printf’ must be available
event_handler.h:123: erreur: there are no arguments to ‘printf’ that depend on a template parameter, so a declaration of ‘printf’ must be available
event_handler.cpp: In constructor ‘Event::Event(int, int, int, char*, int, bool)’:
event_handler.cpp:12: erreur: ‘malloc’ was not declared in this scope
event_handler.cpp:13: erreur: ‘memcpy’ was not declared in this scope
event_handler.cpp: In destructor ‘Event::~Event()’:
event_handler.cpp:21: erreur: ‘free’ was not declared in this scope
make: *** [event_handler.o] Erreur 1
what can I do ?
User avatar
lil' T
Lieutenant
Lieutenant
Posts: 77
Joined: 2007-03-07, 20:40
Location: Germany
Contact:

Re: The Zod Engine

Postby lil' T » 2010-02-04, 13:15

This can be made working by including cstdlib in event_handler.h but shouldn't you avoid malloc and free in CPP? Likewise, I also think the operators << and >> are preferred over printf in CPP.
User avatar
FreakNigh
General
General
Posts: 254
Joined: 2009-12-23, 22:41
Are you a spam bot?: No
Location: Philadelphia, USA
Contact:

Re: The Zod Engine

Postby FreakNigh » 2010-02-04, 15:50

ya you would have to add

Code: Select all

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
to the top of event_handler.h

Also you might want to just wine the map editor for now because its not quite as easy to compile the map editor, it requires a special folder hierarchy.
Image Image
User avatar
Eastwind
Lieutenant
Lieutenant
Posts: 89
Joined: 2005-06-24, 23:22

Re: The Zod Engine

Postby Eastwind » 2010-02-04, 17:34

Thankx !!!!

It does compile, can find the log of my testing here , I attach the log of file in end of message in case of you need it


I try the map named filename.map , in Zod map editor :l

Code: Select all

gnu@robby:~/z.freedom.and.open.source$ ./zod -m  zod.map/zod_engine/filename.map  -b 0 -p 1
Welcome to the Zod Engine
socket connected:127.0.0.1
socket connected:127.0.0.1
ServerSocket::CheckConnects:client connected:127.0.0.1
ZPlayer::test_event:howdy i am a player... from player 0
ZPlayer::test_event:hello player 0...
ZPlayer::test_event:howdy i am a player... from player 0

I also try the first exemple :

Code: Select all

gnu@robby:~/z.freedom.and.open.source$ ./zod -c localhost -r 800x600 -w
Welcome to the Zod Engine
could not connect to 'localhost'
ZPlayer::Setup:socket not setup
About running Zod map editor windows version inside wine , it does give me errors

wine map editor

Code: Select all

gnu@robby:~/z.freedom.and.open.source/zod.map/zod_engine$ wine zod_map_editor_test.exe 
fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.VC90.CRT"
err:module:import_dll Library MSVCP90.dll (which is needed by L"Z:\\home\\gnu\\z.freedom.and.open.source\\zod.map\\zod_engine\\zod_map_editor_test.exe") not found
err:module:import_dll Library MSVCR90.dll (which is needed by L"Z:\\home\\gnu\\z.freedom.and.open.source\\zod.map\\zod_engine\\zod_map_editor_test.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"Z:\\home\\gnu\\z.freedom.and.open.source\\zod.map\\zod_engine\\zod_map_editor_test.exe" failed, status c0000135
gnu@robby:~/z.freedom.and.open.source/zod.map/zod_engine$ 
Zod engine

Code: Select all


gnu@robby:~/z.freedom.and.open.source/second$ ./zod 
Welcome to the Zod Engine

==================================================================
Command list...
-c ip_address        - game host address
-m map_name          - map to be used
-b #                 - amount of bots to connect
-p #                 - amount of total real players before game start
-w                   - run game in windowed mode
-r resolution        - resolution to run the game at
-d                   - run a dedicated server
-h                   - display command help
-v                   - display version and credits

Example usage...
./zod -c localhost -r 800x600 -w
./zod -m level1.map -b 1 -p 1
==================================================================





bash Log :

Code: Select all

gnu@robby:~/z.freedom.and.open.source/second$ make >> log.zod.txt 

common.cpp: In function ‘void COMMON::print_dump(char*, int, char*)’:
common.cpp:134: attention : '0' flag ignored with précision and ‘%x’ printf format
zplayer.cpp: In member function ‘virtual void ZPlayer::Run()’:
zplayer.cpp:29: attention : deprecated conversion from string constant to ‘char*’
zbot.cpp: In member function ‘virtual void ZBot::Run()’:
zbot.cpp:29: attention : deprecated conversion from string constant to ‘char*’

log.zod.txt

Code: Select all


g++ -c -g `sdl-config --cflags`  main.cpp
g++ -c -g `sdl-config --cflags`  common.cpp
g++ -c -g `sdl-config --cflags`  zsdl.cpp
g++ -c -g `sdl-config --cflags`  event_handler.cpp
g++ -c -g `sdl-config --cflags`  socket_handler.cpp
g++ -c -g `sdl-config --cflags`  server_socket.cpp
g++ -c -g `sdl-config --cflags`  client_socket.cpp
g++ -c -g `sdl-config --cflags`  zcore.cpp
g++ -c -g `sdl-config --cflags`  zserver.cpp
g++ -c -g `sdl-config --cflags`  zclient.cpp
g++ -c -g `sdl-config --cflags`  zplayer.cpp
g++ -c -g `sdl-config --cflags`  zbot.cpp
g++ -c -g `sdl-config --cflags`  zmap.cpp
g++ -c -g `sdl-config --cflags`  zeffect.cpp
g++ -c -g `sdl-config --cflags`  zobject.cpp
g++ -c -g `sdl-config --cflags`  zrobot.cpp
g++ -c -g `sdl-config --cflags`  zbuilding.cpp
g++ -c -g `sdl-config --cflags`  zcannon.cpp
g++ -c -g `sdl-config --cflags`  zvehicle.cpp
g++ -c -g `sdl-config --cflags`  oflag.cpp
g++ -c -g `sdl-config --cflags`  rgrunt.cpp
g++ -c -g `sdl-config --cflags`  rpsycho.cpp
g++ -c -g `sdl-config --cflags`  rtough.cpp
g++ -c -g `sdl-config --cflags`  rsniper.cpp
g++ -c -g `sdl-config --cflags`  rpyro.cpp
g++ -c -g `sdl-config --cflags`  rlaser.cpp
g++ -c -g `sdl-config --cflags`  bfort.cpp
g++ -c -g `sdl-config --cflags`  brobot.cpp
g++ -c -g `sdl-config --cflags`  bvehicle.cpp
g++ -c -g `sdl-config --cflags`  bradar.cpp
g++ -c -g `sdl-config --cflags`  brepair.cpp
g++ -c -g `sdl-config --cflags`  vjeep.cpp
g++ -c -g `sdl-config --cflags`  vlight.cpp
g++ -c -g `sdl-config --cflags`  vmedium.cpp
g++ -c -g `sdl-config --cflags`  vheavy.cpp
g++ -c -g `sdl-config --cflags`  vmissilelauncher.cpp
g++ -c -g `sdl-config --cflags`  vapc.cpp
g++ -c -g `sdl-config --cflags`  vcrane.cpp
g++ -c -g `sdl-config --cflags`  cgatling.cpp
g++ -c -g `sdl-config --cflags`  cgun.cpp
g++ -c -g `sdl-config --cflags`  chowitzer.cpp
g++ -c -g `sdl-config --cflags`  cmissilecannon.cpp
g++ -o zod main.o common.o zsdl.o event_handler.o socket_handler.o server_socket.o client_socket.o zcore.o zserver.o zclient.o zplayer.o zbot.o zmap.o zeffect.o zobject.o zrobot.o zbuilding.o zcannon.o zvehicle.o oflag.o rgrunt.o rpsycho.o rtough.o rsniper.o rpyro.o rlaser.o bfort.o brobot.o bvehicle.o bradar.o brepair.o vjeep.o vlight.o vmedium.o vheavy.o vmissilelauncher.o vapc.o vcrane.o cgatling.o cgun.o chowitzer.o cmissilecannon.o `sdl-config --libs` -lSDL_image
BallWin
Major
Major
Posts: 195
Joined: 2006-10-24, 02:24
Location: Russia
Contact:

Re: The Zod Engine

Postby BallWin » 2010-02-05, 20:41

FreakNigh wrote:What do you think about having it so one of the options buildings have for production is the ability to upgrade? I think this might add to the strategy enough to help make player vs player more of a good game.
No. On the contrary. :)
I think it is unnecessary for such concepts. This breaks the gameplay.
FreakNigh wrote:And I have thought about a,b,c but there were two problems I had with it. First I am not a graphics designer and second I do not think I can carry on the spirit of this game with my own graphics, particularly into a and b. But I am trying to write this code so it could easily be attached to something like a,b,c,d hierarchy.
The hierarchy is implemented in the game Space Rangers 2: Dominators (info Wiki).

?) global level, the galaxy - the choice of stellar
Image
(original here, used images from GameSpot)
?) star system - the choice of the planets, battles in space, interaction with other players - extortion, robbery, protection of friends, a joint attack on the bandits, etc.
Image
Image
Image
c-d) planet - a mission on the surface of the selected planet. Mission diverse. War with the robots, only a small fraction of the possible suggestions (unfortunately only 30-40 levels).
Features of the battle:
- You can create your own design robots
- Factories require resources to collect a certain number of robots
- Army seizes territory but does not every plant individually
- Captured the fort became the property (not destroyed)
- Robots are not merged in the group (you can create only a temporary association)
- You can add "view from the eye, but the basic mode - isometric projection
Image
Image
Image

Make something like this in the style of Z would be ideal (IMHO).
Incidentally, the first part of this game has a team of three developers (programmers, artists, game designers) + aid community :wink: :D
User avatar
FreakNigh
General
General
Posts: 254
Joined: 2009-12-23, 22:41
Are you a spam bot?: No
Location: Philadelphia, USA
Contact:

Re: The Zod Engine

Postby FreakNigh » 2010-02-06, 07:26

erm thats a little ambitious for me. I don't have any plans past just a basic clone of the game right now, that is quite enough work to think about for now. i don't know what I am going to want to do after this is done so I don't want to make any commitments like that. I was thinking about removing the 16 player limit and make it unlimited, that would make for a potentially crazy Z game. Infinite space and players possible...

Eastwind, I'm going to move the map editor and tile editor in to the zod source tree that way they will be easy for someone on linux to compile them with the engine. It's looking like within the next day or so the engine will be rendering the map that the server sent to it, so the engine being playable probably isn't too awfully far off.
Image Image
goblin
Pyro
Pyro
Posts: 29
Joined: 2009-04-06, 02:14
Are you a spam bot?: No

Re: The Zod Engine

Postby goblin » 2010-02-07, 08:29

Thanks for the freqent updates. I'm enjoying following your progress.
User avatar
FreakNigh
General
General
Posts: 254
Joined: 2009-12-23, 22:41
Are you a spam bot?: No
Location: Philadelphia, USA
Contact:

Re: The Zod Engine

Postby FreakNigh » 2010-02-08, 02:26

The Zod Engine rendering the map...

http://www.youtube.com/watch?v=qsT08L7BkzM
Image Image
User avatar
FreakNigh
General
General
Posts: 254
Joined: 2009-12-23, 22:41
Are you a spam bot?: No
Location: Philadelphia, USA
Contact:

Re: The Zod Engine

Postby FreakNigh » 2010-02-09, 07:01

Some good and bad news... My linux has crashed so I'm forced to continue developing in windows for about the next 2 to 3 weeks, which means lots of windows updates. I am now working on the actual game as you can see in the vid and have changed the downloads a little. There is now a compile kit which will help you compile the code almost instantly, it comes with a compiler. I have released a new windows release so you can try out the game as you see in the video, and I have put the map editor and tile editor in the same source zip but obviously do not have the chance to modify the makefile unless I do it without testing.
Image Image
User avatar
Eastwind
Lieutenant
Lieutenant
Posts: 89
Joined: 2005-06-24, 23:22

Re: The Zod Engine

Postby Eastwind » 2010-02-09, 07:14

I feel sorry to hear that , and suprised that your gentoo crashed ...

I hope the crash is not too impoirtant and you can recover all of your data .

anyway, if there is anything i can do for help , let me know (and not only related to Zod ) . That s what community is for too :wink:

I get a crash on a fat32 external hard disk one day , and I used the recover soft photorec and testdisk
http://www.cgsecurity.org/ , it can manage a lot of different kind of filesystem . What happen is that the fat32 lost the name allocation table and then recover by physical fingerprint .. Also sometime forensic tools can be usefull too :)
Last edited by Eastwind on 2010-02-09, 07:20, edited 1 time in total.
User avatar
FreakNigh
General
General
Posts: 254
Joined: 2009-12-23, 22:41
Are you a spam bot?: No
Location: Philadelphia, USA
Contact:

Re: The Zod Engine

Postby FreakNigh » 2010-02-09, 07:18

ya i installed a new version of something, it didnt work so I went to reinstall the old version and they removed it from the list, so in my attempt to get this broken version working i ended up screwing up some major stuff but I can still get into the machine, but I will not be able to recover the data fully until I am back home in 2 or so weeks.

But also this version of the windows release should be more wine friendly as I didn't compile it with visual studio.
Image Image
User avatar
FreakNigh
General
General
Posts: 254
Joined: 2009-12-23, 22:41
Are you a spam bot?: No
Location: Philadelphia, USA
Contact:

Re: The Zod Engine

Postby FreakNigh » 2010-02-10, 06:19

If you want to help there is plenty to do.. But most of it will seem like work :wink:
Image Image
ZloveZ
Pyro
Pyro
Posts: 25
Joined: 2010-01-26, 14:54
Are you a spam bot?: No

Re: The Zod Engine

Postby ZloveZ » 2010-02-13, 08:27

So excited to start playing this game again!! I think the multiplayer is going to be awesome!! :shake: :shake: :shake: One quick question, since this is an open source project, once released it will basically grow as more people play it and create content for it?? (maps, mods etc)
User avatar
FreakNigh
General
General
Posts: 254
Joined: 2009-12-23, 22:41
Are you a spam bot?: No
Location: Philadelphia, USA
Contact:

Re: The Zod Engine

Postby FreakNigh » 2010-02-14, 02:40

Is there an ETA for a playable version?

What can a non-programmer do to help the cause?
There is plenty I can have you do =) There is lots of graphics tweaking that needs done, and i still need to get a hold of the sounds to the game. Also I am planning on installing a web based "bug tracker" so everyone can help me catalog all the bugs and features left to fix in the game, and I'll need people to maintain it.

Also for an ETA, this depends on the list of features you want to see to call it "playable". It was my intention to have it so it was fully multiplayer and capable of moving around units by the end of monday, but that might get pushed back because I am not getting any days off this weekend!
Wow, you're amazingly fast. I wish I had the same energy and spare time :)
It's nice to see that this forum becomes alive again, so keep it up, buddy!
By the way, your windows executable won't start, even with administrative rights...
Ya man we're taking this game down =) The new executables might work for you... I didn't compile them with visual studio.
So excited to start playing this game again!! I think the multiplayer is going to be awesome!! :shake: :shake: :shake: One quick question, since this is an open source project, once released it will basically grow as more people play it and create content for it?? (maps, mods etc)
Hell ya, I'm trying my best to provide a good code base that can be expanded on, and I'm making the tools like the map editor so people can expand on it. When you can actually win a game against each other, I will whip up a centralized multiplayer server so we can really start bringing this game back to life :twisted: .
Image Image
Meeky
Captain
Captain
Posts: 137
Joined: 2009-02-05, 11:18
Location: Russia

Re: The Zod Engine

Postby Meeky » 2010-02-14, 14:37

FreakNigh wrote: There is plenty I can have you do =) There is lots of graphics tweaking that needs done, and i still need to get a hold of the sounds to the game.
I have them ready for you :D
Although I have my own XNA remake project running and thus cannot help you out with coding, I'm glad that I can be of help at least in this way.
Z Sounds Download Link
WinZMod - mod for playing Z with high screen resolution
ZEdMod - ZEditor mod allowing to edit single player levels
ZGFX - Utility for extracting Z graphic
ZStats - Small utility for fine-tuning unit statistics
Z-Remake - XNA project on 2D IceCream Engine

Who is online

Users browsing this forum: No registered users and 2 guests