It is currently Mon Dec 18, 2017 10:54 am

All times are UTC + 9:30 hours




Post new topic Reply to topic  [ 24 posts ] 
Author Message
 Post subject: Programming question.
PostPosted: Fri May 08, 2009 2:46 pm 
Offline

Joined: Sat Aug 02, 2008 12:14 pm
Posts: 110
Location: Montreal, Quebec, Canada
Hey, I have a few programming questions, how dificult would it be to implement directional facing in the customwars/crapwars/adhoccommander code. Also would it be possible to have fields of fire (artillery only shooting forward and diagonally to the direction it is facing?)

Would it be possible to program a function where buildings get turned into rubble as you shoot them and things inside get hurt. If so, how difficult would it be to program it intothe code.

Would we be able to program a function where units inside a transport get hurt?

Lastly, is it possible to make two damage charts independant of eachother based on movement, I.E, you do less damage as you move?

Would any of this be easy to implement?

Any of the good programmers, your opinions would be appreciated (not you jsr, you will just preach about how you can do anything with the customwars engine with answering the specifics =/)


Top
 Profile  
 
 Post subject: Re: Programming question.
PostPosted: Sat May 09, 2009 12:04 am 
Offline
User avatar

Joined: Tue May 08, 2007 6:19 am
Posts: 1363
1. I'm fairly sure if I wanted to I could do this, but out of all the things you suggested this seems the hardest (or, most laborous) one to implement. There is code for displaying units in different facings while they move but the facing is not saved anywhere and you would have to do lots of coding to implement all the effects.

2. Modifying terrain is pretty easy I believe, but I'm not sure what you mean by "things inside" getting hurt

3. It should be possible

4. Adding attack penalties after moving is not difficult and I think there may have even been a CCO that did something like this. I don't see where a separate damage table would need to enter the picture.


Top
 Profile  
 
 Post subject: Re: Programming question.
PostPosted: Sat May 09, 2009 1:10 am 
Offline
User avatar

Joined: Fri May 04, 2007 3:18 am
Posts: 520
Destin wrote:
Would any of this be easy to implement?

Any of the good programmers, your opinions would be appreciated (not you jsr, you will just preach about how you can do anything with the customwars engine with answering the specifics =/)


Okay, fine... I'll be more specific. :P I'll leave a slight description of what I think you mean, and even tell you how I'd go about doing it... :)

1) Hard- Directional facing. So when a unit moves down, it waits down. That shouldn't be too difficult to implement. It is a matter of adding 2 more .gifs for the waiting animation. You already have left and right stances for each unit. I'd change the wait animations to change every time a unit is moved. Probably am going to need more references to the images though. Images are nasty in the cw1 code, thus the hard rating...

1.5) Hard- You are speaking about the Black Cannon fire pattern. It is actually hard to implement cause of the way the cw1 code works. It was specifically made for regular movement, and not for Black Cannons or lasers. This is why I think inventions never made it into cw1. This requires a slight refactor of how the spread code works. Refactor is a quick word for... I have to redo a HUGE portion of code

2) Moderate- So, destructable terrain for cities. We already have destructable terrain, it is called the PipeSeam and Silo. I think it'll be easy to change the city into a pipeseam/city hybrid, so you can capture and fire at it, but I am unsure. This will require you to mess around with the pipeseam and turn it into code that resembles a city. It seems like a value change but I have no idea how the cw1 engine will handle it.

2.5) Really Hard- Units inside getting hurt. What, like unit garrison? This is kinda sounding like cities can act like Transports and hold units. Since unit garrison in cities hasn't been tried at all, I think it'll be the hardest to implement in this post. Units will have the choice to garrison or capture? This will require you to mess around with the cities and how they work. This will require a huge refactor of the code.

3) Fairly easy- The old style Transport units from SFW. This sounds like one of the easiest ones to do. Instead of just hurting the outer units. When a unit is damaged, search the inner units as well and give them the same amount of damage. Pretty simple for any engine

4) Easy- So the farther something moves, the more damage it does. Sounds like a CO Power or D2D... both of which are easy to implement in CW1. I really don't know why you'll need 2 damage tables... Unless it was unit specific or something. Just make it so the default CO has the ability to damage higher the farther he moves.

Hey, I can't help it if I am confident in our teams abilities. CW can do anything!!! :P

On a more serious note, just like trying to balance CW in the past, implementing stuff has the same disclaimer. I really don't know how easy or difficult something is until I've done it myself (just like we don't know what balance changes do to the game until you've actually tried them out). In theory, I might think something is hard, and it turns out to be really easy (or vice versa...) I will write down these ideas and consider them for the next remake of CW. Thanks... :)

JSR...


Top
 Profile  
 
 Post subject: Re: Programming question.
PostPosted: Sat May 09, 2009 2:50 am 
Offline
User avatar

Joined: Thu Sep 07, 2006 3:04 pm
Posts: 875
Checking to see if a unit has moved or not is used in Zandra's super for defense purposes. I'm not sure how you'd go about make things incremental though, as in if a unit moves 1 space it gets X bonus but at 2 spaces it gets X2 bonus.

_________________
AWBW; BHHQ; WC; WWN


Top
 Profile  
 
 Post subject: Re: Programming question.
PostPosted: Sat May 09, 2009 9:04 am 
Forgot to mention this wouldn't be for implementing into CW, just to use the CW engine for something else.

@Narts:
1: I see, it would be most difficult to make unit facings, and fields of fire based on facing. Ok well there goes the little design plan I had found in my notebook =P

2: The design document had a little concept where you can "garrison" a building. Since the game would have little capturing (if any), I figured infantry that end their movement in buildings would get huge defense bonuses. The building they stood in could be reduced to rubble by assault guns, or other means, which has the building (eg: 5 star defense --> 3star defense). Other options would be that if the building collapses infantry inside die.

3: Ok

4: If there is more than one infantry type, with different armaments, there would be different damages done if that makes sense. So a rifle sitting would do damage, running less damage etc. Submachine guns could be constant (damage stays the same if moving), and assault rifles the closer you get to the enemy more damage. That is where the different damage tables would come in.

@JSR, thanks for the indepth view of your thought process

1:It wouldn't just be based on movement, or people would get frustrated. More like a ffta style choice where after you move you can decide what direction to face.

1.5: I thought it would be easier to have directional facing and fields of fire. Everything in the game would have ranged fire, as in nothing direct (unless you got point blank). The best example I can give of an idea would be a assault gun (tank) having the field of fire of a normal artillery unit but halfed if that make sense.

Code:
---xx
--xxx
Txxxx
--xxx
---xx


2: Do we have code for the ruins from dor? Would it be a possible to have city-->ruin, based on a function of the pipe damage?

2.5: To make it easier, in my little concept sketch for the game, I decided early on that to be "Garrisoned" all you have to do is end a turn in a building.

Cities will give no funds, I decided that a long time ago. The only thing there would be to capture would be objectives, and the first player to get to it gets one some reinforcments of their chooice. One time use only.

3: Machine guns ripping through canvas and wood backed trucks would hurt the truck and infanty. Transports would give major mobility bonuses allowing people to redeploy their front fast, but there should be penalties. There might be multiple classes of transport though which would have different defence values on infantry inside the transport.

4: Reverse actually, most units get damage reduction moving. There would be exceptions to this so that the game wouldn't be a hundred percent stagnant. I'll explain in detail another day.


@Diamond Pheonix:
Like stated above, it would be a negative modifier.


Top
  
 
 Post subject: Re: Programming question.
PostPosted: Sat May 09, 2009 9:25 pm 
I just thought that the custom wars engine would work with it. Since I do not have any experience with java, I will just have to take all your words for it. Since I know you are all credible programmers that know what they are talking about I will beleive you.

I had assumed that directional facing could be done using artillery like range that cut off 3/4 of the field depending on the facing of the unit. Since that would have to involve the programming of directional facing it would be hard to implement. (I thought we had the mini rotating black cannons programmed into cw which is what lead to this idea).
This was obviously wrong thinking XD.

As for the destructable terrain, like jsr pointed out I was kinda hoping the terrain destruction could be based of the walls, and pipe seams code. I was also hoping that once certain seems break it would be replaced by other terrain tiles.

@Narts
It was supposed to be mostly infantry based, since the whole idea was to focus on tank riding infantry. That being said tanks would be part of the battle to help take out certain oppositions (for example assault gun tanks, tank hunters etc.) Being supported by infantry. Tanks would be vulnerable even to the most basic infantry with a formula that I had devised a while back but had no reason to propuse until now. There are a few other ideas but since directionality can't be easily programmed not mention the idea I have hasn't developed enough to warrant even trying to program directionality it wouldnt work =P.


Top
  
 
 Post subject: Re: Programming question.
PostPosted: Sat May 09, 2009 9:26 pm 
Lol, narts post dissappeared, but ya I thought about xcom in the past but implementing vehicles would suck >_<


Top
  
 
 Post subject: Re: Programming question.
PostPosted: Sat May 09, 2009 10:26 pm 
Offline
User avatar

Joined: Tue May 08, 2007 6:19 am
Posts: 1363
Ummm lol yeah realised this game doesn't resemble X-com that much after all and hoped no one noticed.

Actually sounds a lot like Valkyria Chronicles being a game mostly about infantry in small scale combat being supported by few tanks.

The directional part is not impossible btw, I only said it's "harder" than the other ideas because it would require more than a couple of lines of code here and there. I think it might even be easier to do if instead of the black cannon field of fire you would use a normal indirect unit FoF only cut in half, something like this (for artillery facing east):

Code:
...o...
...oo..
....oo.
...a.oo
....oo.
...oo..
...o...


This I believe would be mostly just a matter of adding a "if (facing==EAST && x>=0)" somewhere in the code that floods the firing range, though can't say anything with 100% certainty without actually peeking in there.

edit: as shown in this screenshot of the version of ahc I just hacked to do this >_>:
Image

edit2:forget what I said, I could do the black cannon thing as well


Top
 Profile  
 
 Post subject: Re: Programming question.
PostPosted: Sun May 10, 2009 5:43 am 
Sweet that only leaves a few more thing that I would actually want to implement.

i. defense based on directionality for tanks. Tanks would have the ability to fire in all directions assuming they are turret based, hull mounted have limited fields of fire. Non anti tank infantry assaulting a tank work as follows: The tank fires mg first (always strike first unless it is anti-tank firing), and the left over infantry if in base contact inflict damage. So a 10 man unit of strelkovy attack a piv, piv is a tank attacks first (mg damage kills I dunno, 6 men, in assault infantry hurt tank for 4 damage.)

The defense bonus would be applied to the direction the tank is facing, since all the tanks in the game will have thicker front armor. Or instead of defense maybe doing damage increase since most tanks had hull mounted mg's etc. Or mebbe both.

ii. more destructable terrain, one that blocks infantry, tanks, and other combinations. Barb wire could stop infantry (you can walk across it if you start your turn touching it), or engineers could destroy it. Also vehicles can run it over (assuming tread based)

Tank traps, infantry can use for cover tanks can't cross. Again engineers.

iii. Finally, since units won't be produced, having capturable objectives that influence the game would be cool. Maybe the ability to one time only build units out of certain captured buildings, or global bonuses for a turn etc.

I know this is probably annoying for all of you, I just had an idea and felt like pitching it/learning how I would go about doing the changes to the engine.

iv. Also forgot to mention, how difficult would it be to make maps that have their own tilesets? (Like instead of a normal city, like different sprites for the map, so for example having a 2x2 building that is different from many other different sized builings and same side buildings?


Top
  
 
 Post subject: Re: Programming question.
PostPosted: Sun May 10, 2009 11:37 am 
Offline
User avatar

Joined: Fri May 04, 2007 3:18 am
Posts: 520
1) That sounds complicated, given the way AW works to begin with. I don't even think CW2 will have that kind of support. I think we are crossing the border into games like Disgaea with ideas like this one, but I dunno. This game seems to be severely animation heavy and complicated.

2) Sounds like a good idea. I like the realism of it. As said before, we have destructible terrain already... but the cw1 engine might start doing weird stuff.

3) Like campaign triggers. I think it is a great idea, though depending on what kinds of triggers are needed, it could take a while to bring it together. The buildings working for a short time and global bonuses sound like triggers too.

4) Well, isn't that technically what the weather does in AW2? I mean, the normal tileset turns into the snow tileset... Or am I off. Sized structures are going to be a part of the game as well, though I have no idea what you mean by "having a 2x2 building that is different from many other different sized builings and same side buildings?"

Can't say I'm not interested in what you are after here. It sounds complicated, in a good way.

-JSR...


Top
 Profile  
 
 Post subject: Re: Programming question.
PostPosted: Sun May 10, 2009 12:07 pm 
Like I said earlier, this game was designed around using the cw engine. It would still be a lot of work =/

i: Well, narts showed that directional firing can be sorta done, so it would be a matter of time and expermenting figure it out. Truth be told though you guys are all doing your own thing so I probably will just go out and learn java to figure this out XP.

As for animation dependant. It doesn't really need animation. Don't get me wrong I would love to have infantry running around and shooting (I have all the sprites for aw battle animations and a spriter that would love to work on it, you might now him actually...) Game wise, the only important "animations", would be facing and movement ranges. Facing would just be a gun showing what the infantry have, so an assault rife would be an assault rifle, direction decided by the facing of the gun. Programming wise these would all be nightmares to program D:

ii: I can imagine the game having problems with sections of wires, and other terrain pieces. On the other hand maybe just having them act as barriers that you can pass on turns that you start in contact with it would be easier (have its movement valuse as such that you start next to it lol since you can't cross period XD).



iii. Like I said before, it would be using the cw engine as much as possible. So important structures could be coded as one time lump sums that you could buy 1-2 units with (mebbe one tank, or mebbe two infantry etc.) This would still be a trigger, but it could work.

Global bonuses would just be like scops/cops firing off only once. I guess I could have a co system where you cna inffluence what you get from that bonus.

iv. Err forgot about weather changes in my game mechanics lol. What I meant by buildings is more from a graphical aspect. instead of having for example 3 city tiles in a row that look all, well like 3 tiles of the same repeating unit, would it be graphically easy to have a 3 tile building? Essentially I just want to release a few maps for the game and that be it, no map builder. Does that make sense or should I draw it to make more sense?

If you think this is complicated I shouldn't get to the harder part then D:, I was going to start asking about multiclassing units. Would it be possible to have the code pick to seperate classes and merge them, or do you actually have to make a new class each time even if it were merging to differnt units =/.


Top
  
 
 Post subject: Re: Programming question.
PostPosted: Sun May 10, 2009 3:19 pm 
Offline
User avatar

Joined: Fri May 04, 2007 3:18 am
Posts: 520
Well, most programs all have a plan behind them. Like architects, we "build" these things from scratch from the ground up. (With a little bit of help from modules... otherwise we would need to make the bricks too :P) I mean, it isn't like things are impossible to program... it is just a lot harder if the program is already built. I know this is an obvious analogy, but is it easier to add a room on a house when it is already built, or when the groundwork has barely started. (If you don't choose the latter... :x ) So, since the CW2 engine is well... almost fully built... it makes it difficult to add new mechanics.

Remember the game plan I had a while back. It was severely important. That is when I wish these ideas came to light. If I had an inclination that we needed mechanics like the ones here, I would have been able to better guide the engine to accommodate them. Now, even though this is very creative... I feel somewhat powerless when it comes to the requests. I am hoping that the cw1 engine and Narts experimentation's will be extremely valuable as you proceed.
----------------------------------

1) So far, I've been ripping the sprites and organizing them into spritesheets myself. It is a lot of work and I'd rather be coding... but, it needs to be done so my question is this... Who is this mystery spriter?
-Each weapon having a different look is great, and as easy as changing the sprite the of the unit. There should be no worries there.
2) This idea is good. The only way I can see impassible walls working is if... they were all pipeSeams. Wasn't that the idea around walls anyway?
3) Well, it helps that your game won't have map customizations. If it did, I can imagine the nightmares... Triggers will work flawlessly if you have to do them per mission.
4) Well, there is a little of that in AW2. If you pile up a 2x2 forest, it'll change the forest into a 2x2 forest tile. I mean, technically, it isn't that complicated. (Anything to do with images usually isn't...) but it is the matter of knowing how big the picture is and the placement.
5? ) Multiclassing: That is all sorts of trouble in the cw1 code. Almost to the point of not being able to do it at all :(. If classes change simple values like firepower and movement. You may be able to get away with it. But, you'll have to be more specific on what you mean...

Sorry for the long post, but this is pretty interesting.

JSR...


Top
 Profile  
 
 Post subject: Re: Programming question.
PostPosted: Sun May 10, 2009 3:53 pm 
I guess doing the game from scrath would be easier after all. I guess we could use things learnt from all the different mods etc for a future pet project, or like I said I might just learn java and make this game in the future. I have a pretty good plan in my head just need to refine it a bit.

It will be the guards heavy tank division, fighting 71st sturmdivision.
2 player game, since there is no building the games would be faster and more intense.
There would be no map creator which means we would need to support the game with frequentish map releases.

____________________
1
He is a buddy of mine that I ran into when I was first becoming a spriter. The thing is, I actually know the real person and not the hundreds of thousands of assholes on the internet that pretend to be him. His username/screen name is pillboxphil:

Here is an old sheet of his work ( I need to go ask him for an update, especially with the units him and I worked on a bit). ?He is a world war II enthusiast and while he might not support the game he will definitly love making wwii sprites XD.

Still need to go ask him though should the occasion arise that I need something that he hasn't already sprited.

Image

That being said I have a strong feeling he wont turn me down =)

2 :D

3 Thats why I decided about it before. Also since I am a wwii buff I have hundreds of thousands of maps of the most critical battle in all of the war fronts. The idea would be to fight over mostly urban areas, where tanks can't go through buildings (only rubbles to restrict movement a bit) and that facing would be important. All out assaults would have to be planned since the mainstay of your army will be reduced in efficiency in running and shooting. Still need to flesh it out so it doesn't become one of those games where witting back means you auto win. That's where the specialist infantry and the objectives come in. =/ now that I think about it, it will need much more refinement =/

4: would it be possible just to make a map assigning the attributes to each square and then just hacing a drawing up?. Like make a blue print where buildings are coded and then just make the graphics indvidually by square?

5: Nevermind, I was thinking something along the lines of this.

Assualt rifles>Rifles in close range
Panzergasut>Tanks
Is it possible to have Assault/Fausts.

Then I realised I could just do that with damage charts right?

______
long posts make me happy, it means someone is putting some thought into my idea, and the fact you find it at least interesting makes me happy XD. If I don't get this game done ever, at least future programmers that may be attracted to customwars possible success will have better times doing what I wish to accomplish. Either way this is all hypothetical right now.


Top
  
 
 Post subject: Re: Programming question.
PostPosted: Sun May 10, 2009 5:22 pm 
Offline
User avatar

Joined: Fri May 04, 2007 3:18 am
Posts: 520
0.5) Well, technically, you'll need a map creator. But it shouldn't be accessible to the users.

1)Wow! PillBoxPhil's and your work is very extensive. I actually looked through all the sprites. They were very detailed and really nice. Is he still an active spriter?

4) Actually, yeah. That is exactly how you would do it. The movement animations (16*32) are a little bigger than the wait sprite animations (16 * 16), but you can still display them on the game just fine. This should be a walk in the park.

5) Of course. Damage charts will do that perfectly.

Documenting this is a very good step. Whenever you decide on a name for this creation, post it on the top page. :)

JSR...


Top
 Profile  
 
 Post subject: Re: Programming question.
PostPosted: Sun May 10, 2009 6:30 pm 
Thats all his work on that sheet, on one fo the more recent ones (think I deleted it while cleaning my computer) there are some of the things I made. We disagree on spriting on something, since he prefers keeping it aw cartoonish with the vehicle size, and I tend to sprite vehicles larger than the infantry. Either way he is one of my favourite spriters, (kosheh, tsu, narts, phil, and a few others I dare not name.)

I don't think I was clear with the building thing. Since I am much better at explaning through drawing I will show a little diagram of what I mean later.


Top
  
 
 Post subject: Re: Programming question.
PostPosted: Mon May 11, 2009 4:57 pm 
My last post was a bit bleh, but I had gotten some bad news just before it so I guess it makes sense that it was a bit of a mixed up post.

Anyway:

Image

Would it be possible to do something like this. The first diagram shows what the values of each square would be.

The second diagram shows it in terms of aw.

What I want to know is if I can make a map based on values (first diagram), but with custom graphics for each square so that I can base it off of more realistic looking maps of actual battles.

On a side note, my brother says I should call it moustache-kreig. I think I might just use that for a name for now.


Top
  
 
 Post subject: Re: Programming question.
PostPosted: Tue May 12, 2009 8:47 am 
Offline
User avatar

Joined: Fri May 04, 2007 3:18 am
Posts: 520
Yeah you could do that...

Since Inventions are allowed to take up more than 1 tile, it is possible to make anything take up more than 1 tile. It is even possible to have each tile serve a different purpose if need be.

JSR...


Top
 Profile  
 
 Post subject: Re: Programming question.
PostPosted: Tue May 12, 2009 11:32 am 
Each square would have defined function just different graphics. Like no two buildings will be the same but they will count as buildings.


Top
  
 
 Post subject: Re: Programming question.
PostPosted: Thu May 14, 2009 4:18 pm 
I will compile all this into a design document that can later be made into a game one day when we gain a million people and lots of popularity (read:never). So I will just make the document so that other people can draw inspiration from it.


Top
  
 
 Post subject: Re: Programming question.
PostPosted: Fri May 15, 2009 1:55 am 
Offline

Joined: Thu Aug 30, 2007 2:32 pm
Posts: 1575
hey if you want something done, the fastest way is to do it yourself, if the old CW is any indication


Top
 Profile  
 
 Post subject: Re: Programming question.
PostPosted: Fri May 15, 2009 2:08 am 
Offline
User avatar

Joined: Fri May 04, 2007 3:18 am
Posts: 520
Can't hurt to post up a design document, really... I would like to see it.


Top
 Profile  
 
 Post subject: Re: Programming question.
PostPosted: Fri May 15, 2009 2:38 am 
Offline
User avatar

Joined: Tue May 08, 2007 6:19 am
Posts: 1363
Doesn't need to be a full fledged doc explaining everything in detail, just a simple list of all desired features will do, so we can look at it and say if it's actually feasible as a whole. For programmers, implementing a feature can be as easy as putting two legos together, but ask them to build the Great Wall one lego at a time and it will never be done. So the big picture is important here, details can always be reworked.


Top
 Profile  
 
 Post subject: Re: Programming question.
PostPosted: Fri May 15, 2009 12:01 pm 
Offline

Joined: Sat Aug 02, 2008 12:14 pm
Posts: 110
Location: Montreal, Quebec, Canada
Been super busy with art lately, got a new tablet and been doing a lot of colorations for my friend I collab a lot with. Anyway I will sit down and think the game super thouroughly and from there right the important core mechanics that would have to be implemented, if I write down the core essentials it should be easy to tweak everything else once that is in place right?

Anyway I am going away for a few days starting tommorrow, so I guess it will be sometime mid next week before any documents are submitted.


Top
 Profile  
 
 Post subject: Re: Programming question.
PostPosted: Tue May 19, 2009 1:27 am 
Offline

Joined: Sat Aug 02, 2008 12:14 pm
Posts: 110
Location: Montreal, Quebec, Canada
Back from my small visit to my grandmother. Anyway talekd to my brother about the game all weekend and have some ideas. I will start compiling all my thoughts etc into a document, expect it to be uploaded sometime today.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ] 

All times are UTC + 9:30 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Blue Moon by Trent © 2007
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group