[ANN] Formido - a shooting game

Greetings,
I just got my first SDL game uploaded. It’s called Formido.

Formido is one of those games, where you are loaded with some guns and you go
shooting different things. ‘Things’ in this case are big, ugly, - not green
though - alien insects. The idea is to kill as many of those bastards as
possible. Eventually they will overcome you, but struggle as long as you can.
There are some power-ups to aid you in your honorable quest. Keep in mind,
that those critters are rather tough and generally do nasty things when in
close range of any player-characters. If you have ever played any Phobia
games, you know what I’m talking about.

It’s released under the terms of the GNU GPL.

Grab it (and all of my other games) from
http://www.mhgames.cjb.net

Drop me some feedback, at least if you like it! =)

PS. The Linux version isn’t working yet - and I need some help from you
Linux/SDL-gurus. Check the Formido’s page for details.

Thanks.–
Mika Halttunen
@Mika_Halttunen

[…]

Grab it (and all of my other games) from
http://www.mhgames.cjb.net

Hey, those screenshots sure look great! Goes for all graphics on the
site and in the other games as well, for that matter. :slight_smile:

Drop me some feedback, at least if you like it! =)

PS. The Linux version isn’t working yet - and I need some help from
you Linux/SDL-gurus. Check the Formido’s page for details.

Well, I don’t have much time, but I’ll have a look at it…

//David Olofson - Programmer, Composer, Open Source Advocate

.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`---------------------------> http://olofson.net/audiality -’
http://olofson.nethttp://www.reologica.se —On Friday 07 February 2003 15.04, Mika Halttunen wrote:

Well, my Office Scan detected a trojan virus when I downloaded it. I wouldn’t advise others to check it out.

  • Joby
    http://jobybednar.com
    Give someone a program - frustrate them for a day.
    Teach them how to program - frustrate them for a lifetime.> ----- Original Message -----

From: lsoft@mbnet.fi (Mika Halttunen)
Reply-To: sdl at libsdl.org
Date: Fri, 7 Feb 2003 16:04:16 +0200

Greetings,
I just got my first SDL game uploaded. It’s called Formido.

Formido is one of those games, where you are loaded with some guns and you go
shooting different things. ‘Things’ in this case are big, ugly, - not green
though - alien insects. The idea is to kill as many of those bastards as
possible. Eventually they will overcome you, but struggle as long as you can.
There are some power-ups to aid you in your honorable quest. Keep in mind,
that those critters are rather tough and generally do nasty things when in
close range of any player-characters. If you have ever played any Phobia
games, you know what I’m talking about.

It’s released under the terms of the GNU GPL.

Grab it (and all of my other games) from
http://www.mhgames.cjb.net

Drop me some feedback, at least if you like it! =)

PS. The Linux version isn’t working yet - and I need some help from you
Linux/SDL-gurus. Check the Formido’s page for details.

Thanks.

Mika Halttunen
lsoft at mbnet.fi


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

could be a false positive> ----- Original Message -----

From: thebigcheese@jobybednar.com (Joby Bednar)
To:
Sent: Friday, February 07, 2003 9:27 AM
Subject: Re: [SDL] [ANN] Formido - a shooting game

Well, my Office Scan detected a trojan virus when I downloaded it. I
wouldn’t advise others to check it out.

  • Joby
    http://jobybednar.com
    Give someone a program - frustrate them for a day.
    Teach them how to program - frustrate them for a lifetime.

---------- Original Message ----------------------------------
From: Mika Halttunen
Reply-To: sdl at libsdl.org
Date: Fri, 7 Feb 2003 16:04:16 +0200

Greetings,
I just got my first SDL game uploaded. It’s called Formido.

Formido is one of those games, where you are loaded with some guns and
you go
shooting different things. ‘Things’ in this case are big, ugly, - not
green
though - alien insects. The idea is to kill as many of those bastards as
possible. Eventually they will overcome you, but struggle as long as you
can.
There are some power-ups to aid you in your honorable quest. Keep in
mind,
that those critters are rather tough and generally do nasty things when
in
close range of any player-characters. If you have ever played any Phobia
games, you know what I’m talking about.

It’s released under the terms of the GNU GPL.

Grab it (and all of my other games) from
http://www.mhgames.cjb.net

Drop me some feedback, at least if you like it! =)

PS. The Linux version isn’t working yet - and I need some help from you
Linux/SDL-gurus. Check the Formido’s page for details.

Thanks.

Mika Halttunen
lsoft at mbnet.fi


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Could be. Since I work for a computer game company… and my boss may not be too pleased with me if it is infected and I release it into our network… I’ll let you guys tell me what you think of it. :wink:

  • Joby
    http://jobybednar.com
    Give someone a program - frustrate them for a day.
    Teach them how to program - frustrate them for a lifetime.> ----- Original Message -----

From: atrix2@cox.net (atrix2)
Reply-To: sdl at libsdl.org
Date: Fri, 7 Feb 2003 09:41:56 -0800

could be a false positive

----- Original Message -----
From: “Joby Bednar” <@Joby_Bednar>
To:
Sent: Friday, February 07, 2003 9:27 AM
Subject: Re: [SDL] [ANN] Formido - a shooting game

Well, my Office Scan detected a trojan virus when I downloaded it. I
wouldn’t advise others to check it out.

  • Joby
    http://jobybednar.com
    Give someone a program - frustrate them for a day.
    Teach them how to program - frustrate them for a lifetime.

---------- Original Message ----------------------------------
From: Mika Halttunen
Reply-To: sdl at libsdl.org
Date: Fri, 7 Feb 2003 16:04:16 +0200

Greetings,
I just got my first SDL game uploaded. It’s called Formido.

Formido is one of those games, where you are loaded with some guns and
you go
shooting different things. ‘Things’ in this case are big, ugly, - not
green
though - alien insects. The idea is to kill as many of those bastards as
possible. Eventually they will overcome you, but struggle as long as you
can.
There are some power-ups to aid you in your honorable quest. Keep in
mind,
that those critters are rather tough and generally do nasty things when
in
close range of any player-characters. If you have ever played any Phobia
games, you know what I’m talking about.

It’s released under the terms of the GNU GPL.

Grab it (and all of my other games) from
http://www.mhgames.cjb.net

Drop me some feedback, at least if you like it! =)

PS. The Linux version isn’t working yet - and I need some help from you
Linux/SDL-gurus. Check the Formido’s page for details.

Thanks.

Mika Halttunen
lsoft at mbnet.fi


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Is this a self-extracting exe, or a single file exe with integrated
data? Either way, the scanner might be reacting on the fact that the
exe contains code for opening itself as a data file. That’s a really
rather common thing to do for virues, so detectors often assume that
they’re looking at unknown virus code.

Anyway, I suppose the source is safe (I’m on Linux) - but maybe I
should check the build scripts and the code, just in case? :wink:

//David Olofson - Programmer, Composer, Open Source Advocate

.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`---------------------------> http://olofson.net/audiality -’
http://olofson.nethttp://www.reologica.se —On Friday 07 February 2003 18.27, Joby Bednar wrote:

Well, my Office Scan detected a trojan virus when I downloaded it.
I wouldn’t advise others to check it out.

Hello David,

Friday, February 7, 2003, 7:46:11 PM, you wrote:

DO> On Friday 07 February 2003 18.27, Joby Bednar wrote:

Well, my Office Scan detected a trojan virus when I downloaded it.
I wouldn’t advise others to check it out.

DO> Is this a self-extracting exe, or a single file exe with integrated
DO> data? Either way, the scanner might be reacting on the fact that the
DO> exe contains code for opening itself as a data file. That’s a really
DO> rather common thing to do for virues, so detectors often assume that
DO> they’re looking at unknown virus code.

DO> Anyway, I suppose the source is safe (I’m on Linux) - but maybe I
DO> should check the build scripts and the code, just in case? :wink:

Just tested the GREAT simple game with awesome graphics on my box with
LATEST todays update for Antiviral Toolkit Pro which is the best
antivirus solution in the world. No viruses found, no suspections with
code analyzer enabled. Everything is perfect.

Mika, keep the great work!

And I’ll ask again - is anybody interested in supporting

http://sdl.lynx.lv ?–
Lynx,
http://dotNet.lv mailto:@Anatoly_R

While reading the posts on this newsgroup it occured
to me that people are using it to ‘promote’ their
games / libs etc… I don’t think this is the appropriate
newsgroup to tell about your new application / game.

I mean, if I want to know about new games and other
stuff I just check out libsdl.org or follow the newsgroup
of that particular project.

I hope people don’t mind me saying it but I am not
interested to read about people’s new projects in
this newsgroup. I would appreciate it if these kind
of postings would be discouraged.

I am curious if I am the only one who thinks this
way??

Regards,
Rob

PS. The Linux version isn’t working yet - and I need some help from
you Linux/SDL-gurus. Check the Formido’s page for details.

I’m hardly a guru, but I’ll add my 2c anyway.

There seem to be basically two warnings; lack of newlines on the end
of files (trivially fixed, but safely ignored anyway), and warnings
about implicit typecasts. As far as I can see, they can be ignored
fairly safely, but explicit typecasting might be better. (?)

As for the crash in the options, that’s easily fixed. The problem is
that you allocate a “buffer” of one character, and then use strcpy()
to copy a string into it. Obviously, this overflows the buffer, and
I don’t know why Windows is letting you get away with it.

Anyway, I rewrote the code (menu.cpp:148) to:

if(key != -1) {
	// Get the key name from SDL
	char *buf;

            buf =  strdup(SDL_GetKeyName((SDLKey)key));

	// Convert it to upper case
	for(unsigned int c=0; c<strlen(buf); c++) {
		buf[c] = toupper(buf[c]);
	}

	return buf;
}

and it runs fine on my system. Nice little game btw, aside from the
fact I’m not much good at it. I got up to 34 kills before dying as
my best effort. I could be missing the segfaults out of sheer luck,
though, so I’ll keep at it… :wink:
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20030207/a98bb418/attachment.pgpOn Fri, Feb 07, 2003 at 04:04:16PM +0200, Mika Halttunen wrote:

Hello delphiro,

Friday, February 7, 2003, 9:20:12 PM, you wrote:

d> While reading the posts on this newsgroup it occured
d> to me that people are using it to ‘promote’ their
d> games / libs etc… I don’t think this is the appropriate
d> newsgroup to tell about your new application / game.

d> I mean, if I want to know about new games and other
d> stuff I just check out libsdl.org or follow the newsgroup
d> of that particular project.

d> I hope people don’t mind me saying it but I am not
d> interested to read about people’s new projects in
d> this newsgroup. I would appreciate it if these kind
d> of postings would be discouraged.

d> I am curious if I am the only one who thinks this
d> way??

What’s the other place where you can talk about your SDL projects?
Official SDL site doesn’t report about updates of your masterpiece and
doesn’t report every single release. That mailing list is probably the
only place where you have a chance to show the app to the SDL world.–
Lynx,
http://dotNet.lv mailto:@Anatoly_R

While reading the posts on this newsgroup it occured
to me that people are using it to ‘promote’ their
games / libs etc… I don’t think this is the appropriate
newsgroup to tell about your new application / game.

Unless there’s an nntp/mail gateway that I’m not aware of, this is a
mailing list, not a newsgroup.

I hope people don’t mind me saying it but I am not
interested to read about people’s new projects in
this newsgroup. I would appreciate it if these kind
of postings would be discouraged.

Easy solution: If you’re not interested in reading them, don’t read them.

(Likewise, I’m not interested in reading pointless complaining, so I’ll
probably not read this thread any further. :)On Fri, Feb 07, 2003 at 08:20:12PM +0100, delphiro wrote:


Glenn Maynard

Well, I think most of us are somewhat interested in what people are
doing with SDL - especially if the code is available. However, there
is a list named SDL-announce. Problem is that you can’t comment on
announcements, unless you reply in private, or the replies are
redirected to another list, such as “SDL-projects” or whatever. If
the server is smart enough, it would set the reply-to only if it sees
that the annoucement poster is also subscribed to the SDL-projects
list. (Not much point in sending comments there otherwise.)

//David Olofson - Programmer, Composer, Open Source Advocate

.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`---------------------------> http://olofson.net/audiality -’
http://olofson.nethttp://www.reologica.se —On Friday 07 February 2003 20.20, delphiro wrote:

While reading the posts on this newsgroup it occured
to me that people are using it to ‘promote’ their
games / libs etc… I don’t think this is the appropriate
newsgroup to tell about your new application / game.

[…]

There seem to be basically two warnings; lack of newlines on the
end of files (trivially fixed, but safely ignored anyway), and
warnings about implicit typecasts. As far as I can see, they can
be ignored fairly safely, but explicit typecasting might be better.
(?)

Well, it’s safer, since when you see the warning, you will think
“Oops, I didn’t mean to do an implicit cast there!”

I always use -Wall -Werror, so the code won’t even compile if there
are warnings. If I’m really paranoid, I use splint.

As for the crash in the options, that’s easily fixed. The problem
is that you allocate a “buffer” of one character, and then use
strcpy() to copy a string into it. Obviously, this overflows the
buffer, and I don’t know why Windows is letting you get away with
it.

Maybe the suballocator has a block size granularity of some 32 bytes
or so, to reduce fragmentation?

It’s really rather common that these kind of bugs show up only on some
platforms. In my experience, working on multiple platforms helps you
find sleeping bugs, which saves time if you frequently test on at
least two platforms. The sooner you trip on a bug, the easier it is
to find, generally.

Anyway, ElectricFence catches most of these things instantly, so they
don’t cause crashes somewhere else about 5 mins later. (I love that
kind of bugs… Not.) Recommended!

//David Olofson - Programmer, Composer, Open Source Advocate

.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`---------------------------> http://olofson.net/audiality -’
http://olofson.nethttp://www.reologica.se —On Friday 07 February 2003 20.45, Michael Alger wrote:

Is this a self-extracting exe, or a single file exe with integrated
data? Either way, the scanner might be reacting on the fact that the
exe contains code for opening itself as a data file. That’s a really
rather common thing to do for virues, so detectors often assume that
they’re looking at unknown virus code.

Well, I tried it again and the download took far longer and without any warnings. I think the original download got interrupted and the fraction of the .exe that existed flagged some security settings. Sorry for the false positive.

Nice little game… though its a little difficult to control when you fire in one direction and run in another. I’d love to see more variety in maps, creatures, etc. A great little game to burn some free time on, though.

  • Joby
    http://jobybednar.com
    Give someone a program - frustrate them for a day.
    Teach them how to program - frustrate them for a lifetime.

I seem to remember something about windows malloc clearing memory that
was allocated whereas in linux it isn’t depending on whether or not
debugging was active, can’t remember at the moment…

But, I’ve had this same problem on Linux before with stuff I work on…On Fri, 2003-02-07 at 13:45, Michael Alger wrote:

As for the crash in the options, that’s easily fixed. The problem is
that you allocate a “buffer” of one character, and then use strcpy()
to copy a string into it. Obviously, this overflows the buffer, and
I don’t know why Windows is letting you get away with it.

Glenn Maynard wrote:

Unless there’s an nntp/mail gateway that I’m not aware of, this is a
mailing list, not a newsgroup.

There is. www.gmane.org

delphiro wrote:

I am curious if I am the only one who thinks this
way??

I agree. Everyone should post their announcements to dedicted forums
like gamedev.net’s announcement forum, or maybe some game developement
newsgroup. not here.

Cool. (But it’s still not a newsgroup, just a gated list. :slight_smile:

(Anyway.)On Fri, Feb 07, 2003 at 08:06:56PM -0500, Calvin Spealman wrote:

Unless there’s an nntp/mail gateway that I’m not aware of, this is a
mailing list, not a newsgroup.

There is. www.gmane.org


Glenn Maynard

PS. The Linux version isn’t working yet - and I need some help from
you Linux/SDL-gurus. Check the Formido’s page for details.

As for the crash in the options, that’s easily fixed. The problem is
that you allocate a “buffer” of one character, and then use strcpy()
to copy a string into it. Obviously, this overflows the buffer, and
I don’t know why Windows is letting you get away with it.

Anyway, I rewrote the code (menu.cpp:148) to:

if(key != -1) {
// Get the key name from SDL
char *buf;

            buf =  strdup(SDL_GetKeyName((SDLKey)key));

// Convert it to upper case
for(unsigned int c=0; c<strlen(buf); c++) {
buf[c] = toupper(buf[c]);
}

return buf;
}

Sadly, I don’t think this is much better than the original. The original
code was indeed writing into a 1-byte ‘buffer’, which it probably isn’t
allowed to write to anyway. (AFAIK, stating “” in C gets you a constant
string literal, and thus this shouldn’t be written into. It might not
even be writable memory at the time of execution.) But in avoiding this
problem., this new code contains a memory leak, in that it allocates
memory with that strdup call each time and never frees it. At a couple
of bytes a time, this is unlikely to be a big problem, but it’s still
Wrong! :slight_smile:

Assuming this application is single-threaded, the best solution is
probably to allocate a static char buffer inside the function, copy the
text into that, and return its address from the function. Make the
buffer a nice safe 128 characters long or so, and use strncpy (or is
that _strncpy?) to ensure that you never overflow that buffer even so.

If you’re multithreading, you don’t really want to use some sort of
static buffer; instead, add relevant ‘free’ calls after each call to
key_name() and make sure that it’s always returning a freeable pointer
(ie. strdup the constants too).

Or lastly, you could just set up your own array of keynames, populating
them at the start of the program by calling SDL_GetKeyName for
everything up to SDLK_LAST, changing them to upper case yourself, and
returning pointers to them instead.From: sdl@lists.rapacity.dyndns.org (Michael Alger)
Sent: Friday, February 07, 2003 7:45 PM
Subject: Re: [SDL] [ANN] Formido - a shooting game

On Fri, Feb 07, 2003 at 04:04:16PM +0200, Mika Halttunen wrote:


Kylotan
http://pages.eidosnet.co.uk/kylotan

PS. The Linux version isn’t working yet - and I need some help from
you Linux/SDL-gurus. Check the Formido’s page for details.

As for the crash in the options, that’s easily fixed. The problem is
that you allocate a “buffer” of one character, and then use strcpy()
to copy a string into it. Obviously, this overflows the buffer, and
I don’t know why Windows is letting you get away with it.

Anyway, I rewrote the code (menu.cpp:148) to:

[obvious memory leak]

Sadly, I don’t think this is much better than the original.

Yeah, that did occur to me after I’d gone to bed, but at the time I
was more interested in actually playing it, since it already looked
pretty impressive just in the main menu. :wink:

(AFAIK, stating “” in C gets you a constant string literal, and thus
this shouldn’t be written into. It might not even be writable memory
at the time of execution.)

I was thinking that as well – perhaps MSVC is putting the string in
the data area and thus doesn’t mind you trampling all over (and past
the end of) it, while g++ is leaving it in the program text area?

For any interested parties, a statically allocated 128 byte character
array seems to be more than sufficient, and doesn’t leak. :slight_smile:

Incidentally, does sdldoc.csn.ul.ie not exist anymore? I can’t seem
to resolve the hostname…
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20030207/5f0a3fc6/attachment.pgpOn Sat, Feb 08, 2003 at 01:58:11AM -0000, Kylotan wrote:

From: Michael Alger <@Michael_Alger>
Sent: Friday, February 07, 2003 7:45 PM

On Fri, Feb 07, 2003 at 04:04:16PM +0200, Mika Halttunen wrote: