Server Help

Non-Subspace Related Coding - Air Power game (pre-release)

Smong - Tue Apr 18, 2006 8:03 pm
Post subject: Air Power game (pre-release)
Download latest version: airpower-0.4.3.zip (win/linux binaries + src)

Some of you may have already read my thread "Check your FPS for no reason at all", it's not required reading if you haven't already seen it:
http://forums.minegoboom.com/viewtopic.php?t=6186

I'm just uploading this so you can see how far I've got, this game is unfinished. There's a map editor included and you can import your own building graphics.



click for old pr3 screenshot.

Obviously if anyone has any problems or suggestions post here.
Muskrat - Tue Apr 18, 2006 9:50 pm
Post subject:
Hard to move screen around with dragging cuz if you drag over the ship boxes it wont move.
D1st0rt - Wed Apr 19, 2006 1:25 pm
Post subject:
Very cool, Smong.
Would it be possible to have a wb bomb where you double click on the map?

Also, I noticed that sometimes if you hit close to, but not on a building the colors invert
Cerium - Wed Apr 19, 2006 2:31 pm
Post subject:
Very cool indeed.

I notice though, that when you send two planes to a single target, and that target is destroyed by the first plane, the second circles the arena the building was for like 30 seconds.
Smong - Thu Apr 20, 2006 1:09 pm
Post subject:
Quote:
Hard to move screen around with dragging cuz if you drag over the ship boxes it wont move.
I'll have to check Generals to see how it handles scrolling when the mouse is over a tab.

Quote:
Would it be possible to have a wb bomb where you double click on the map?
Do you mean changing the rocket graphics to a L2 bomb? You can do this yourself but it won't be animated. I'm currently not planning on adding animation to the weapons.

Quote:
Also, I noticed that sometimes if you hit close to, but not on a building the colors invert
Each building has a normal and damaged graphic, I haven't made all the damaged graphics yet so I just inverted the colors.

Quote:
I notice though, that when you send two planes to a single target, and that target is destroyed by the first plane, the second circles the arena the building was for like 30 seconds.
I've only see this happen when you target an area near the airfield. What is your FPS?

The reason this happens is because each unit has a set of waypoints and knows which one is next. It can't progress onto the next waypoint until it passes within 32 pixels of it. However since the units have a turning circle (which gets larger as FPS goes down, due to the way updates are performed) they may end up accelerating towards a point, in otherwords flying in a circle. To overcome this if a unit does not reach a waypoint within 5 seconds the prox is increased to 64 pixels.

I'm planning to change this to a method where if the unit does not get any closer to the next waypoint, it will temporarily ignore its waypoint set and fly in a straight line for 1 second or so, hopefully this will give it enough distance to turn and face the waypoint head on.
Cerium - Thu Apr 20, 2006 2:16 pm
Post subject:
My FPS is 50-60.
Smong - Sun May 07, 2006 8:05 am
Post subject:
Interesting updates:
-SAM sites
-support for multiple runways (1 tab per runway)
-support for runways facing any direction (click and then drag in the editor)
-added a menu (lets you choose a map)
-added pause mode

Boring updates:
-new unit graphic
-new damaged building graphics
-buildings emit explosions when they reach half and zero health
-improved rocket targetting
-improved rocket splash damage
-updated demo1 map to show new features

I didn't change the scrolling or the waypoint code, although I do intend to improve these. I didn't add an L2 bomb since I'm going for a contemporary theme.

If anyone played Red Alert and can remember what it looked like when an allied AA gun fired on a plane please tell me. I know in RA2 there was flak but I can't remember what it was like in RA1.
Smong - Mon May 15, 2006 3:31 pm
Post subject:
Here are linux binaries for pr4. You still need to get the windows version to get the data files. While testing I noticed it sometimes froze, but returned to normal after a while. I get around 45 fps.

There's a slight chance both binaries are the editor tongue.gif
It's a long story, but the gist is as soon as I shutdown linux I forgot which make commands I typed.
Smong - Tue Jun 06, 2006 7:02 am
Post subject:
Interesting updates:
- New unit (stealth fighter) with a new attack weapon (bombs).
- New map (demo2).
- Added being able to scroll without holding down the mouse button (Muskrat).

Boring updates:
- Added win condition.
- Improved appearance of shot down aircraft.

Here's the stealth fighter being shot down in the new map:


Todo list:
- Campaign script, to link maps together.
- Terrain support in the editor. (Make it easier to lay close up roads without obscuring far away buildings in the draw order).
- B52 carpet bombers.
- More "building" gfx such as trees.
- Anything you guys want added (within reason).
Cerium - Tue Jun 06, 2006 1:03 pm
Post subject:
This is a cool little toy youve got going here. Im curious though, what is the goal of the project?
Smong - Tue Jun 06, 2006 1:27 pm
Post subject:
My original aim was to replicate the best bits from a CNC Generals mission where your primary weapon was sending in airstrikes. And on the side try and implement some cool effects.

I suppose Air Power will end up more like a puzzle game with a bruteforce option, for example which part of the enemy base should you target first and with what type of aircraft. I have thought about random map generation, but don't have any good ideas how to go about it.

It has been suggested to me that I add a "defend your base option", much like the popular flash game "Castle Defender". I see this happening as ground units attacking your airfields, with possibly some automatic ground defences. The main hurdle here is implementing impassable terrain.
Muskrat - Tue Jun 06, 2006 2:16 pm
Post subject:
The only thing I don't really like is the fact that you are stuck in 1 view where moving the screen is a bit of a pain, with no zooming or radar to assist. The scrolling seems to work inconsistently. Don't want to be anal about the controls but I think thats a major factor in making a game fun/playable.
Smong - Tue Jun 06, 2006 6:43 pm
Post subject:
How is the scrolling inconsistent?
I suppose you want the radar to be clickable?
Muskrat - Tue Jun 06, 2006 8:21 pm
Post subject:
Or just a Cont. style radar for targets...

When I scroll by moving the mouse off the screen, it will only go in one direction before I go back onto the screen and then off on another border.
D1st0rt - Tue Jun 06, 2006 10:51 pm
Post subject:
What I would really like is keyboard hotkeys that take the place of clicking on the plane icon so I can more quickly/easily launch an attack on a single spot
Smong - Wed Jun 07, 2006 3:51 am
Post subject:
@muskrat
Are you saying you don't like the way the mouse can leave the window and it keeps scrolling? You don't have to move the mouse completely outside the window to scroll, just near to the edge.

@d1st0rt
Hotkeys, hmm, you know this will make it easier to spam the enemy base? I suppose it won't be too hard to add this in.

@cerium
Are you still getting that weird "circle the target" for ever problem with the planes?
Cerium - Wed Jun 07, 2006 6:19 am
Post subject:
I think hes refering to the fact that when he moves the mouse out of the window, it scrolls in the direction he left the window at, but the tracking stops.
IE: The window doesnt scroll (or change directions) unless the mouse hits the region of the window where the scrolling starts, rather than checking the position of the mouse.

Something I dont udnerstand about the map editor:
It constantly tells me I have to select a building first, however the map has nothing on it yet and the arrow buttons appear to do nothing. Seems like Im forced to load a map to make one.

Also, no, I have not seen the waypoint problem again.





Few feature suggestions--
- Ability to queue actions, even if no planes are available for the specified type.
- Different airports for different planes.
- Some kind of point/money system, so even in its current state you cant just spam planes and win. Perhaps have each building type worth X points/dollars/whatever, and the repair/rebuild of each plane costs Y. If you run out of planes and cash, you lose.
- And of course, more "active" units. The Aurora Bomber from CNC Generals would be a nice addition.
Muskrat - Wed Jun 07, 2006 9:33 am
Post subject:
Smong wrote:
You don't have to move the mouse completely outside the window to scroll, just near to the edge.
Yes, but that is a very small area, and if you do go out, if you're moving the mouse too fast over that small area of the window it will not scroll. I don't know, maybe I'm just mousing too quickly.

And yes, that is what I meant Cerium.

I've gotten it to move diagonally, but I think the area is too small to be able to hit it when you need to.

I would compare this to having to use a D-pad and press the buttons lightly as opposed to using a joystick you can jerk around.
Smong - Wed Jun 07, 2006 10:08 am
Post subject:
So do you want a larger buffer around the edge of the window to make it scroll? I have experimented with "capturing" the mouse and trapping it inside the window, while it seems to work I'm not entirely comfortable with the method.

I've attached a large cheat sheet to help with the map editor.
Cerium - Wed Jun 07, 2006 12:52 pm
Post subject:
The cheat-sheet is nice and all, but I cant get anything to come up in the editor until one of the maps included is loaded. There seems to be no way to create a map from scratch.

As far as the scrolling goes: No need to capture the mouse until youre ready to make this thing go full screen. I would just check where the mouse is and determine whether or not you need to scroll (and direction) in the place where youre currently checking which way youre scrolling.
Smong - Wed Jun 07, 2006 1:05 pm
Post subject:
Ok, the building palette starts off empty, since the map format is designed to store the images inside it (not yet implemented, hence the maps directory contains images, not maps). So what you have to do is click the import image button (which I believe doesn't work in linux due to the 'open file dialog' thing), import some images and then you can start placing them on the map. The grass background gets added when you save.

Also the first airport you add is raptors, the second is stealth fighters. After that it just alternates (although looking at the code you are limited to 2 max).

For best results import images using the ss palette and use an advanced image editor to make sure the red is the same red as in the buildings that come with the program. This color gets palette swapped to blue if you change the team.
Cerium - Wed Jun 07, 2006 2:21 pm
Post subject:
Ok, I think I found a bug.

The waypoint issue has been fixed essentially, but with the stealth bombers, initiating it will get them to drop 3-5 bombs randomly before finally landing.

What Im doing, is having them attack a location to the immediate side of the airport, which will cause them to go into the circular loop for a while. During this time, they will periodically drop a bomb which sails into some building (typically, in this example, one of my own).

Took out half my own base with 2 bombers.
Anonymous - Wed Jun 07, 2006 8:50 pm
Post subject:
Should make some leet buildings with blender smong. sa_tongue.gif
Smong - Sat Oct 07, 2006 6:18 pm
Post subject:
Updates(?)
Changed scrolling to capture mouse.
Added a radar of sorts.
Added hotkeys to select the aircraft, press 1 or 2.
Added more detail to demo1 map.

Source is included along with windows and linux binaries.
Note: All development on this has practically ceased, I just wanted to release my tweaks and changes that were made since the last version.
Anonymous - Wed Mar 07, 2007 5:37 am
Post subject:
Update
Attempted to fix lockup (was caused by mixed usage of a now variable and calling current_ticks())

Attached updated game.c. (Also fixed some tab issues).
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group