GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

General Questions

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.
«1

Comments

  • KevinCrossKevinCross London, UKPosts: 1,893Member
    On your player ship instead of using timers and change attribute, try using contrain attributes. Same thing with setting position.X into breadcrumbX
  • harrywatsonharrywatson Posts: 61Member
    Tried GIMP? Just like photoshop but different. It's cross platform and free.

    http://www.gimp.org/
  • quantumsheepquantumsheep Posts: 8,188Member
    I'm just off to bed, so will keep this short.

    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: http://www.quantum-sheep.com

  • quantumsheepquantumsheep Posts: 8,188Member
    edited October 2013
    Ok, so not many responses :(

    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! :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: http://www.quantum-sheep.com

  • mystic 2628mystic 2628 Posts: 45Member
    I was taking a look at the AItest and saw that you were having the dragon move to the players X and Y with +20? Does this mean that the dragon will move to the players coordinates but will add 20 to the players coordinates? If so, then I could make the enemy pirate ship move towards the players' ship but to a random coordinate near him, like this? "Move to, game.PlayerX random(-20, 20) does it mean that the enemy ship will move to the players' ship but to a random coordinate within -20 or 20 of the players actual coordinate?

    Also, Unfortunately I'm on windows... Which automatically downgrades my version of gamesalad... However, does this "Pixelmator" software come on windows or Mac only?
  • mystic 2628mystic 2628 Posts: 45Member

    Tried GIMP? Just like photoshop but different. It's cross platform and free.

    http://www.gimp.org/

    Yes. I've tried GIMP. However' I've still got to learn it... I've been using GIMP shop because as I've been told the GIMP interface is horrible and someone out there hated it so badly that they overlayed the photoshop interface over it to make it easier to use. I'm generally looking to do a bit of extra, better looking font for text, as Gamesalad only gives you 6 types of font which aren't exactly pirate themed.
  • tatiangtatiang Posts: 11,734Member, Sous Chef, PRO, Senior Sous-Chef
    Breadcrumbs require the use of tables. Specifically, you can run a timer in the player ship actor that adds a table row to the end of a table and then changes the last row's column 1 value to self.position.x and column 2 value to self.position.y. The enemy ship would then comb through the table rows starting at the first row and as it targets/moves to the x & y position, it then deletes the first row of the table and moves on to the next row's position.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • quantumsheepquantumsheep Posts: 8,188Member
    tatiang said:

    Breadcrumbs require the use of tables. Specifically, you can run a timer in the player ship actor that adds a table row to the end of a table and then changes the last row's column 1 value to self.position.x and column 2 value to self.position.y. The enemy ship would then comb through the table rows starting at the first row and as it targets/moves to the x & y position, it then deletes the first row of the table and moves on to the next row's position.

    See? I knew someone smarter than me would know how to do it for ya ;)

    QS =D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: http://www.quantum-sheep.com

  • mystic 2628mystic 2628 Posts: 45Member
    Ok. Well now I gotta learn about tables...
  • mystic 2628mystic 2628 Posts: 45Member
    Also, While this topic is open, I thought I might as well ask about double clicks. I've been adding a free battle function to the game where you decide what type of enemy you want to fight, how many of them you want to fight and if you want to enable "God mode". I've made it so clicking on the Godmode checkbox places a green tick in it, however i'm not quite sure how to make it so when I click the box again it'll actually turn off godmode and remove the tick.
  • gyroscopegyroscope I am here.Posts: 6,577Member, Sous Chef, PRO
    edited October 2013

    Hi @mystic 2628

    Also, While this topic is open, I thought I might as well ask about double clicks. I've been adding a free battle function to the game where you decide what type of enemy you want to fight, how many of them you want to fight and if you want to enable "God mode". I've made it so clicking on the Godmode checkbox places a green tick in it, however i'm not quite sure how to make it so when I click the box again it'll actually turn off godmode and remove the tick.

    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

  • gyroscopegyroscope I am here.Posts: 6,577Member, Sous Chef, PRO

    Whoops, didn't upload.... try again...

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • StormyStudioStormyStudio United KingdomPosts: 3,987Member
    As Quantum Sheep said... great post especially for one of your first... sounds like you've got a good grasp of the basics already.

    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.
  • mystic 2628mystic 2628 Posts: 45Member
    tatiang said:

    Breadcrumbs require the use of tables. Specifically, you can run a timer in the player ship actor that adds a table row to the end of a table and then changes the last row's column 1 value to self.position.x and column 2 value to self.position.y. The enemy ship would then comb through the table rows starting at the first row and as it targets/moves to the x & y position, it then deletes the first row of the table and moves on to the next row's position.

    I've tried this for a while now, can you explain in a bit more detail about how to actually log coordinates to the table columns?

  • tatiangtatiang Posts: 11,734Member, Sous Chef, PRO, Senior Sous-Chef
    One of my students made a great maze game but it doesn't record your path so I started building it but including a "ghost" player. This is a very rough demo but it contains a recording and playback feature that will be helpful to you.

    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

  • mystic 2628mystic 2628 Posts: 45Member
    Has there been some kind of update for gamesalad? I can't open the Game Proj. file because it's newer than my version of GS...
  • jamie_cjamie_c ImagineLabs.rocks Posts: 5,538Member
  • mystic 2628mystic 2628 Posts: 45Member
    That would have been a very nice demo, but unfortunately I can't edit any tables in the file meaning that everywhere that a change is made to a cell value it replaces the code with "No editable tables exist in the project". So I can't see the code you've used for your table control...
  • mystic 2628mystic 2628 Posts: 45Member
    Also, I suppose I might as well ask about levels while i'm here. This pirate game that i'm creating is going to have 15 story levels as well as two other gamemodes. If I want to make 15 levels, i'm assuming I don't have to make 15 scenes? Or do I have to actually make 15 scenes?
  • jamie_cjamie_c ImagineLabs.rocks Posts: 5,538Member
    That depends on your game and how you want to handle it. Lots of people create a different scene for each level and others have created all their levels in one giant scene. It's up to you how you want to handle it.
  • tatiangtatiang Posts: 11,734Member, Sous Chef, PRO, Senior Sous-Chef
    The demo I posted was made with the stable build of GameSalad for Mac.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • mystic 2628mystic 2628 Posts: 45Member
    I'm on Windows. That's probably why...
  • mystic 2628mystic 2628 Posts: 45Member
    jamie_c said:

    That depends on your game and how you want to handle it. Lots of people create a different scene for each level and others have created all their levels in one giant scene. It's up to you how you want to handle it.

    Well, seeing as my levels are already enlarged, it'd have to be one big **** scene...
  • mystic 2628mystic 2628 Posts: 45Member
    Also, Is there any way to make a scene keep the same positions of objects that were in a different scene? Otherwise, there's gonna be a hell of a lot of things I have to place down in very precise places.
  • mystic 2628mystic 2628 Posts: 45Member
    And another question! Is there a way to make a player lose all control of the game? Because I want to make a small cutscene at the beginning of each level where the players' ship sails in from the side of the screen and then gives the player control. Rather than letting them control the cutscene...
  • tatiangtatiang Posts: 11,734Member, Sous Chef, PRO, Senior Sous-Chef
    (1) Sure, you can keep track of an actor's x/y position by copying the values to game attributes (change attribute game.XPosition to self.position.X) and then using those (change attribute self.position.X to game.XPosition) to force the actor to start there in the next scene.

    (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

  • mystic 2628mystic 2628 Posts: 45Member
    Sounds easy enough. Time to go spend an hour or two at it. Also, I've begun learning scripting and already I've started going ahead of the class because I seem to be able to translate some of Gamesalads simplicity into code form. For example i'm already experienced with "If and else" statements, which are used in code a lot.
  • mystic 2628mystic 2628 Posts: 45Member
    Ok. I've got all that down easily enough. Player control is working fine and the actors are spawning correctly on every scene, however, I think I managed to glitch the programming for my cannon fire system.

    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...
  • mystic 2628mystic 2628 Posts: 45Member
    7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777-777777777777777-77777777777777
Sign In or Register to comment.