PDA

View Full Version : Salvoes Away!



paul_nicholls
01-06-2007, 03:34 AM
http://upload8.postimage.org/613553/screenshot.jpg (http://upload8.postimage.org/613553/photo_hosting.html)

I am writing a battleship clone called "Salvoes Away!" using freepascal.
It is currently in 320 x 240 resolution so it will fit on the GP2X as well when finished.

Here is a screenshot of a randomly placed (and rotated) fleet containing

1 x Aircraft carrier (size 5 squares)
1 x Battleship (size 4 squares)
1 x Cruiser (size 3 squares)
2 x Destroyer (size 2 squares)
2 x Sub (size 1 square)

and 20 random hit locations showing misses as an 'x' and hits as ticks.


cheers,
Paul.

savage
01-06-2007, 08:08 AM
Great stuff Paul! Bumped to news item.

jdarling
04-06-2007, 01:20 PM
Hello Paul, I'll reply to your thread instead of carrying this on in the Memory thread.

I'd be interested in your game as long as it ends up having all of the common elements. It's my feeling that Memory shows the bare minimum in that it has the proper splash, credits, and options screens within the game itself.

I've always loved battleship and think it would be a great addition to the listing. The only major concern I would have would be about the screen size being 320x240. Any chance you can have a 2nd set of graphics and an option to run the game at 640 or 800 in full screen or windowed mode?

PS: Sorry it took so long to get back to you, was on vacation and no plans on touching a computer while I was :).

- Jeremy

paul_nicholls
04-06-2007, 11:20 PM
Hello Paul, I'll reply to your thread instead of carrying this on in the Memory thread.

I'd be interested in your game as long as it ends up having all of the common elements. It's my feeling that Memory shows the bare minimum in that it has the proper splash, credits, and options screens within the game itself.

I've always loved battleship and think it would be a great addition to the listing. The only major concern I would have would be about the screen size being 320x240. Any chance you can have a 2nd set of graphics and an option to run the game at 640 or 800 in full screen or windowed mode?

PS: Sorry it took so long to get back to you, was on vacation and no plans on touching a computer while I was :).

- Jeremy

Hi Jeremy :-)
It shouldn't be a problem for me to make a second set of tiles for a higher resolution, or I could even try using Scale2x or similar to scale up the output when running under Windows :-)
cheers,
Paul.

WILL
04-06-2007, 11:34 PM
Just a warning with that 2X scale, I've tried using it in my SDL title Subject 33 and I found that it drastically slowed down the speed of the game.

paul_nicholls
04-06-2007, 11:45 PM
Just a warning with that 2X scale, I've tried using it in my SDL title Subject 33 and I found that it drastically slowed down the speed of the game.

Thanks for the tip Will, I may just go with larger tiles then :-)
I will try the scaling first though just in case ;-)
cheers,
Paul.

WILL
04-06-2007, 11:48 PM
Well actually if you find a way to simple scale x2 without much speed loss, please let me know. The method I used what with the included sdlutils.pas unit so maybe there is a much batter/smarter way that I don't know of. :?

paul_nicholls
05-06-2007, 12:03 AM
Well actually if you find a way to simple scale x2 without much speed loss, please let me know. The method I used what with the included sdlutils.pas unit so maybe there is a much batter/smarter way that I don't know of. :?

If The speed of the scaling is not good enough for realtime, I may use the hq2x scaling 2x algorithm (http://www.hiend3d.com/hq2x.html) (gives nice smooth output) to create the new 640x480 tile set and use those directly without any scaling!! :lol:



cheers,
Paul.

jdarling
05-06-2007, 12:38 PM
Paul, have you found a pascal version of hq2x? I always thought it looked very promising, but haven't found a good way to link it into my games. If one doesn't exist, a conversion may be a good community project to start up :).

savage
05-06-2007, 02:40 PM
I remember seeing the smart filtering ( http://www.hiend3d.com/smartflt.html ) demo years ago and it was very nice indeed. A pure portable pascal version of hq2x or others would be very nice as well.

paul_nicholls
06-06-2007, 01:26 AM
[quote="jdarling"]Paul, have you found a pascal version of hq2x? I always thought it looked very promising, but haven't found a good way to ]

Perhaps this could help?

short link (http://delphi.newswhat.com/geoxml/forumhistorythread?groupname=borland.public.delphi .language.basm&messageid=41b89445$1@newsgroups.borland.com)

cheers,
Paul.

jdarling
06-06-2007, 02:02 PM
I saw that in my searches, but I'm not a fan of linking libraries if I don't have to. Makes cross platform too difficult. See my other thread on converting hq2x from C to Pascal. Things are coming along nicely and I don't think it will be long before its completely converted. Course then under the GPL the source will be sent to the author and permission requested to post on appropriate sites for others to use.

paul_nicholls
27-06-2007, 06:35 AM
I probably will change the graphics again, but I thought I'd post a screenie of my 640x480 output (using pre-resized graphics created with hq2x).

http://upload9.postimage.org/13324/salvoes_away.jpg (http://upload9.postimage.org/13324/photo_hosting.html)

You can also download an AVI file (approx 1.24MB) of a bit of the game so far from fpc4gp2x.eonclash.com/downloads/salvoes_away.avi

It is a work in progress so far :)
cheers,
Paul.

WILL
27-06-2007, 07:16 AM
The hq2x looks pretty good. Whats the performance like?


What did you encode the AVI file with? It won't playback on my system.

I have both DivX and Xvid codecs installed so those should work.

jdarling
27-06-2007, 12:57 PM
Looking good Paul, can't wait to see this one listed all over the net :)

savage
27-06-2007, 01:07 PM
I can't read that AVI file either. I'd be interested in know how fast hq2x is as well. Also since you are developing for GP2X, does it work with SDL_Surfaces as well?

paul_nicholls
28-06-2007, 02:30 AM
The hq2x looks pretty good. Whats the performance like?


What did you encode the AVI file with? It won't playback on my system.

I have both DivX and Xvid codecs installed so those should work.

Hmm...I used Camtasia 3.0 to grab the screen video and then create an output file.

It works on my machine with WinAmp...

I will try doing it again, but directly to an .avi file instead.

cheers,
Paul.

paul_nicholls
28-06-2007, 02:31 AM
I can't read that AVI file either. I'd be interested in know how fast hq2x is as well. Also since you are developing for GP2X, does it work with SDL_Surfaces as well?

Bummer...


I don't know about the hq2x and SDL surfaces :)
I have only run the hq2x.exe file directly on the .bmp file to produce the new larger tile sets...

cheers,
Paul.

jdarling
28-06-2007, 01:03 PM
I can't read that AVI file either. I'd be interested in know how fast hq2x is as well. Also since you are developing for GP2X, does it work with SDL_Surfaces as well?

HQ2X is a C/C++ module, though my conversion of it to pascal continues. The version for SDL isn't complete yet, but there is no reason it wouldn't work for SDL surfaces as long as they are in the proper format. As for speed, its VERY fast. Can scale a 256x256 pixel image in my Laz test app and maintain ~60fps easily. So if you only scaled the image once (that would be the correct way, I'm doing it every frame to compare speeds) you would hardly notice the difference. In fact, I can't even count to 1 1000 before it finishes scaling all textures and images for my 2007 PGD entry :).

WILL
28-06-2007, 03:03 PM
Try making sure that the encoder is set to something standard. Or... you can always try to load the file in Movie Maker and convert it to a wmv. It'll be a bit smaller too.

paul_nicholls
02-07-2007, 01:47 AM
Try making sure that the encoder is set to something standard. Or... you can always try to load the file in Movie Maker and convert it to a wmv. It'll be a bit smaller too.

I will give that a go :-)
cheers,
Paul