Allegro.cc - Online Community

Allegro.cc Forums » The Depot » Basic Turret Defense Game

This thread is locked; no one can reply to it. rss feed Print
 1   2 
Basic Turret Defense Game
kazzmir
Member #1,786
December 2001
avatar

The game is pretty easy once I realized that there is no penalty for shooting, so I just kept clicking as fast as I could.

Anyway the fonts are pretty smooth, nice job.

Slartibartfast
Member #8,789
June 2007
avatar

No download then. My source code is still top secret. :o:o Not to say that I don't support Linux, just not for this purpose. If I were to make a real game then I'd look into providing some kind of support for the other platforms.

Apart from the framework code, here's the code I wrote for the actual game:

So even when your framework will be complete you do not intend to release it? Do you plan on making money with it?
Anyway, looking at the code it seem like your framework is nice and interesting though I didn't see anything about image animations (your objects only changed in place/size/opacity but seem not to change their image), and while I can't really think of a better way (partly because I haven't given it any thought :P) it seems pretty likely that in the future you will end up extending your framework to support more animation types when the currently defined constant ones just won't do for some complex animation that you will need.

Mark Oates
Member #1,146
March 2001
avatar

you do not intend to release it?

Perhaps. I'd need to write a manual. :-/

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

Slartibartfast
Member #8,789
June 2007
avatar

Perhaps. I'd need to write a manual. :-/

Cool, that's your decision, I'm just curious.
If I ever wrote something worthwhile I'd probably release it publicly (unless of course I was paid for it under an agreement that does not allow me to release it), in the worst case scenario it would be poorly documented.
Partly for the bragging rights, partly to be helpful to other people.

Neil Black
Member #7,867
October 2006
avatar

1) I beat it on the first try, although I was down to one energy. But I got a really even distribution with no heavy waves, so it was kind of easy.

2) No big slowdowns, but like I said it was a very even distribution, so I didn't have more than eight or nine bombs on screen at any one time. Maybe an even dozen near the end.

3) It ran great on my computer, didn't complain about any dlls at all (and right now the only dll I know for sure is on my computer is the allegro 4.2 dll).

As for the game itself, it's well done in my opinion. The graphics were neat and the gameplay flowed smoothly. Add a little more variety and I might have to play again... and again and again.

Felix-The-Ghost
Member #9,729
April 2008
avatar

Man that game was so easy I didn't even download it and I beat it.

{"name":"fb1bccf96ee6a62d14a47f2dff6269cd.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/b\/fb1bccf96ee6a62d14a47f2dff6269cd.png","w":791,"h":598,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/b\/fb1bccf96ee6a62d14a47f2dff6269cd"}fb1bccf96ee6a62d14a47f2dff6269cd.png

:) Okay I'll probably try it.

Edit:
The game takes awhile to init, and then I see some images, but it takes ~3-4 seconds to render each frame. Unplayable for me. Sounded fun though. Are you doing something with the large background each frame? Something takes a very long time for each frame.

EditEdit:
Even after adding 2GB of RAM, it doesn't improve. I don't know what it is.
On a somewhat irrelevant note can someone tell me if 2 sticks of DDR1 RAM of equal size is redundant.

==========================
<--- The ghost with the most!
---------------------------
[Website] [Youtube]

Mark Oates
Member #1,146
March 2001
avatar

Do you have a graphics card? It sounds like you don't have a graphics card. :P
Or need drivers?

The only thing I can think of that could be causing a major slowdown, more so for software rendering, would be the vignette image. It requires a full screen of blending.

try taking "vignette2.png" and "sheild.png" out of the images folder and run it again. Or, replace them with something small like a 1x1 pixel image.

Do you have any problems running other games?

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

Matthew Leverton
Supreme Loser
January 1999
avatar

Do you force OpenGL upon the user?

Arthur Kalliokoski
Second in Command
February 2005
avatar

Do you force OpenGL upon the user?

What? There are modern video chipsets with the most recent drivers use the default MS software OpenGL implementation?

They all watch too much MSNBC... they get ideas.

Mark Oates
Member #1,146
March 2001
avatar

Do you force OpenGL upon the user?

No.

Felix, what does your memory and processor usage look like when the program is running?

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

Matthew Leverton
Supreme Loser
January 1999
avatar

Then he could try switching to OpenGL via the config file. Although it's unlikely that it runs better than D3D, which I think is default.

Felix-The-Ghost
Member #9,729
April 2008
avatar

D3D is something I use for PSX emulating. It runs fine for me. OpenGL2 does not :( No graphics card, no pixel-shader.

I'll try the given advice though.

Also, I run other games just fine. Some Allegro games too. Except for the ones that need XNA Framework...haven't gotten that to work yet. My own programs run too, (4.2/4.4) But Allegro Programs use all my CPU. My "prettiest" program uses all my CPU, but barely any slow-down. This program uses a bunch of CPU too. I added 2GB of RAM and it didn't help any, I'm guessing the absence of a graphics card is a problem, but dang 4-5 seconds for each frame.

Edit: Enabling OpenGL pwns the program during initialization. No speed up for D3D.
Shrinking the images did nothing for speed, and neither did deleting them.
Does Allegro 5 have the Five Finger Salute option? I keep having to use Windows Task Manager to close the program. I guess the close button only checks once a loop, and well I don't get many loops.

I don't really know what happened. Maybe Allegro 5 hates me.

EditEdit:

Felix, what does your memory and processor usage look like when the program is running?

Uh, I'll get to that screenshot, but I can say the CPU spikes on start-up.

EditEditEdit: Cool. I didn't know the quote tag works without a specified name.

==========================
<--- The ghost with the most!
---------------------------
[Website] [Youtube]

Mark Oates
Member #1,146
March 2001
avatar

I guess the close button only checks once a loop, and well I don't get many loops.

The close button is handled as an event. Unless events are piling up somehow (which might be what's happening) it wouldn't be getting skipped.

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

Paul whoknows
Member #5,081
September 2004
avatar

Since I had some problems with your Haku game I decided to download this one and test it. Game refreshes at one frame per second at best, needles to say unplayable, are there some configurations available in order to increase game performance? My hardware is a P4 2400MHz, 1GB ram, FX5700le.

____

"The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner.

Matthew Leverton
Supreme Loser
January 1999
avatar

He could try setting ALLEGRO_NO_PRESERVE_TEXTURE and provide an option to disable all fonts.

Felix-The-Ghost
Member #9,729
April 2008
avatar

The close button is handled as an event. Unless events are piling up somehow (which might be what's happening) it wouldn't be getting skipped.

What sort of events? From the screenshots its a relatively simple game? Do you have any other Allegro 5 programs so I can see if my computer can't handle them?

Edit: Okay for real I'll get those specs. Also I forgot to say you spelled shield wrong in the files, and why is there a vignette2 and not a vignette1?

EditEdit:
{"name":"600083","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/8\/28c631ce00342b2e2e95323fecad4e20.png","w":507,"h":509,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/8\/28c631ce00342b2e2e95323fecad4e20"}600083
The mountain shapes are from just moving the windows around. The plateau looking thing is the program running. I guess my computer has a bad CPU.

==========================
<--- The ghost with the most!
---------------------------
[Website] [Youtube]

MiquelFire
Member #3,110
January 2003
avatar

That doesn't help solve the issue.

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red
If anyone is of the opinion that there is no systemic racism in America, they're either blind, stupid, or racist too. ~Edgar Reynaldo

Felix-The-Ghost
Member #9,729
April 2008
avatar

Your post doesn't help either. Perhaps your mom can help solve the issue.
All informalities aside, I was just addressing this post:

Felix, what does your memory and processor usage look like when the program is running?

==========================
<--- The ghost with the most!
---------------------------
[Website] [Youtube]

Dario ff
Member #10,065
August 2008
avatar

Some information regarding this extreme slowdown on Paul and Felix. I tried myself in my game setting the ALLEGRO_MEMORY_BITMAP flag, and it worked like crap, pretty much how they say it works, 3 or 4 FPS, totally unplayable. My guess, A5 falling back to these memory bitmaps?

TranslatorHack 2010, a human translation chain in a.cc.
My games: [GiftCraft] - [Blocky Rhythm[SH2011]] - [Elven Revolution] - [Dune Smasher!]

 1   2 


Go to: