# \[ANN\] Formido - a shooting game

**URL:** <https://discourse.libsdl.org/t/ann-formido-a-shooting-game/8226>\
**Category:** SDL Development\
**Created:** [February 7, 2003, 6:07am UTC](https://discourse.libsdl.org/t/ann-formido-a-shooting-game/8226 "2003-02-07T06:07:00Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![Calvin\_Spealman](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/c/ec9cab/32.png) [@Calvin\_Spealman](https://discourse.libsdl.org/u/Calvin_Spealman)\
**Post date:** [February 7, 2003, 9:03pm UTC](https://discourse.libsdl.org/t/ann-formido-a-shooting-game/8226/21 "2003-02-07T21:03:01Z")

</div>

> > > 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](http://www.gmane.org)  
> > Cool. (But it’s still not a newsgroup, just a gated list. 🙂  
> > Maybe its a gated newsgroup.

---

<div class="post-metadata">

**Author:** ![Matt\_Monson](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@Matt\_Monson](https://discourse.libsdl.org/u/Matt_Monson)\
**Post date:** [February 7, 2003, 9:57pm UTC](https://discourse.libsdl.org/t/ann-formido-a-shooting-game/8226/22 "2003-02-07T21:57:01Z")

</div>

ppl, get over it… no matter what anyone says, everyone is going to  
continue doing what he or she already was doing… and personally, i dont  
mind the announcments of new games, because they most likely also contain a  
link for download, and also request for testing / help or something, which  
fits into this mailing list, i think…

m@\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
The new MSN 8: smart spam protection and 2 months FREE\*  
[http://join.msn.com/?page=features/junkmail](http://join.msn.com/?page=features/junkmail)

---

<div class="post-metadata">

**Author:** ![Julian\_Peterson](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/j/cdc98d/32.png) [@Julian\_Peterson](https://discourse.libsdl.org/u/Julian_Peterson)\
**Post date:** [February 7, 2003, 9:59pm UTC](https://discourse.libsdl.org/t/ann-formido-a-shooting-game/8226/23 "2003-02-07T21:59:01Z")

</div>

> 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.

That’s kinda an icky solution (can’t store the result between calls to the  
function)… may as well use global variables =)

> 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).

That’s the better idea, and probably the least distruptive solution to  
what’s there already.

> 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.

Or since he’s using C++, he could use a string and take advantage of the  
copy constructor for returning the value.

Regards,

Julian.On Sat, 08 Feb 2003 2:58 pm NZDT, Kylotan wrote:

–  
The optimum committee has no members.  
– Norman Augustine

---

<div class="post-metadata">

**Author:** ![Mika\_Halttunen](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/m/6a8cbe/32.png) [@Mika\_Halttunen](https://discourse.libsdl.org/u/Mika_Halttunen)\
**Post date:** [February 8, 2003, 6:01am UTC](https://discourse.libsdl.org/t/ann-formido-a-shooting-game/8226/24 "2003-02-08T06:01:01Z")

</div>

Wow…  
I didn’t expect to get this much feedback (and code fixes) in one day =)  
Heh, it actually took me long time just to read all those replies…

I’ll try to answer most of the questions:  
About the virus stuff, I scanned my computer a few days before  
releasing the game and I was pretty sure it didn’t contain any viruses.  
When I read the first posts about a virus, I thought that  
“oh crap, how did it get in there!?” _sigh_. Good thing it was only a  
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.

Thanks. That’s one thing with gun pointing away from where you’re  
going - it’s a design thing just to make life a bit harder 😉  
I don’t think I’m making new maps or creatures, because it would  
require much work, and the game is just about what you said:  
burning some free time - it’s to be played in short periods. If I  
add too much features into it, it won’t be the same little game  
just for killing time.

The options crash was fixed when I tried a patch sent me by  
Jarmo Hekkanen (thank you). The key\_name() uses static arrays  
now and it works great.

> In the function move\_gibs() in critter.cpp, there is a problem with the  
> first case in your if statement.

Now the game play is stable, thanks to Julian Peterson.  
Jarmo Hekkanen also addressed this bug, though I haven’t  
tried his method, thanks to him too.  
I committed the same patch to move\_critters() too, because  
there was just the same problem.  
Wonder that Windows version hasn’t crashed for me (yet).  
I should probably patch it too, though.

Additionally, Tim O’Brien provided patches for all these problems,  
and he made the game grab the input on non-Win32 platforms  
(direct quote) “because I noticed some of the  
keypresses were not getting through to the game  
(for example if the window manager was using left  
ctrl key for something).”  
He also fixed one stupid bug in effect.cpp where I was using SCREEN\_W  
instead of SCREEN\_H. Thanks.

And thanks to Jarmo Hekkanen again, the +60 hiscore bug is now  
fixed.

Ok, I’d like to thank you all for your patches and feedback.  
I cannot fit all your names into the credits, so I will mention every single  
person who sent me a patch in the README. Hope that’s ok with  
every one.

I will try to fix the typecast warnings and make the Linux release available  
tonight or tomorrow (Sunday). I’m not going to make two separate versions  
(with and without music) like in the Win32-ver (to save disk space) but  
I’ll make the soundtrack available in a separate package.–  
Mika Halttunen  
@Mika_Halttunen

---

<div class="post-metadata">

**Author:** ![TomR](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/t/d2c977/32.png) [@TomR](https://discourse.libsdl.org/u/TomR)\
**Post date:** [February 8, 2003, 8:04am UTC](https://discourse.libsdl.org/t/ann-formido-a-shooting-game/8226/25 "2003-02-08T08:04:01Z")

</div>

gmane takes this list and turns it into nntp, and when you reply, it goes  
back to the list.  
it’s just a conversion service for mailing lists that want to be  
nntp-readable.

in fact, I originally tried posting my installation problem there, but not  
being a member of this list, my message required list-admin approval., so  
gmane is just a converter for this list to be in nntp format.

as to using sdl-announce, from [http://www.libsdl.org/mailman/listinfo/](http://www.libsdl.org/mailman/listinfo/) the  
description of sdl states that the developer list includes sdl-announce.

that said, it would be nice if there were separate “dev-help” and  
“look-what-i-made” lists, since I’m one of those people that prefers to  
segment my reading.\> ----- Original Message -----

> From: [calvin@ironfroggy.com](mailto:calvin@ironfroggy.com) (Calvin Spealman)  
> To:   
> Sent: Friday, February 07, 2003 11:00 PM  
> Subject: [SDL] Re: no ‘own project’ advertising for me…
> 
> > > > > 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](http://www.gmane.org)  
> > > > Cool. (But it’s still not a newsgroup, just a gated list. 🙂  
> > > > Maybe its a gated newsgroup.
> > 
> > * * *
> > 
> > SDL mailing list  
> > SDL at [libsdl.org](http://libsdl.org)  
> > [http://www.libsdl.org/mailman/listinfo/sdl](http://www.libsdl.org/mailman/listinfo/sdl)

[Previous page](https://discourse.libsdl.org/t/ann-formido-a-shooting-game/8226.md?page=1)
