PDA

View Full Version : Dragon Flight



cairnswm
26-06-2005, 02:24 PM
My entry for the OnGameDev Spring Contest is Done :lol:

Here is a screen shot:

http://www.cairnsgames.co.za/files/DragonFlight03.jpg

I have packaged everything as a download here:
http://www.cairnsgames.co.za/download.asp?file=files/DragonFlight.zip

Id like someone tocheck that all the required DLLs are there and that they are working. As sure as I am sure that this release file is correct I will also release my full source code.

This game is the first to use my new OpenGL Bindings with SDL. Quite honestly I didn;t notice a difference between my old S2DL and the New one except for worrying about the Power of 2 limitations of OpenGL. :)

savage
26-06-2005, 10:54 PM
Runs Fine on my machine :). Impressive in the time you managed to put it together.

HopeDagger
27-06-2005, 02:42 AM
Lacking zlib.dll. :)

Sly
27-06-2005, 03:02 AM
...except for worrying about the Power of 2 limitations of OpenGL. :)
I have never had a problem with that because I have always made images to a power of two size because back in the old days, that was the done thing. I guess I just never got out of those old habits.

cairnswm
27-06-2005, 04:39 AM
Savage: The sound is using my SDL_mixer wrapper :? Why it suddenly works - I dont know however:


I don't know if this is just my laptop, but the sounds in all your games have been really wierd. They seem very static-filled and "jerky" when played back. Certainly doesn't sound the same as the wav files

From another site I posted the game. So obviously there is something wrong somewhere.

Everyone:

Thanks for the feedback.

I will add zlib and reload a bit later. My wife made a few suggestions as well as the guy that gave the feedback above.

The power of 2 is just a mental change you need to make when creating the textures. I'm finding it wastes a lot of space (ie 1024x1024 for the dragon instead of 1024 x 576 which would have been big enough). Of course that means learning to use the texture space better and put multiple sprites on one texture..... :lol:

Traveler
27-06-2005, 02:13 PM
A couple things I noticed.

- I too experienced the "static-filled and "jerky" sounds, like the person in the other forum mentioned.

- It appears as if you are creating the enemies inside the viewing area. This looks a bit odd to me.

- The text is placed below an archer.

- The shadow of the firebolt is nicely done, but it's placed incorrectly when it collides with an archer.

- You are talking about gold in the introduction, but I haven't seen any in the game. (I take it, it's at the end, but I didn't make it that far.)

- The scenery is very dull. Soms trees, a few bulidings or ruins would help a lot.

- when progress is at around 4695 and 5866 some tiles are placed wrong.

- Where's the castle? I gave up the hunt after 6200. :(

cairnswm
27-06-2005, 02:53 PM
- It appears as if you are creating the enemies inside the viewing area. This looks a bit odd to me.

Mmm, I also saw this this morning. Bit difficult to fix now. Might have a quick look

- The text is placed below an archer.

Didn;t think of that :)

- The shadow of the firebolt is nicely done, but it's placed incorrectly when it collides with an archer.

Will Check

- The scenery is very dull. Soms trees, a few bulidings or ruins would help a lot.

I could maybe add some trees. As you progress you get more and more archers. Maybe early in the game its a Archer or a Tree. Later on there are enough archers to keep your eyes busy. The next verison has 4 colors of archers.

- when progress is at around 4695 and 5866 some tiles are placed wrong.

Actually the map is random :) There are 10 different 20 line tile sets. This can come up anywhere - I still need to fix this :)

- You are talking about gold in the introduction, but I haven't seen any in the game. (I take it, it's at the end, but I didn't make it that far.)
- Where's the castle? I gave up the hunt after 6200.

All those are sort of a wish list I had. The new game has changed the intro message.

cairnswm
27-06-2005, 04:13 PM
New version posted. Same location:

http://www.cairnsgames.co.za/download.asp?file=files/DragonFlight.zip

Added all suggestions that were easy to do. :) Plus a few of my own changes I've added the trees - I'm not sure they work....

cairnswm
28-06-2005, 07:16 PM
Fixed the archers and trees coming onto the screen. Probably get more of them standing in the water instead...

No more time. This development is now officially over.

Final version is at:
http://www.cairnsgames.co.za/download.asp?file=files/dragonflight.zip

The source code is at:
http://www.cairnsgames.co.za/download.asp?file=files/dragonflightsrc.zip

As with most of my games this source is released completely free, no strings attached.

Requires Delphi (should compile in freepascal), SDL and JEDI-SDL with OpenGL units.

Traveler
28-06-2005, 08:40 PM
I get an error when I try to download your newest version :(

cairnswm
29-06-2005, 04:34 AM
Fixed the link.

Traveler
29-06-2005, 07:13 AM
It's looking much better now!

Some things I found:

- The first time I started this new version I got a fatal exception. I'm not sure why it happend (it could be a soundissue as I did have internet radio on), but the second time the game started like it should. (unfortunately the log was overwritten with the second attempt)

- I noticed some archers and trees are located in the water.

On an other note: I got a fps of 176 with a radeon 7000!

On a second note, I tried hacking your game and found it to be quite easy to extend the dragons health with a couple thousand points.

{MSX}
29-06-2005, 07:23 PM
I've compiled it to linux. There were the usual problems with file names case and "uses windows", but i got past them easily. I could submit the binary if you're interested.

Nice game i must say!

BTW how do i see the FPS ?

Bye!

{MSX}
29-06-2005, 07:27 PM
This game is the first to use my new OpenGL Bindings with SDL. Quite honestly I didn;t notice a difference between my old S2DL and the New one except for worrying about the Power of 2 limitations of OpenGL. :)

Well you could have easily used it for blending explosions :P
Anyway it runs much faster on most computer (mine for example :P )

cairnswm
30-06-2005, 04:41 AM
I promise to sort out the sound issues.... One day in the future somewhere :)

Thanks MSX - I sent you a PM. I also promise to one day start getting my unit case sensitivity right :)

As you have obviously looked at the code (Based on downloads - you are the only person that has :) ) what do you think of my SDL wrapper code?

lief
08-07-2005, 01:43 AM
hye cairns.

i managed to sneak a quick game of this at work. very cool... the screenshots do not do it justice.

FPS = 432

Sys =
Twin P4 3.2ghz
2gig ram
radeon 9800 pro

suggestions:

real particle system - allows smoke from dragons nostrils, real bouncy magic sparks, puffs of grass and dirt as he runs, big footprints behind him etc

more complex ai for archers - they run and hide when dragon gets close move in groups, ambush, etc

brilliant for the dev time. nice work. good stuff. great. yes.

bye.

cairnswm
11-07-2005, 03:46 PM
real particle system - allows smoke from dragons nostrils, real bouncy magic sparks, puffs of grass and dirt as he runs, big footprints behind him etc

more complex ai for archers - they run and hide when dragon gets close move in groups, ambush, etc

brilliant for the dev time. nice work. good stuff. great. yes.

Would have been nice :)

Sometime soon I must work on a nice Particle system that I can reuse in all my games. Things like footprints could have been cool :)

The archers have no AI at the moment. Just a random chance to shoot.

One of the problems I have is that I find it almost impossible to go back to old games and rework them. I also typically redo all the game engine work in my games as I write them. I have some standard libraries for things like drawing images on screen, setting up the screen and linking in AI to the games. I need to add a standard particle system, a better sound system and a more reliable high score system. :D

cairnswm
11-07-2005, 04:09 PM
Results were supposed to be out but they are not :(

lief
11-07-2005, 10:30 PM
were there any other games as complete as yours released?

heres some code if interested... its crappy, but its what i've found works for what i want to do... probably a few bugs with velocity ramps.

unit particle;
interface

uses math,cosine,asphyredef,AsphyreDevices,AsphyreCanva s;

type
TParticle = record
Angle,Age,TimeToLive : integer;
XVel,YVel,Xpos,YPos : Real;
StartXVel,StartYVel,EndXVel,EndYVel : Real;
Image : integer;
Pattern : Integer;
Color,StartAlpha : Cardinal;
Alpha,AlphaVel : real;
Active : boolean;
Scale,ScaleVel : real;
end;

procedure AddParticle(Particle : TParticle);
procedure AddWave(x,y,dir : integer);
procedure AddSmoke(x,y,dir,alt : integer);
procedure AddWaterRing(x,y,alt : integer);
procedure KillParticle(index : integer);
procedure DoParticles;
procedure RenderParticles(Device : TAsphyreCanvas);

var Particles : Array of TParticle;

implementation

uses main;


procedure AddParticle(Particle : TParticle);
begin
SetLength(Particles, Length(Particles)+1);
Particles[High(Particles)] := Particle;
end;

procedure AddWave(x,y,dir : integer);
var Tempwave : TParticle;
begin
With Tempwave do
begin
Angle := Dir + Random(5) - Random(5);
Age := 0;
TimeToLive := Random(10) + 75;;
XVel := +Sin256(Angle)/4;
YVel := -Cos256(Angle)/4;
StartXVel := XVel;
StartYVel := YVel;
EndXVel := XVel/4;
EndYVel := YVel/4;
Xpos := X + Random(16) - Random(16);
Ypos := Y + Random(16) - Random(16);
Image := 2; Pattern := 0;
Active := true;
StartAlpha := 1; AlphaVel := Random;
Scale := Random;
ScaleVel := 0.005;
Color := (Max(0,Min(254,Round(StartAlpha + (AlphaVel * Age)))) shl 24) or $FFFFFF;
end;
AddParticle(Tempwave);
end;

procedure AddSmoke(x,y,dir,alt : integer);
var Tempsmoke : TParticle;
begin
With Tempsmoke do
begin
Angle := dir;
Age := 0;
TimeToLive := 32;
XVel := +Sin256(Angle);
YVel := -Cos256(Angle);
StartXVel := XVel * (Max(50,Alt)/100);
StartYVel := YVel * (Max(50,Alt)/100);
EndXVel := XVel/4;
EndYVel := YVel/4;
Xpos := X + Random(2) - Random(2);
Ypos := Y + Random(2) - Random(2);
Image := 3; Pattern := 0;
Active := true;
StartAlpha := Random(64); AlphaVel := -2;
Scale := Random/2;
Scale := Scale * (Max(50,Alt)/100);
ScaleVel := 0.04;
Color := (Max(0,Min(254,Round(StartAlpha + (AlphaVel * Age)))) shl 24) or $FFFFFF;
end;
AddParticle(Tempsmoke);
end;

procedure AddWaterRing(x,y,alt : integer);
var Tempring : TParticle;
begin
With Tempring do
begin
Angle := 0;
Age := 0;
TimeToLive := 75;
XVel := 0;
YVel := 0;
StartXVel := 0;
StartYVel := 0;
EndXVel := 0;
EndYVel := 0;
Xpos := X + Random(4) - Random(4);
Ypos := Y + Random(4) - Random(4);
Image := 3; Pattern := 1;
Active := true;
StartAlpha := Max(50,50-Alt); AlphaVel := -0.75;
Scale := Random/2;
Scale := Scale * (Max(50,Alt)/100);
ScaleVel := 0.015;
Color := (Max(0,Min(254,Round(StartAlpha + (AlphaVel * Age)))) shl 24) or $FFFFFF;
end;
AddParticle(Tempring);
end;

procedure KillParticle(index : integer);
begin
Particles[index] := Particles[High(Particles)];
SetLength(Particles, Length(Particles)-1);
end;

procedure DoParticles;
var i : integer;
begin
If Length(Particles) > 0 then
For i := 0 to High(Particles) do
with Particles[i] do
If i <= High(Particles) then
begin
//Age it
Inc(Age);
//Move particles
Xpos := Xpos + XVel;
Ypos := Ypos + YVel;
//Update velocity
XVel := XVel - ((StartXVel - EndXVel)/TimeToLive);
YVel := YVel - ((StartYVel - EndYVel)/TimeToLive);
//Update alpha
Color := (Max(0,Min(254,Round(StartAlpha + (AlphaVel * Age)))) shl 24) or $FFFFFF;
Scale := Max(0,Scale + ScaleVel);
//Kill if needed
If Age >= TimeToLive then
begin
KillParticle(i);
end;
end;
end;

procedure RenderParticles(Device : TAsphyreCanvas);
var i : integer;
begin
//draw particles
If Length(Particles) > 0 then
For i := 0 to High(Particles) do
With Particles[i] do
begin
Device.Rotate(Main.Form1.Images.Image[Image],Round(Xpos-Main.Map.DrawOrigin.X),Round(YPos-Main.Map.DrawOrigin.Y),Angle,Scale,Color,Pattern,d oxDiffuse);
end;
end;

end.

how embarassing.

cairnswm
14-07-2005, 04:33 AM
Woohooo!!!

I came 2nd

http://www.ongamedev.com/forum//index.php?showtopic=2719

(hey WILL - this IS a news Item!)

lief
14-07-2005, 05:10 AM
give me a C
give me a A
give me a I
give me a R
give me a N
give me a S

gooooOOOOO CAIRNS!

wee cheerleders are dum, hence the bad gramer and speling.

cairnswm
14-07-2005, 05:23 AM
Thanks :)

Luckily you didn't finish your game :P

They didn't include my source with the distribution of the game :( Maybe I should start including source in the distribution zips of my games instead - theby ensuring that source is always distributed.

WILL
14-07-2005, 05:32 AM
Congrats! :)

I can't view the topic though. I'll have it up before the weekend. ;) No worries. Just get me some kinda page I can access. :lol:

savage
14-07-2005, 08:27 AM
Go that man!!! CONGRATULATIONS!!!

{MSX}
14-07-2005, 09:31 AM
great! a pascal game that got second place :P That's a good news!
is there another page apart from the thread? you can see it only if you're registered.

btw what do you win? :P

Traveler
14-07-2005, 11:10 AM
Congratz cairnswm!
Really nice work!

I was kinda wondering about that final list too. Bit of a shame its not made publically available.

cairnswm
14-07-2005, 11:30 AM
I have asked on the forum there about where the results can be seen publically. I'll let you know when I recieve a response.

Prizes:
www.Clickteam.com
Multimedia Fusion Pro
Multimedia Fusion
Install Creator Pro
Install Creator

www.game-editor.com
Game Editor

www.darkbasic.com
DarkBASIC Professional On-line + the Enhancement Pack
DarkBASIC Professional On-line
FPS Creator EA (or Version 1 if released in time)

www.stagecast.com
Stagecast


The person who came first gets to pick first - person second (me) gets to choose next. There is only really one item on the list that really interests me (Install Creator Pro) so hopefully the other guy will choose something else instead :)

I also like the Game-Editor software but at $15 I could just as well register it :)

Robert Kosek
14-07-2005, 03:44 PM
Good work Cairns! Glad to see you got a good place!

tux
14-07-2005, 05:06 PM
congratulations :D

lief
15-07-2005, 12:52 AM
let us know what prize you get...

WILL
15-07-2005, 07:17 AM
Well this is great news William. One of your greatest accomplishemnts yet! Well competition-wise. ;)

And I want to post it for sure, but I'm having issues with the OnGameDev site which seems to be a bit unfriendly to non-registered members. :?

cairnswm
15-07-2005, 07:37 AM
I've asked in the forum and by mail for a link to a public site - unfortunatly no response yet.