• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Completed] Pokemon Day Care [iPhone 6/6s]

New Menu Style or Old Menu Style (see post #7)

  • Old Menu Style

    Votes: 7 13.7%
  • New Menu Style

    Votes: 44 86.3%

  • Total voters
    51

Impo

Playhouse Pokemon
2,458
Posts
14
Years
What about releasing it for iPhones users with jailbroken devices? You could reach more than 100 people.

That could be a possibility! I haven't considered distribution methods much, but that sounds cool!

-------​

On another note, I will be stopping progress for a little while to focus on my assignments cause holy hell I have a lot of assignments to do!

So far I need to implement these before the app will be playable:
  • Achievements
  • Leaderboard
  • Statistics
  • Actually implementing steps
  • Battles

There are also a couple of bugs
  • Locked areas can still be accessed

And I'm still unsure on how to implement the walking itself - but hopefully I will figure it out on the break!
 
772
Posts
13
Years
  • Age 35
  • UK
  • Seen Apr 1, 2024
The easiest way i've found for healkthkit steps is to have a helper class

Code:
import HealthKit

class HealthKitManager {
    let storage = HKHealthStore()
    
    init()
    {
        checkAuthorization()
    }
    
    func checkAuthorization() -> Bool
    {
        // Default to assuming that we're authorized
        var isEnabled = true
        
        // Do we have access to HealthKit on this device?
        if HKHealthStore.isHealthDataAvailable()
        {
            // We have to request each data type explicitly
            let steps = NSSet(object: HKQuantityType.quantityTypeForIdentifier(HKQuantityTypeIdentifierStepCount)!)
            
            // Now we can request authorization for step count data
            storage.requestAuthorizationToShareTypes(nil, readTypes: steps as? Set<HKObjectType>) { (success, error) -> Void in
                isEnabled = success
            }
        }
        else
        {
            isEnabled = false
        }
        
        return isEnabled
    }
    
    func recentSteps(date : NSDate, completion: (Double, NSError?) -> () )
    {
        // The type of data we are requesting (this is redundant and could probably be an enumeration
        let type = HKSampleType.quantityTypeForIdentifier(HKQuantityTypeIdentifierStepCount)
        
        // Our search predicate which will fetch data from now until a day ago
        // (Note, 1.day comes from an extension
        // You'll want to change that to your own NSDate
        
        let predicate = HKQuery.predicateForSamplesWithStartDate(date, endDate: NSDate(), options: .None)
        
        // The actual HealthKit Query which will fetch all of the steps and sub them up for us.
        let query = HKSampleQuery(sampleType: type!, predicate: predicate, limit: 0, sortDescriptors: nil) { query, results, error in
            var steps: Double = 0
            
            if results?.count > 0
            {
                for result in results as! [HKQuantitySample]
                {
                    steps += result.quantity.doubleValueForUnit(HKUnit.countUnit())
                }
            }
            
            completion(steps, error)
        }
        
        storage.executeQuery(query)
    }}

you can then use
Code:
HealthKitManager().checkAuthorization()
to check if the user has give you permission

the to get the steps i do
Code:
var stepCount = 0.0
HealthKitManager().recentSteps(yesterday!) { steps, error in
                            stepCount = steps
                        }

I do the work on the exp etc seperatily but you can do it instead of the stepCount = steps
the yesterday variable is a nssdate
 

Impo

Playhouse Pokemon
2,458
Posts
14
Years
The easiest way i've found for healkthkit steps is to have a helper class

Code:
import HealthKit

class HealthKitManager {
    let storage = HKHealthStore()
    
    init()
    {
        checkAuthorization()
    }
    
    func checkAuthorization() -> Bool
    {
        // Default to assuming that we're authorized
        var isEnabled = true
        
        // Do we have access to HealthKit on this device?
        if HKHealthStore.isHealthDataAvailable()
        {
            // We have to request each data type explicitly
            let steps = NSSet(object: HKQuantityType.quantityTypeForIdentifier(HKQuantityTypeIdentifierStepCount)!)
            
            // Now we can request authorization for step count data
            storage.requestAuthorizationToShareTypes(nil, readTypes: steps as? Set<HKObjectType>) { (success, error) -> Void in
                isEnabled = success
            }
        }
        else
        {
            isEnabled = false
        }
        
        return isEnabled
    }
    
    func recentSteps(date : NSDate, completion: (Double, NSError?) -> () )
    {
        // The type of data we are requesting (this is redundant and could probably be an enumeration
        let type = HKSampleType.quantityTypeForIdentifier(HKQuantityTypeIdentifierStepCount)
        
        // Our search predicate which will fetch data from now until a day ago
        // (Note, 1.day comes from an extension
        // You'll want to change that to your own NSDate
        
        let predicate = HKQuery.predicateForSamplesWithStartDate(date, endDate: NSDate(), options: .None)
        
        // The actual HealthKit Query which will fetch all of the steps and sub them up for us.
        let query = HKSampleQuery(sampleType: type!, predicate: predicate, limit: 0, sortDescriptors: nil) { query, results, error in
            var steps: Double = 0
            
            if results?.count > 0
            {
                for result in results as! [HKQuantitySample]
                {
                    steps += result.quantity.doubleValueForUnit(HKUnit.countUnit())
                }
            }
            
            completion(steps, error)
        }
        
        storage.executeQuery(query)
    }}

you can then use
Code:
HealthKitManager().checkAuthorization()
to check if the user has give you permission

the to get the steps i do
Code:
var stepCount = 0.0
HealthKitManager().recentSteps(yesterday!) { steps, error in
                            stepCount = steps
                        }

I do the work on the exp etc seperatily but you can do it instead of the stepCount = steps
the yesterday variable is a nssdate

That sounds like an amazing idea!

When I get a chance to work on it I'll definitely try that out!

thank you very much :)
 
772
Posts
13
Years
  • Age 35
  • UK
  • Seen Apr 1, 2024
That sounds like an amazing idea!

When I get a chance to work on it I'll definitely try that out!

thank you very much :)

Thats ok, i know i had a lot of trouble finding that information, think i pieced it together from several sources.
 

Impo

Playhouse Pokemon
2,458
Posts
14
Years
Okay I have finally updated the first post with the new screenshots!

I am still unable to work on the project itself unfortunately, but once I get a chance there is only a few things I need to complete to get a working app!

  1. Set the egg found and hatched dates
  2. Get the area selection working properly
  3. Properly integrate apple health steps
  4. Get the End Of Day sequence to work
  5. Data persistence between loads

The only thing that stumps me now is how to implement the end of day. I have written pseudo code and am pretty confident I can get the code itself to work - it is just the trouble of the timing of it. I want the End Of Day (calculating if an egg is found) at 10PM, but will this only happen when the app is open? At 10PM? What is the user opens the app after 10PM or the next morning? Will the app update with the steps and egg? If the app is shut will the user get a notification and will the calcs be done anyway?

I am hoping for the last one, that way when the user opens the app next they get the EOD storyboard if the next open is after 10PM or the next day.

I will have to do more research on that and data persistence for custom objects before any real progress is made!

I will upload the xcode project itself tonight, but it hasn't been commented :s
 
772
Posts
13
Years
  • Age 35
  • UK
  • Seen Apr 1, 2024
Okay I have finally updated the first post with the new screenshots!

I am still unable to work on the project itself unfortunately, but once I get a chance there is only a few things I need to complete to get a working app!

  1. Set the egg found and hatched dates
  2. Get the area selection working properly
  3. Properly integrate apple health steps
  4. Get the End Of Day sequence to work
  5. Data persistence between loads

The only thing that stumps me now is how to implement the end of day. I have written pseudo code and am pretty confident I can get the code itself to work - it is just the trouble of the timing of it. I want the End Of Day (calculating if an egg is found) at 10PM, but will this only happen when the app is open? At 10PM? What is the user opens the app after 10PM or the next morning? Will the app update with the steps and egg? If the app is shut will the user get a notification and will the calcs be done anyway?

I am hoping for the last one, that way when the user opens the app next they get the EOD storyboard if the next open is after 10PM or the next day.

I will have to do more research on that and data persistence for custom objects before any real progress is made!

I will upload the xcode project itself tonight, but it hasn't been commented :s


One way to do the EOD is log the last date/time the user last opened the app, then check if 10pm has passed
IE, log user at 19.28 - user then runs app at 22.30 - run eod
log user at 22.01 - user then runs at 22.49 - don't run

As for data persistence, take a look at core data
 

Z25

Team Player
1,800
Posts
11
Years
  • Age 26
  • Seen Aug 27, 2023
This looks and sounds incredible! Love the idea, and your doing great! Two things though:

1) Pokemon could still technically come in here and C and D you right now if they wanted, but that usually doesn't happen. And I hope it doesn't!

2)I'd change the name. Pokefarm is the name of a site where you collect and breed eggs as pokemon atm. Which I'm actually surprised is still running as they make money off it.... Anyway the owner is a pretty mean guy, to the point where he got the co creator to quit, and he cold see this and want you to change the name, or maybe go straight for pokemon. Again hope this doesn't happen, but I thought I'd warn you!

This project is great though!
 

Impo

Playhouse Pokemon
2,458
Posts
14
Years
One way to do the EOD is log the last date/time the user last opened the app, then check if 10pm has passed
IE, log user at 19.28 - user then runs app at 22.30 - run eod
log user at 22.01 - user then runs at 22.49 - don't run

As for data persistence, take a look at core data

Ah, thank you! I thought you would have the answer heheh!

This looks and sounds incredible! Love the idea, and your doing great! Two things though:

1) Pokemon could still technically come in here and C and D you right now if they wanted, but that usually doesn't happen. And I hope it doesn't!

2)I'd change the name. Pokefarm is the name of a site where you collect and breed eggs as pokemon atm. Which I'm actually surprised is still running as they make money off it.... Anyway the owner is a pretty mean guy, to the point where he got the co creator to quit, and he cold see this and want you to change the name, or maybe go straight for pokemon. Again hope this doesn't happen, but I thought I'd warn you!

This project is great though!

I hope Nintendo doesn't swoop in, I don't know why they'd need to to be honest!

Ah, I just looked up PokeFarm now, seems like what I'm trying to do but on a browser!
The game is actually called Pokemon Day Care in the app, so that may fix it ;)
I've been switching between the names for a while now, but I guess Day Care it will have to be!

So jelly of PokeFarm custom egg sprites
 
  • Like
Reactions: Z25

KurisuSan

Lord of Reality
46
Posts
9
Years
This looks amazing, too bad it's for iPhone ;-; would definitely play it on Android lol.

Back on topic. Love the idea, great concept as well as well as execution from what you've shown us. If you have any banners or support images I'd to throw one in my signature.

Also, why does Red have Green's Venusaur? Blue have Red's Charizard? and Green have Blue's Blastoise? ._.
 

Impo

Playhouse Pokemon
2,458
Posts
14
Years
This looks amazing, too bad it's for iPhone ;-; would definitely play it on Android lol.

Back on topic. Love the idea, great concept as well as well as execution from what you've shown us. If you have any banners or support images I'd to throw one in my signature.

Also, why does Red have Green's Venusaur? Blue have Red's Charizard? and Green have Blue's Blastoise? ._.

A support banner would be a marvelous idea! I should make some soon!

I have been engrossed in the manga lately, and when I started designing this I was up to the GSC chapters used the manga teams! This takes place in the manga world, because the manga storyline is 10x in my opinion :)

On the topic of progress, I have made none! sorry

Exams finish next week, so hopefully i will have time then

I wanted to make another poll to gauge the people who want to play this/ their devices, but I don't know how to change the poll haha
 
77
Posts
8
Years
  • Age 38
  • Seen Sep 16, 2017
Wanted to express my support for this project once again, since I know it's always important for the mental health of the creator to have supporters.
I must admit I probably won't have an iphone anytime soon, but this game/concept looks really great!
 

Impo

Playhouse Pokemon
2,458
Posts
14
Years
Wanted to express my support for this project once again, since I know it's always important for the mental health of the creator to have supporters.
I must admit I probably won't have an iphone anytime soon, but this game/concept looks really great!

thank you tankenka!

I haven't worked on the project for a while, mainly because I can't figure out the roadbumps I mentioned in the thread, and they have disheartened me :(

But I do have a developers licence now, and can access the health kit, so I may be able to make more progress soon, so that could be something

again, thank you for the support!
 

Impo

Playhouse Pokemon
2,458
Posts
14
Years
Undergone some major changes within the app - just to make things easier for myself!

Coming back from my large hiatus on the project, I've had a change of heart with what I want the app to do, especially since now Pokemon Go is out and available.

So this is solely going to be for egg collecting and hatching, based on your dailys steps.

Simulator%20Screen%20Shot%2021%20Sep%202016%201.18.38%20AM_zpserizpfsa.png

As you can see (hopefully) from the screen shot, eggs can be collected once a day, and that same time steps will be updated for you to spend on hatching and levelling pokemon.

And as the style suggests, only the first two gens will be available.

:)
 

Impo

Playhouse Pokemon
2,458
Posts
14
Years
Spoiler:


The app is now about 90% done, only a few more little fixes and one QoL fix and I think it will be playable!

Version 1.0 will be complete when these tasks are done
- save and load player data
- switching array elements with table view gesture
- constraints for collecting eggs and synching steps
--> fixing date for step and egg collection

After that I would like some testers to see if the level curve is too steep - more info on that when the time comes! Any visual feedback would be great on the new look of the app!
 

Impo

Playhouse Pokemon
2,458
Posts
14
Years
Version 1.0 Complete

SS6_zpspi3lfmt2.png
SS5_zpsh6ssxfqj.png
SS4_zps5sjxbem6.png

SS2_zpsezqbj8ud.png
SS3_zpsheqljpgh.png

In this version:
  • Collecting eggs
  • Walking and Evolving Pokemon
  • Buying Items
Known Bugs and Glitches:
  • None
Future Updates:
  • Gym Leaders and Badges
  • Pokedex
  • Event Pokemon
  • Statistics
  • Leaderboard
  • Achievements

Right now if anyone is interested I will be researching distribution methods that don't require the app store! Thank you for the support so far everyone!
 

Impo

Playhouse Pokemon
2,458
Posts
14
Years
wait... I thought this was gen 4 game rather than gen 2 based game

Initially it was, but I downsized the project for two reasons:
  1. The initial project was started without HealthKit entitlements, and it was difficult to add it mid project (it wouldn't let me run it on my phone for some reason)
  2. I'm a nostalgic fool
To be honest, now that I managed to get it working, i don't think it would be difficult to create the old one. The issues I had were much easier to understand with the scaled project. I could create the old one now with few hiccups.

To be honest, I've been looking for GSC style sprites of the later pokemon generations, but there isn't any good ones. If there were, I'd parse them in eventually!
 
1,805
Posts
7
Years
  • Age 30
  • USA
  • Seen Jan 15, 2024
well I'm sure you'll be able to find a spriter willing to do it. Start with the gen III and IV baby and new evos of Gen I and II and build up from there
 

Impo

Playhouse Pokemon
2,458
Posts
14
Years
well I'm sure you'll be able to find a spriter willing to do it. Start with the gen III and IV baby and new evos of Gen I and II and build up from there

I don't want to ask someone else to make them, but if there's GSC style sprites out there that I'm able to use I'll definitely parse them in when I'm able to!
 

Impo

Playhouse Pokemon
2,458
Posts
14
Years
Version 1.2 Complete

Simulator%20Screen%20Shot%2029%20Sep%202016%209.29.11%20PM_zpsyojdjcsp.png
Simulator%20Screen%20Shot%2029%20Sep%202016%209.28.56%20PM_zpsgl70yzri.png
Simulator%20Screen%20Shot%2029%20Sep%202016%209.29.19%20PM_zpshodfqf44.png

In this version:
  • Collecting eggs
  • Walking and Evolving Pokemon
  • Buying Items
  • Leaderboard of the 16 Gym Leaders, the Elite Four, the Champion, Red, and the titular characters
  • Collect the teams of the above trainers
Known Bugs and Glitches:
  • None
Future Updates:
  • Badges
  • Pokedex
  • Event Pokemon
  • Achievements
 
Back
Top