Rts

Would it be possible to make a real time strategy game with blender?
Are there any that people have made?
thanks

~Turin

I am sure it is possible, something like total annihilation would be easy to make.
Hard part would be to optimize it, so it ran over 5FPS.

You are correct Mmph!.

I’ve tried to make an rts, but with all the logic needed in a simple AI script, the game began to slow down with only 4-5 units on the scene, with 4 verts each…

I know one big field of game work is to reduce processing by having units share their AI, making maybe a dozen or more units drag only as much as 1 AI… dunno the details, but the concept fascinates me!

I’m working on one right now…sort of. It’s not an RTS in the traditional sense, but it is a real-time strategy game. So far it runs reasonably fast, but it’s not fully implemented yet.

Thanks guys.
Sounds cool PlantPerson!

~Turin

If someone succeed in making an GOOD chess AI in blender, he’ll have all my respect,
probably one of those rts wich must be pretty complicate to make

When I get some time off MGP, I’m hoping to make an RTS demo.

I want to mostly show how to create player, building, and camera controls that work. This should keep the demo at a playable speed while still being decently complex. Others have made pathfinding demos, but no one has really created a traditional RTS set-up.

This probably sounds noob-ish of me seeing as I haven’t really contributed much work to the community yet, but if we can get that MGP demo out soon (Christmas is the set date…sort of) then you will hopefully see that I have the means…ask johnyman…:wink:

~~Stu

Good luck. Ive been trying fo a while now, and creating multiples of the same units that can track to enemies seems almost impossable.

unless…

is ther a way to duplicate an object on the current layer? if so i can join that script with the new name script, and it might actually work…

I think the hard thing would be the AI.

@Mico27: Chess is an tbs not rts. Tbs being Turn Based Strategy, rts = Realtime Strategy.

I have plans to try to make an tbs/rts in the future. I’m thinking of giving each unit a unique ID once they are created so I can tell unit #34 to attack unit #14. That way I hope I’ll be able to handle multiple copies of each objects.

I tried chess as a RTS with a chess-savvy friend. Lot of fun, but alcohol helps :stuck_out_tongue:

Sim88

This is the script you’ll need in order to give each added object a different name:

first initiate variable i with this, attach it to an always sensor with pulse off on an object always in the scene:


GameLogic.i = 0

then attach this to an always sensor with pulse off on the character you will be adding:


import GameLogic
cont = GameLogic.getCurrentController()
own = cont.getOwner()

i = GameLogic.i
own.name = ("Cube" + str(i))
print own.name
# ^ check console to ensure the name is changing
GameLogic.i += 1

If you are using add object yo will still have the track to problem i am having (well, most of us are having). I would also copy this onto your computer before this thread becomes lost in the giant mess that is this forum (no offense Forum keepers!);).

Yah, I’ve got a couple of low-poly characters. I was doing a pathfinder demo this week, and I had about 7 characters with about 200 lines of logic, and it still ran at a descent frame rate.

here is the one I made for Cognis


#
#Dynamic Name Generator by Siegel
#

import GameLogic as G

C = G.getCurrentController()
O = C.getOwner()
actAddOb = C.getActuator('addOb')
senAKey = C.getSensor('aKey')
obList = G.getCurrentScene().getObjectList()
nameList = []

for ob in obList:
    addingObject = actAddOb.getObject()
    nameList.append(ob.name[:len(addingObject)])

if senAKey.isPositive():
    newName = nameList.count(addingObject)+1
    actAddOb.instantAddObject()
    actAddOb.getLastCreatedObject().name = addingObject+str(newName)

Nice Seigel, that will help a lot for multiple characters. Thanks!

~~Stu

Many thanks. That is a bit smarter than what I had in mind, but with the same result. Hopefully someone has solved track to problems when I have time to give it a try. Has a lot of 3D works for a more serious game to do first. And the deadline is approaching fast.:frowning: