PDA

View Full Version : Community Soldat



Incubii
01-02-2005, 03:30 AM
Ok now surely anyone that codes games in Delphi should know about Soldat! If you dont its a frantic 2d multiplayer shooter. Like counter strike but 2d and with jet packs, lol. www.soldat.pl

Anyway the point is i was thinking that it would be a good idea to start up a community project as such that tries to accomplish what soldat has. you can hate it or love it but the point is, learning. The creater, Michal, has done a wonderful job with that game and it might be worth while asking him if he could write a tutorial or two or maybe release some code snippets to help buddying programmers start their own game.

Just a thought, but it has always been in the back of my mind

WILL
01-02-2005, 03:40 AM
Hmm... An excellent idea. I may look into this myself sometime in the near future...


Then again I can always get the Editor after him. ;)

Robert Kosek
01-02-2005, 04:50 AM
It would be helpful to people like be if the more experienced folks released code and tutorials. There's a lot I'd like to know, but I can't seem to find all that I'm looking for. Inexperience doesn't help either.

Incubii
01-02-2005, 07:33 AM
Well i made a basic version of Soldat in gamemaker www.gamemaker.nl. Which is also made in delphi! Anyway now that i have cut myself on the idea, i wanna make my own version from the ground up. I already know what i want, Soldat, but the next thing would be to sit down and design it my/our/your way.

Network:
Would be good to use the blackUDP component that is used in Soldat. Seems to be quite reliable. TCP is definatly an option for relliability but then it has more overhead attatched to it..

Engine/Graphics:
GLScene. It does the job already. I made a basic tile engine with it , multilayered, rotating and animated tiles and ran blazingly fast on my crap comp. I dont want to code in DirectX, as openGL is portable.

Scripting:
It needs a scripting engine to manage everything. Hard coding things always leads to trouble later on. It makes the whole project more complex but i feel it is quite acheivable. Theres already a good language ready to do it. DWS (Delphi Web Script), or that embedded pascal one, um, ILS or something, i forget! Anyway the languages are done its just a matter of handling all the in game logic etc with it.

the point of the scripting is, if you dont already know, is to be able to modify the function, game play, logic of the game without having to recompile the game.

Sound:
Well theres two choices i find most pleasing. BASS or FMOD. i find FMOD to be easier to code for but BASS does use that little less resources. From memory both only take 3 lines of code to play an mp3 file, so its a good start.

Overall:
Ok its scarce for now but hey its a begining, much discussion to follow! Basically it needs to go one step further then soldat. It needs to run on multiple OSes. So windows, linux, bsd, even os X. I dunno how portable free pascal is and how compatible it is with delphi 7. I use Delphi 7 Personal to code and tahts it.

Well thats all for now im too tired to think of anything else or go into detail :). There is one thing though, all i ask is that you dont dismiss the idea out right, sit down and think about it. Constructive criticism is much better then OMG I AMZ DE L33T HaX0r3ezeze!!

HairyFotr
01-02-2005, 09:03 AM
Well you guys are in luck :)
I have a soldat-like game, and i am open sourceing it as soon as I fix some bugs, tidy the code and comment it a little. (its a mess right now :))
I'm making it in Delphi 7 with DOT ( http://www.delphi3d.net/dot/ ).

You can try the xmas version at: http://freeweb.siol.net/dpotoc2/DJUK/DN_Xmas.exe

Incubii
01-02-2005, 09:42 PM
Hey had a look at your Xmas edition. Looking pretty good :). any chance you could write up something about how you went about doing it all? or maybe just how you solved a few major problems along the way that could relate to many games.

Its definatly in the direction i want to go

cairnswm
02-02-2005, 08:29 AM
To those that want more tutorials and things - please comment on the existing ones as your feedabck will help us write better tutorials and will also encourage us to write more tutorials.

Traveler
02-02-2005, 08:47 AM
To those that want more tutorials and things - please comment on the existing ones as your feedabck will help us write better tutorials and will also encourage us to write more tutorials.

I agree, especially with that last part.

HairyFotr
02-02-2005, 01:05 PM
Djuk Njuk is actually the project on which i learned all about opengl, before i only knew how to draw a quad :). I'm making it for about a year and a half now (but with 1-2month pauses in between). Sure i made a few games before, but they weren't really too good. The first Delphi game i made was Abducto, where you had to abduct people with a tractor beam from an UFO :)

Anyhow... Ill write some things about djuk in categories:
Terrain:
I have a polygon system, and i also save the whole terrain into an array of boolean. Thats done graphically... the polygons get drawn, are readback and saved into a array. I do that in the loading phase. That array is then used for terrain collision detection.
The people at opengl forums told me to calculate the collision with the polygons at runtime, but i think that would be slower, and I dont know that much maths. :)

AI:
Well in my game thats just a bunch of random if..elses, just enough for the creatures to chase its target and shoot when its close enough to its target.
I have a an idea where a path finding algo would find some paths at loading, and creatures would follow that paths to find their target. But i didn't implement that yet.

Weapon system:
I rewrote this one 2 times before i think, but I alwas ran into some trouble... Think good what features you'll want, because its one of the most important things in this kind of games in my opinion.
Right now i have 2 arrays... one that just holds the infos about different types of guns, and one for the guns that lie on the ground. And every creature has its own array where he keeps just the indexes of weapons(so the info about weapons are actually fetched from the fist array). I know it isn't tottaly logical, but the weapon expert on our team doesent really know what he wants, so i have to fix stuff all the time, and it became kind of a mess. Ill rewrite that before releasing the code.
Well there is one more array here... the bullet array. It saves the position of a bullet, speed, who fired it, with what gun, and some infos about particles.. like what kind of explosion it makes and what kind of trail it makes. A loop goes through all bullets every time, and moves them and checks if they hit something.

Collision detection with terrain:
There isnt really much i can say about this, but its also very important.. i experimented until i found a combination that worked. In older versions creatures often got stuck, or they could walk through walls, but most bugs here were eliminated.

Particle system:
I have a array that keeps all the particles. It saves position, type, gravity, speed, color... The one thing i'd put out here is optimisation... use only the variables you really need and make/update/draw only the particles that are actually on the screen (if someone gets shot on the other side of the map, the player doesent care :))

Drawing:
Dont know how this goes in GLScene, but the things that don't move should be put into a group (in pure opengl thats called a display list) for faster drawing. And always draw only the stuff you really have to.
-------------------------------------------------------------------------------

I'm not really and expert in programming or graphics, but i hope i helped a bit with this. In a month or so, when i release the code, you can look at some concrete code.