Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Tactics
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Expirant




PostPosted: Thu Nov 02, 2006 10:03 pm   Post subject: Tactics

I've been working on this game since last weekend, and am quite pleased at its progress. The AI definitely need a lot of work, but I'm pleased at how 'flexible' some areas of the game are (especially all the constants you can change in the config.ini).

There are two scripts and two subscripts for AI. The scripts are 'charge' and 'hold' and the subscripts are 'shoot' and 'move'. Chargers chase you down, while holders rush for cover as soon as they can and try to hold that place.

The map can be edited if you want. While there is no way to make a new map or anything, you can change the properties of the existing map (the two numbers on each line are tile coordinates, so look at the number of tiles and place the trees and barricades (those boxes) accordingly)

I have also have yet to incorporate any sort of pathfinding for the ai, so I'm sorry if they keep shooting those trees angrily Laughing

Lend me some feedback as to how I could possibly improve it and what options I should add!

Thanks,
Expirant



Tactics_exe.zip
 Description:

Download
 Filename:  Tactics_exe.zip
 Filesize:  286.91 KB
 Downloaded:  174 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Expirant




PostPosted: Sat Nov 04, 2006 10:31 pm   Post subject: (No subject)

Just so anyone who wanted to try this game, the 'flexible' version is now the attachment in my previous post. I added a menu screen so the game doesn't start up right away, and there's a store as well (You can just change how much money you start off with in the settings file, but I liked the idea anyways). Keep in mind if you go into the 'AI Weapon' box from the 'Store' menu, you need to select a weapon for every single AI player in the game (or just click into blank space). They do default to semi-automatic rifle though I do believe.

Let me know of any bugs you run into (not logic errors, syntax plz. I already know the ai suck. Thank you!).

And if you can think of better user interface or a better menu, I suppose let me know as well, but my main concern is with getting the game to work like...a game.

Thanks again,
Expirant
ericfourfour




PostPosted: Sat Nov 04, 2006 10:53 pm   Post subject: (No subject)

That was pretty fun. It reminded me of a tank game I once made. It was deleted it so I can't post it but it was very similar. I think it would be easier to play if you had either the mouse click to fire or 'a' and 'd' rotate. One of the two or the current controls plus both would be even better.

Also, when I went to the store and selected teams I entered 5 and got an array subscript out of range error when I started the game (I already did 3 previous rounds and lost them all, I think).

edit: I just realized you could click to shoot.
Expirant




PostPosted: Sat Nov 04, 2006 11:07 pm   Post subject: (No subject)

About the teams thing...there are only four teams. I only made four colours of soldiers and figured anymore than that would be chaotic Smile

I actually had it so that 'a' and 'd' can make you rotate, but took it out so the mouse would do everything. The reason for this being that if you rotate only with 'a' and 'd', you're only able to shoot every 10 degrees (I pre-load the pictures into an array of 36, so 10 degrees each) I can put it back in, it'll just be tougher to hit anyone.
ericfourfour




PostPosted: Sat Nov 04, 2006 11:53 pm   Post subject: (No subject)

I think I understand what you are saying. It sounds like your gameplay is more dependent on the graphics than it should be. You should have the tanks angle separate from the images index (in the array of tank pictures).
code:
var tank_angle : real
var pic_index : int


Then you would need to be able to convert the tank's angle to the index in the tank picture array.

code:
pic_index := round (tank_angle / 10)


Then when the user presses the direction add or subtract the speed, based on the key, from the angle. After that make sure 1 <= tank_angle <= 360 and finally calculate the picture index.

code:
if key ('a') then
     tank_angle -= rotation_speed
elsif key ('d') then
     tank_angle += rotation_speed
end if
angle_check ()
calculate_index ()


Once you get to the rendering (drawing) procedure all you have to do is draw the picture with the index.

code:
Pic.Draw (pic (pic_index), x, y, picMerge)
Expirant




PostPosted: Sun Nov 05, 2006 12:04 am   Post subject: (No subject)

Hmm...I really don't know why I didn't think of that. I'll try and fix that up. Hopefully it goes well.

And I fixed a bug where changing the amount of soldiers after boot up and before starting the round would crash the game.
Silent Avenger




PostPosted: Mon Nov 06, 2006 7:39 pm   Post subject: (No subject)

You know you game reminds me of a flash game which is I think very similar to what you're trying to do. Here's the link to the falsh game if anyone wants to check it out: http://www.addictinggames.com/stickstrike.html
Barloq




PostPosted: Fri Nov 17, 2006 1:35 pm   Post subject: (No subject)

Uh... how do you move around? Or can you?
Sponsor
Sponsor
Sponsor
sponsor
Expirant




PostPosted: Tue Nov 21, 2006 9:26 am   Post subject: (No subject)

w - move forward toward mouse pointer
s - move opposite direction of mouse pointer
m.btn1 - shoot toward mouse pointer
Barloq




PostPosted: Tue Dec 05, 2006 9:22 am   Post subject: (No subject)

Thanks
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 10 Posts ]
Jump to:   


Style:  
Search: