Puzzle AI?

Blitz3D Forums/Blitz3D Programming/Puzzle AI?

Caton(Posted 2016) [#1]
Kind of like this.



I'm using ai level commands but there's no list in blitz3d and need 3d view for adding objects.

Each command will appear in a listbox and there will be a button to add command and a button to remove a command


steve_ancell(Posted 2016) [#2]
AI can be done in many ways. If you mean AI as in movement, you could just declare a few user defined types as waypoints, store them in arrays and get the bad guys to follow them.

Unless you're on about something completely different of course.


Matty(Posted 2016) [#3]
Okay....looking at that video and thinking about your comment about AI I assume you mean the little bouncy starry things that float around the level.

The AI for those looks quite simple and you don't need an editor for it as such.

The map is grid based, meaning the location of open/closed cells can be determined with a simple 2d array such as dim maparray(maxx,maxy) where each element is simply 0 or 1 indicating open or closed.

The starry things appear to move in a straight line in a random direction (picked once) and when they collide with a wall choose another random direction to then move in. If they are moving along a cell with a wall as a boundary and they move to a cell with a 3-way entry point (ie a doorway) then they have a chance to change direction yet again...

It is very simple and does not require any editor with list boxes or buttons and i don't really see what such an editor would really add to a program that has movement like that above.


Caton(Posted 2016) [#4]
I was thinking the tiles could load from map data file and

objects music weather settings could use ai scripting

like using commands for example

create object
======
command number:4720
command argment0=object x
command argment1=object y
command argment2=object z


steve_ancell(Posted 2016) [#5]
You can load tiles from a data file. All you need to do is either make a map editor, or use someone else's, or code a parser that can make sense of a text file.


Matty(Posted 2016) [#6]
Well that can be done....but you would need to design it first. It all depends on what you want it to do.

Pen and paper design is your friend here. Write down what you want it to do. Think your way through what you want to achieve. Then implement.


steve_ancell(Posted 2016) [#7]
@Matty:

Yeah, I was coming from a point of view that assumes all the media already exists. ;)