2018 Challenge Missile Command

posted in Perrin Alain
Published January 04, 2018
PC
Advertisement

Yep, here is my contribution to GameDev 2018 Missile Command.

missile.thumb.png.b26413006add7ce9d0661f7235c421bc.png

The source code is inside the zip :https://github.com/wybifu/missile_command/archive/master.zip

github:   https://github.com/wybifu/missile_command

Windows users: Windows_version.exe

Linux users: Linux_version

or just compile it for any other OS.

language: C

library: SDL2

I feel that I have to explain myself as the code is awful: I was just writing as I was thinking when a new Idea popup I just hardcoded it and didn't care if it fits the rest of the code that can provide strange lines like:


if (((Agent *)(((Agent *)(a->ptr0))->ptr1)) != NULL)
                        ((Agent *)(((Agent *)(a->ptr0))->ptr1))->visible = BKP_F

YEAH !! Absolutely horrible.

a small video of gameplay :

another shootscreen for pleasure:

missile_1.thumb.png.c8fe49ed9644833f7d9006d8ea469292.png

6 likes 6 comments

Comments

Eck
Eck

Nice work. I like all the different kinds of turrets you can use. 

And don't feel bad about dirty code. In a game jam/challenge situation, it's not about academically correct code. It's about getting shit done and out the door. That said, it's usually a good exercise to go back and try and refactor the code into something more "correct". Developing that skill can help you go far in development. - Make it work.(hacky) Make it right. (clean) Make it fast. (optimize if necessary)

January 04, 2018 05:14 PM
lawnjelly

Was good. I tried it under my linux mint but it didn't seem to run, maybe some dependencies I didn't have (there are a load of dlls for the windows version)? But it ran fine under wine.:)

January 04, 2018 06:07 PM
lilington
5 hours ago, Eck said:

Nice work. I like all the different kinds of turrets you can use. 

And don't feel bad about dirty code. In a game jam/challenge situation, it's not about academically correct code. It's about getting shit done and out the door. That said, it's usually a good exercise to go back and try and refactor the code into something more "correct". Developing that skill can help you go far in development. - Make it work.(hacky) Make it right. (clean) Make it fast. (optimize if necessary)

yep, I tried to make a little bit like a tower defense. I don't think I will have to come back to correct the code, I am working on 2 other projects. but feel free to enjoy hacking it :)

5 hours ago, lawnjelly said:

Was good. I tried it under my linux mint but it didn't seem to run, maybe some dependencies I didn't have (there are a load of dlls for the windows version)? But it ran fine under wine.:)

It worked on Fedora and Debian, can you open it in a terminal and read the error? you have to install those dependencies:  SDL2,SDL2_ttf, SDL2_mix, SDL2_image.

Yeah, the windows version comes with all those DLL. but if you already have it on your system it should be ok.

January 04, 2018 11:05 PM
lawnjelly
9 hours ago, lilington said:

It worked on Fedora and Debian, can you open it in a terminal and read the error? you have to install those dependencies:  SDL2,SDL2_ttf, SDL2_mix, SDL2_image.

 

You were right I ran ldd on it and it said I had everything except SDL2_ttf mix and image. It might even be possible to static link SDL2 (when not making it as a package with dependencies)? (sorryI am linux noob lol :) )

January 05, 2018 09:01 AM
lilington
18 minutes ago, lawnjelly said:

You were right I ran ldd on it and it said I had everything except SDL2_ttf mix and image. It might even be possible to static link SDL2 (when not making it as a package with dependencies)? (sorryI am linux noob lol )

On Linux usually you just install the library, honestly static linking sucks, the exec will be huge for no reasons at all plus as gamer you should install sdl once for all. I don't know the package manager for linux mint, I can show you the command for fedora and just adapt it four linux mint

     #dnf install SDL2 SDL2_ttf SDL2_mix SDL2_image

for windows, i provided because it is not simple as it is on Linux to install.

I never been able to use a mac everything I do there is a failure so I just gave up.

January 05, 2018 09:30 AM
lilington

Just updated the sources, I forgot the specific power of the second tower, those who did downloaded, please do it again. Sorry

January 05, 2018 08:08 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement