Qbasicnews.com
February 26, 2020, 02:14:16 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: 1 2 [3] 4
  Print  
Author Topic: computer game AI  (Read 10004 times)
momoguru
Forum Regular
**
Posts: 131



« Reply #30 on: August 22, 2003, 11:21:34 AM »

oh.....lol then u did beat the first campaign... unfortunately ... thats all there is at this point...lol

sorry, i totally misunderstood u



ps... would u mind doing another test for me next week... your comments help alot Smiley
Logged

url]http://qb45.think-new.com[/url]
Agamemnus
x/ \z
*****
Posts: 3491



« Reply #31 on: August 22, 2003, 11:25:28 AM »

I will, but only if you make it easier to move my units! It took me almost an hour to finish that game!
Logged

Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
momoguru
Forum Regular
**
Posts: 131



« Reply #32 on: August 22, 2003, 11:28:20 AM »

k, how would you like it to work. im up for ideas

yeah, me 2... about 48 min
Logged

url]http://qb45.think-new.com[/url]
Agamemnus
x/ \z
*****
Posts: 3491



« Reply #33 on: August 22, 2003, 12:06:43 PM »

Again, keyboard arrowkeys and keyboard selection (. for non-military and , for military are standard), and mouse target would be good. Smiley
Logged

Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
momoguru
Forum Regular
**
Posts: 131



« Reply #34 on: August 22, 2003, 12:54:47 PM »

yeah! "m" for move, and then arrows keys
and same for attack "a" and arrow keys
and same for heal "h", and fire "f" and charge "c"
maybe space bar is ALL WORK + NEXT DAY

think of any others?
Logged

url]http://qb45.think-new.com[/url]
Agamemnus
x/ \z
*****
Posts: 3491



« Reply #35 on: August 22, 2003, 01:42:31 PM »

. and , for cycling through units....
Logged

Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #36 on: August 22, 2003, 06:23:29 PM »

momoguru: Read this to avoid flicker: http://faq.qbasicnews.com/?blast=DoubleBufferingConcepts  Smiley
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
pr0gger
I hold this place together
*****
Posts: 775


« Reply #37 on: August 22, 2003, 06:41:42 PM »

[Whoa.  How'd I miss this thread?]

Heh.  You could say I'm actually sorta incapable for programming an RTS, since the only RTS I've played is Empire Earth, at a friends house... only once... but was addicted.  Smiley  

And... dude.... your graphics... DUDE!  Shocked


[/offtopic]

With DoC, what I eventually want to do is make it so that the game would learn from you... i.e., if you used a fighter to take out a tank (which cannot shoot very at air units), then the game would note that fighters work against tanks.

Or even more complex: That there are two major ways at breaking through enemy lines:

1- Overwhelming force, use only if you have superior numbers and crush opposition.  Very simple.
2- "Puncturing," that is, if you have less than your opponent, cluster your units and try to push through a place where enemy defenses are weaker.  An example: If your enemy has 100 tanks spread out over 50 kilometers, that makes a tank every 2 kilometers.  If you have only 20 tanks, and can cluster them all into one kilometer of space, you can easily push through two enemy tanks in the same area.

And attack plans: such as attacking a city; first: take out radar and tanks with helis, find some way to kill SAMs, etc etc etc...

But this all probably means nothing to you, given your game is Middle Ages based, and it didn't answer the question anyway.  A turn based strategy, I assume, would be more like programming chess, I guess.
Logged

size=9]"To announce that there must be no criticism of the president, or that we are to stand by the president, right or wrong, is not only unpatriotic and servile, but is morally treasonable to the American public." -- Theodore Roosevelt[/size]
Agamemnus
x/ \z
*****
Posts: 3491



« Reply #38 on: August 22, 2003, 08:54:17 PM »

radar...?

...

[offtopic]
Anyways, when *I* play Empire Earth in WWI/II, there are a few things I do to win with my tanks and air support:

1) Wall up areas..
2) Charge in with lots of tanks and artillery following, with one focus point for all my air fighter units... That way I don't need bombers... specialization is good.
3) Build up hospitals next to the battle..
4) Destroy everything in sight....

If I see something attacking my tanks that only has far range, I come close.... if it has close range I run away to me hospital line and start building me anti-air defenses....

[/offtopic]
Logged

Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
relsoft
*/-\*
*****
Posts: 3927



WWW
« Reply #39 on: August 23, 2003, 02:00:45 AM »

Momo: I'll send it to you on monday. ;*)
And Aga: It flickers. ;*)
Logged

y smiley is 24 bit.


Genso's Junkyard:
http://rel.betterwebber.com/
momoguru
Forum Regular
**
Posts: 131



« Reply #40 on: August 26, 2003, 03:35:58 PM »

new beta version:

PLAYER:
1) bishops can now heal friendly units
2) 'm' key initiates MOVEMENT
3) '<' , '>' scrolls thru friendly units
4) 'SPACEBAR' puts all workers to work and advances turn.
5) endturn screen now has world mini map
6) archer bug fixed
7) campaign maps display start campaign text
Cool player units only resupplie on player buildings
9) player starting resources are load from map file.

ENEMY AI:
1) bishops will seek and heal damaged enemy units
2) enemy units will seek buildings and resupply when low.
3) enemy units will retreat to enemy building when heavy damage is sustained.
4) enemy soldiers and pikeman will capture player buildings.
5) enemy buildings will produce units according to available resources.
6) enemy archers only attack in X

still polishing up the code and fixing graphics up here and there. i dont understand that setvideoseg tut, i need to study it somemore before trying to plug it in my code. but thanx nathan.

i updated the zip file with the changes, please feel free to test and give feedback. im really trying to bring my gameplay programming up a notch, so constructive critisism is welcome, and encouraged.

http://masula.com/qb45/kingsland.zip
Logged

url]http://qb45.think-new.com[/url]
Agamemnus
x/ \z
*****
Posts: 3491



« Reply #41 on: August 26, 2003, 05:49:03 PM »

"." crashes the game.

Again, I am STRONGLY advising you to use "," for military and "." for civilian. The way you have it now has no military/civilian differentiation and the shift key must be used.

Still no way to use keys to move units.

There is still no way to switch between units and buildings.

> and < don't work.
Clicking the work done button sets to work both yours and the enemy's units.

Number killed often exceeds number present.
Logged

Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
momoguru
Forum Regular
**
Posts: 131



« Reply #42 on: August 26, 2003, 08:14:39 PM »

make sure you replace all the graphics, cause ive added some, they may be causing the crash...

the , and . rotate the units, not buildings. i couldnt get it to crash with the . or ,

currently, there is no way to scroll through buildings... so should it be like?
, and . for military units and ; and ' for buildings, and [ and ] for workers i think that would work good. ?

ill add the keyboard for movement selection.

ill fix the ALL WORK button

ill fix the diceroll (where it says enemy killed) and cap it.

once again, thanx for the help... its very easy to overlook bugs when staring so close. ill post an update 2moro with these fixed.

did you test the AI, how was it?
Logged

url]http://qb45.think-new.com[/url]
Agamemnus
x/ \z
*****
Posts: 3491



« Reply #43 on: August 26, 2003, 10:24:36 PM »

Great!

About teh crash:

I just copied all the files over, i dunno.

About ">", "<", ".", ",": I think that you accidentally made the "<" and ">" keys "," and "." But! The game crashes sometimes by pressing them. Not sure why. Next time it crashes I'll try to remember what happened to make it crash.

EDIT

>and ; and ' for buildings, and [ and ] for workers i think that would work good. ?

With "." and ",", I'm going by the M$ standard here, which is often adopted. I'm not sure if there is a back mechanism, but how about shift+{button}? For buildings, I dunno what the (microsoft) standard is.... but I'll check it out.... (EDIT: there is no standard; each building has its own CTRL+bla combo.)

For the AI, I wasn't able to see any difference, but the scenario was way different this time. The extra units helped big time. I was able to squash the AI very quickly. The AI also seemed more peaceful when it comes to villagers attacking and killing military units. Smiley

Another EDIT

The waiting time in battles seems.. unnecessary.
Logged

Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
momoguru
Forum Regular
**
Posts: 131



« Reply #44 on: August 27, 2003, 09:24:16 PM »

man, i got alot done...

k, each unit now uses his move stat... so different units can move different ways.

AI villagers dont attack

'm' key bug fixed (thats what caused your crsah, not the ,.)

u can move units a single space with arrow keys (still working on extending arrow key movement)

[ and ] rotates thru buildings

All Work bug fixed (player doesnt effect enemy villagers)

terrain now effects bonuses in combat

attacker can kill more than the number of enemy present

and a few graphics here and there.

ill post a link when i get home
Logged

url]http://qb45.think-new.com[/url]
Pages: 1 2 [3] 4
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!