General Questions
mystic 2628
Member Posts: 45
I'm a 14 year old developer, pretty experienced with Gamesalad as I've been using it for about 3 months now and it's really easy. Anyway, I took a look onto Unity3D, but I've got no idea how to do scripting, so I've decided to develop one properly good game before I try to script.
Anyway. I've been trying to create a pirate action game where two pirate ships shoot each other to bits in the sea. So far, I've got all of the players elements of interaction working just fine. Cannons fire, sounds play, stuff gets blown up, but now I have to program AI for the enemy ship.
I've decided to use three different AI states: Sailing, Chasing and Firing. Sailing is a basic pathfinder where the enemy avoids islands and the boundary. Shooting is also pretty basic, but for chasing, I've decided to use a breadcrumb AI technique where the player leaves invisible markers behind them every 3 seconds. I've been trying to make the enemy ship move towards those markers so he won't just give up on life and ram the players ship repeatedly (Yes, There will be ramming). But seeing as I can't say "Move to the breadcrumbs" I've turned to attributes.
I have a game attribute for the breadcrumb X and Y which I was hoping would be able to keep track of the breadcrumbs' position, however, I've got no idea how to actually log the value of an actors position into an integer attribute. My rules generally say "Every 3 seconds, change attribute "game.breadcrumb X" to "self.positionX" and the same with Y, But that doesn't work. How exactly do I constantly log the position of an actor into an integer attribute?
Also, Another question. What program should I be using to do some proper 2D artwork? Because so far I've just been using copyright free images on google images.
Anyway. I've been trying to create a pirate action game where two pirate ships shoot each other to bits in the sea. So far, I've got all of the players elements of interaction working just fine. Cannons fire, sounds play, stuff gets blown up, but now I have to program AI for the enemy ship.
I've decided to use three different AI states: Sailing, Chasing and Firing. Sailing is a basic pathfinder where the enemy avoids islands and the boundary. Shooting is also pretty basic, but for chasing, I've decided to use a breadcrumb AI technique where the player leaves invisible markers behind them every 3 seconds. I've been trying to make the enemy ship move towards those markers so he won't just give up on life and ram the players ship repeatedly (Yes, There will be ramming). But seeing as I can't say "Move to the breadcrumbs" I've turned to attributes.
I have a game attribute for the breadcrumb X and Y which I was hoping would be able to keep track of the breadcrumbs' position, however, I've got no idea how to actually log the value of an actors position into an integer attribute. My rules generally say "Every 3 seconds, change attribute "game.breadcrumb X" to "self.positionX" and the same with Y, But that doesn't work. How exactly do I constantly log the position of an actor into an integer attribute?
Also, Another question. What program should I be using to do some proper 2D artwork? Because so far I've just been using copyright free images on google images.
Comments
http://www.gimp.org/
I just wanted to say, in an as non-patronising manner as possible (as the sentiment is genuine) that I'm very impressed by your first post.
I will try and remember to check this thread tomorrow and see how you're getting on, but I will certainly be watching your career with interest!
Looking forward to what you come up with!
QS =
D
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
There's several ways you could do AI, and I guess the best thing to do is weigh them up and see what fits your style the best.
The real trick is that AI is *actually* a trick. It's very easy to make an AI that will always see the player, always shoot him accurately, always be able to track him.
The hard part is making it seem more 'human' - open to mistakes, less accurate but still challenging etc.
In Attack of The Kraken, I used Magnitude to determine the distance between the player and the enemy. When within a certain distance, an attribute was set to 'fire' and the enemy shot at the player.
In my upcoming Air Supply Infinite I have several states in my enemies that change based on a self.timer and outside events - this works pretty well, so I think you're on the right track with having different states for the enemy.
I've attached a quick file I made for you which shows probably the most basic way to do it.
The pirate ship is moved via touch. When the 'detection' circle overlaps with the dragon, the dragon will follow the ship.
In the 'otherwise' section of the dragon's rules, you could add some logic for it to patrol and, as you mentioned, avoid scenery.
Anyway, hope you like it - let us know how you get on!
QS =
D
EDIT: As to your question about doing 2D art, I can thoroughly recommend Pixelmator - it's available on the Mac App store, and is about $15 yet does pretty much whatever Photoshop can. Great tool to have!
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Also, Unfortunately I'm on windows... Which automatically downgrades my version of gamesalad... However, does this "Pixelmator" software come on windows or Mac only?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
QS =
D
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Hi @mystic 2628 Although the on/off switch I've uploaded here is for sounds/music, you'll easily be able to amend it for your purposes, I'm certain.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Whoops, didn't upload.... try again...
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Good luck with Tables once you've got used to working with them they open up a tonne of possibilities.
As for holding off on learning the scripting for Unity just yet, that seems like a tricky one to agree with. You could start learning scripting and be set with a useful skill for life. (plus your obviously picking up GameSalad quickly).. though GameSalad does give you a great foundation for learning a logical approach to game design and mechanics.
I look forward to seeing your game grow... who does'nt like shooting and ramming the enemy.
To play the game, click the white square and then navigate the mouse cursor through the maze to the blue square. If you touch a red wall, you'll have to start over. When you get to the blue square, keep the mouse cursor there in order to watch the replay.
The "record movement" actor and the "ghost" actor are what you'll want to look at as far as rules go.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Here's a breadcrumbs AI demo with Tables: https://www.dropbox.com/s/u4lm4mvqmto9r6v/Breadcrumbs AI.zip
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
(2) That's what booleans are for. Set one up called game.ControlPlayer and make it false. After a certain amount of time on the cut scene, change it to true. Have a rule in the player actor that says When attribute game.ControlPlayer=true --> [whatever controls you already have in place for keyboard, touch, etc.]
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
The conditions for the cannons to fire are:
If Playercontrol is true
If space Is pressed
If PlayerReloaded is true
However, the cannons seem to fire three seconds after the level begins even if none of the conditions are fulfilled... Space isn't pressed, nor is player control true, but the cannons keep firing after 3 seconds when the level starts...