« first day  last day (15 days later) » 

7:28 PM
whats up?
 
Hey
Ya I got two more question.
 
ok. shoot
 
First off all thank you for you time/explanation. I successfully created a wall class ^.^
Does it make sense to make an extra class for everything with the level creation/movement so the game scene will be more clearly?
 
depends
 
And right now the didBeginContact is only for player and zombie. But if i want to test the collision between the player and the door or the player and the key. New class with override or something different?
 
7:31 PM
if you think you are going to reuse it, then yes
 
No I want. Just when the player enters the door a new level should appear
wont
 
that was the answer to your 1st question
ok if I was designing your game
I would make door an item
so we have Class item
 
So right now i have it set like Objects -> Door | Wall | Pickable -> key
 
and in it you have 3 items right now Heart Diamond Door
I wouldnt even do that
when it comes to collision categories, you only get 32
so you dont want to learn how to waste them
instead you want to KISS
(Keep It Simple Stupid)
 
I heard that.
 
7:35 PM
so your player can contact 3 things. Walls, Items, Enemies
 
So Walls is a subclass of the SKSpriteNode?
 
I dunno what you make it
I would think yes
anyway when you are doing your contact check,
you only need to check for the three categories
but since we do not care about walls right now, you only need to check for 2 categories
(if you were doing something like spiked walls, then it gets involved)
so, we make a branch. basically if one body is a player, and the other body is an enemy, go to a method that handles this
else if one body is player, and the other body is an item, go to the other method that would handle this
then when you are in the desired method, you then compare the class
so if item is a Door, do door code, if item is a Heart, do heart code
 
ok. let me do the code for the setup and try the collision when done. If I can't do that probably I am going to ask you again.
Right now i was thinking in the future.
 
right now i need to figure out why it wants to get the override removed everywhere
 
7:47 PM
um, is this your wall class?
 
No it was in the game scene. I missed a } somewere
somewhere
 
Does it make sense to store the keys in an array(1 in every level and 50% chance to get two) like the zombies or walls?
 
how do keys appear
 
Like a node with an image on a free field on the playground
 
7:51 PM
no i mean logically
do you want enemies to carry keys
 
Player
 
are they just laying there at the start of the game
no the player has to get the key
 
Needed to open the door or a chest
 
if the player starts with a key that is pointless lol
 
He needs to pick it up
 
7:52 PM
yes
but how do they come into existence
 
by the game scene like the walls
 
so they appear in the beginning of the game?
 
Yes
 
then why store them in an array
just make it an item
and throw the item in the game
 
I don't know. Most of the code regarding to "bring nodes to screen" was copied but some tutorials.
 
7:58 PM
well once a node is brought to screen, you do not need another variable to manage it unless necessary
the class code should be handling that for us
 
Ok. Let me work on my own. You probably find afterwards a lot of code can be made easier.
 
sounds good
 
8:49 PM
Hello?
Let me give you the latest version
 
ok, what questions you got? I cant really get into your project now to see things
 
Well thats fine. we can do that tomorrow.
Its the question with the collision. I keep adding stuff.
 
tomorrow is the weekend for me, chances are I wont be actively available
 
Then on monday
 
ok so whats with the collission
 
8:54 PM
Nono its fine. I think it might take some time
 
ughh stop picking iphone 6 plus simulator if you are the one picking it lol
 
No i always run it on my phone directly.
 
your code doesnt even run
player doesnt exist when you are changing the label
 
Unexpectatlly found nil while unwrapping?
Just run it again. Worked for me
 
thats a problem
 
8:57 PM
Seriously do your job/free time now
 
i have a quick second
yikes your paths got tiny lol
 
Nah I appreciate it but I want to you to do your job or relax.
The paths are still the same :D
 
dude relax, i can quickly look at it, i just cant get into an hour session with any changes you made
no way, the paths are tiny
 
:P Well I did no changing with the paths. My question is. I have the code for the door and the keys in. How do i detect it.
Hoooly. Which simulator do you use?
 
that is 4s
 
9:01 PM
Use >= 5
 
well thats not good
 
4s is 4:3 and its made for 16:9. I know you already said my maths aren't goof
good
 
4:3 is still used on iPad
 
Its iPhone only :D
 
well then ipod touch
anyway
 
9:02 PM
thats a point. What about tv os?
 
I dunno what that uses, I would assume its based on your tv
but most tvs are 16:9 16:10
ok for the door code
 
Ya. I can try rewrite the code. I have the new apple tv to try it on
 
you know the line let player = blah blah blah
 
yes
 
we are going to turn all that into a new function
fun playerHitEnemy(firstBody as SKSpriteNode, secondBody as SKSpriteNode)
func*
 
9:06 PM
you mean: func playerHitEnemy(firstBody: SKSpriteNode, ...
 
dont just copy paste that
yes
 
ya
func playerHitEnemy(firstBody: SKSpriteNode, secondBody: SKSpriteNode){
let player = ((firstBody.physicsBody!.categoryBitMask <= secondBody.physicsBody!.categoryBitMask) ? firstBody: secondBody) as! MovingSprite
let enemy = ((firstBody.physicsBody!.categoryBitMask > secondBody.physicsBody!.categoryBitMask) ? firstBody: secondBody) as! MovingSprite
}
 
everything
from let player to bottom
 
last line should be } after the default
 
9:11 PM
yes
 
Now change your didBeginContact to now look like this
func didBeginContact(contact: SKPhysicsContact) {
let firstBody = contact.bodyA.node as! SKSpriteNode
let secondBody = contact.bodyB.node as! SKSpriteNode

let body1 = ((firstBody.physicsBody!.categoryBitMask <= secondBody.physicsBody!.categoryBitMask) ? firstBody: secondBody) as! SKSpriteNode
let body2 = ((firstBody.physicsBody!.categoryBitMask > secondBody.physicsBody!.categoryBitMask) ? firstBody: secondBody) as! SKSpriteNode
if(body1.physicsBody!.categoryBitMask = PhysicsCategory.Player)
{
if(body2.physicsBody!.categoryBitMask = PhysicsCategory.Zombie)
Your physics category should look like this now
struct PhysicsCategory{
static let Wall:UInt32 = 0x1 << 0
static let Player:UInt32 = 0x1 << 1
static let Zombie:UInt32 = 0x1 << 2
static let Item:UInt32 = 0x1 << 3


}
 
yes
 
in all the errors you see involving categorybitmask not existing
make them items
then when you go and make the playerHitItem function
you will be doing something like if(body2.isKindOfClass(Door))
actually if(secondBody.isKindOfClass(Door))
 
func playerHitItem(firstBody: SKSpriteNode, secondBody: SKSpriteNode){
if(secondBody.isKindOfClass(Door) && player!.keys >= 1){
player!.keys -= 1
//nextLevel()
}
}
and for every item the if?
I do know i have to do changes in the classes key/door/...
 
9:18 PM
Ok. Thank you.
 
yup
you will eventually want to do that for enemies
 
If i add skeletons?
 
well depends, if hitting an enemy does something different
like say you have blobs
 
oh ok
 
and hitting a blob slows you down
 
9:20 PM
I see you checked out the green foot project
 
How do you know there is a blob?
 
its a typical dungeon game
blob / slime
 
Ya...
 
thank dragon quest for that
 
9:21 PM
I love that game
Soon will be available on the App Store just 9.99$ (nah free)
 
I had a game on the app store, it is tentatively down till I renew my license
 
Wasnt it around 100$ for a year?
 
it still is $100 a year
 
I am assuming you can deploy to your phone because of a school license
 
9:23 PM
No
 
did you guys buy a license?
 
On xcode i logged in with my apple account.
no
 
how are you deploying to your phone then?
 
And then i need to trust the app on the Settings -> settings -> Profil
let me show you a video
 
son of a bitch
they changed their policy
 
9:25 PM
Hm?
 
Apple has changed its policy regarding permissions required to build and run apps on devices. Until now, Apple required users to pay $99/year to become a member of Appleā€™s Developer Program in order to run code on physical iPhone and iPads. As part of the new Developer Program, this is no longer required. Apps can be tested on devices, no purchase necessary.
 
no
you need to pay to release an app
 
ah ok. just to test it with xcode
?
 
but before, you couldnt even deploy to your phone without paying
yes
we wasted like $400, so far in renewing that thing just so we can test on our phones
 
9:27 PM
what about test flight? Can I "upload" it and if they give me the email they can download
 
I dunno
I would doubt it
 
I think it came with swift 2. Ah sadly so i won't be releasing the app. Hello antwane
 
just like things like gamecenter will probably need an account
 
I will try when its done. Or you can do it with your app
 
test flights been around for about a year now
I use test flight
 
9:29 PM
ok
thats why all free games have ads in them or inapp purchase
 
yes
tough to make money on ads
had an app out for a year
 
Me?
 
made $30
 
Oh ok
 
and you dont get paid till you hit $150
so it sits in limbo
 
9:31 PM
You need to make ads in reallife
 
no, you need people to download and play your app
you pretty much need a person to view 1000 ads to get a dollar off of them
 
oh so your app was pretty popular
what about the adds on the bottom being always there not just the 5sec videoclips
ads
 
no
those are the ads im talking about
the video clips are suppose to give more
but I never see it
 
Oh ok
 
the payout on ads are weird
 
9:34 PM
what was the game about?
 
its all based on how much money the ad campaign makes, then how it gets dispersed
you are a fish that gets launched into the air, and the goal is to stay in the air as long as possible
 
none. no one is going to buy something because there is a ad on the bottom of a doodle jump clone
bed time. See ya
 

« first day  last day (15 days later) »