Jump to content
Ding

Coding a Hatchery

Recommended Posts

Well, using the API, one would at least be able to find lineage shapes like even-gen, stair, spiral. But scanning a whole scroll + every dragon's ancestors probably leads to quite some server strain.

 

What I'd like to do is an interface where I enter up to 3 codes: male, female, sample offspring, and select a breed for male and female (possibly from a drop-down box to avoid the infinituplety of spellings for each breed). Then the tool would display number of generations and each dragon's name, and lineage notes like "perfect checker", "alternating checker", "faux checker with silver Shimmer", "inbred checker" or even "would be a checker but refused 2016-02-02, need new mate". Basically, I've build something like that just last week as a spreadsheet which I would happily share if only google drive would work on this computer ... I'll get the link tomorrow at work if you're interested xd.png

I'll PM you with the thoughts I have so far. smile.gif

Share this post


Link to post

I was hoping I could get a little advice on interacting with the API and what is expected of a site before they can expect API access granted to them.

 

I have a lot of experience with more general aspects of website design, and I have been making a fansite mostly for my own amusement, but I have almost no experience working with an API. I was hoping to use the API but I haven't heard back about accessing it in over a week. That might be normal, I'm not sure. Do I need to do a 'beta' period of public run before the site is acceptable enough to use the API?

 

I wanted my fansite to be able to access View Count, Unique View and Click counts before 'launch' because I was hoping to have a few fun toys in there in addition to the normal hatchery stuff. Right now all the hatchery auto-detection (Removing adults, switching dragons to the egg section vs. the hatchling section, etc) is generated through imagery comparison, which accounts for most dragon aging, but not for frozen hatchlings, and detecting dead ones might pose a problem if any hatchling images are too similar to the dead image (vampires come to mind). If I need to do a beta launch before I can get API data, does anyone have advice for tools that I should consider to make a nicer API-lacking site?

 

Any advice on these elements would be incredibly appreciated! And by way of thanks, if anyone has coding questions regarding HTML, CSS, PHP or MYSQL I have several years of experience under my belt that I would be happy to share. I'm still shaky on Javascript, lol.

 

Share this post


Link to post

I have a lot of experience with more general aspects of website design, and I have been making a fansite mostly for my own amusement, but I have almost no experience working with an API. I was hoping to use the API but I haven't heard back about accessing it in over a week. That might be normal, I'm not sure. Do I need to do a 'beta' period of public run before the site is acceptable enough to use the API?

I think I ended up waiting for an API key for seven months or thereabouts, and submitted a request twice (possibly three times) in that time period. The last request was answered very quickly, though, so it might just be a question of when you catch TJ in a good moment? Er. I don't really want to encourage spamming his inbox, haha.

 

I dunno, though, keep an eye on it and resubmit after a few more weeks? smile.gif

 

I don't think you need a beta site, but I might be mistaken. The only data point I have is Daily Dragon Fix, which isn't even my site but emmilely's, and was originally coded with no API at all (and can still run independent of it, should something ever happen to the API or my access to it).

 

If you do want to make a beta site, frozen hatchlings tend to be a fairly insignificant problem (holidays notwithstanding, I suppose!) and in my experience don't really need addressing. That said, dead hatchlings just get a tombstone, which should be easy enough to differentiate to the vampire hatchlings if you're really doing an image comparison. Alternatively, maybe consider giving people the right to mark a dragon as fogged/dead/frozen/adult and keep a counter, unique by IP, as to how many people have marked the dragon, then kick the code out when e.g. five unique people have marked it. (That approach (except with user accounts rather than IPs) is what Daily Dragon Fix would fall back to if the API is not available.)

 

Hope that helps! user posted image

Edited by pinkgothic

Share this post


Link to post

Thanks for the information! I'll give it some more time, and then resubmit. There's still a lot of backend stuff to do so its not like I'm in urgent need of the API smile.gif

 

 

Share this post


Link to post

Would it be worth paying someone to code a Hatchery for me? I've always wanted to run a Hatchery, but have zero coding knowledge.

Share this post


Link to post

I'm not a coder, but I just don't see the point of running a hatchery if you can't do any of the upkeep on it. If you really want to run a hatchery, I would really suggest putting in time to learn at least some basic coding so you have a basic understanding of what is possible, can help with maintenance, etc.

Share this post


Link to post
I'm not a coder, but I just don't see the point of running a hatchery if you can't do any of the upkeep on it. If you really want to run a hatchery, I would really suggest putting in time to learn at least some basic coding so you have a basic understanding of what is possible, can help with maintenance, etc.

Oh, I didn't think of that. Thanks for the input! I'll maybe try to learn some coding. smile.gif

Share this post


Link to post
how about if someone posts a base code here to help others who don't have much knowledge on php/html ?

Probably because if you're going to be running a hatchery, you really need a good bit of knowledge about how to code it in the first place. When issues crop up, it'll really help you in figuring out how to fix them if you understand the code, and the best way to do that is to create it yourself. The tutorials on php/html in the first post should really help get you started on figuring it out, though. As well, reading through the thread might give you some insight on what goes into creating and hosting a site. =)

Share this post


Link to post

FYI

Seems there was an API change:  

    [errors] => Array
        (
            [0] => Array
                (
                    [0] => 7
                    [1] => Switch to HTTPS. HTTP may break in the future.
                )
        )

 

Replace occurrences of http://dragcave.net/api with https://dragcave.net/api 

Share this post


Link to post
17 hours ago, MaidMarian said:

FYI

Seems there was an API change:  

 


    [errors] => Array
        (
            [0] => Array
                (
                    [0] => 7
                    [1] => Switch to HTTPS. HTTP may break in the future.
                )
        )

 

 

Replace occurrences of http://dragcave.net/api with https://dragcave.net/api 

That error is more of a warning; you will still receive the full API response alongside it.

 

I've mentioned a few times in the past (i.e. when HTTP has broken in the past) that HTTPS is the future.

Share this post


Link to post

So, in light of this: https://forums.dragcave.net/topic/89465-list-of-active-fansites/?do=findComment&comment=9612515

 

The things I'm missing about EatW are:

 

- the fact that the inbred checker used the API's "massview" option (because that one's the only way to see if an egg is still in AP limbo - I wish there was another way, but there isn't)

- the scroll checker that filtered caveborn adult dragons

- the dragonmarket (with API login)

 

Anyone stepping up for any of these three features? XD

Share this post


Link to post

^^^

I also sorely miss EATW "tools" page: current Day/Night Glory drops, hatching times for Sunrises and Sunsets, Zombie visibility.

 

...although from my very limited understanding that might be way easier to code than the features Ruby Eyes listed?? *has no clue*

Share this post


Link to post

@Aleoleo

Day and Night Glory drops as well as the sun rising and setting can now be checked via this in-game page: https://dragcave.net/help/time

It would say "Time of Day It is day. The sun is rising." when Day Glories can be found/laid and Sunrises hatch.

It would say "Time of Day It is day." when Day Glories can be found/laid but neither Sunrises nor Sunsets hatch.

etc.

For zombie visibility, I suppose you'll have to check a Zombie?

Edited by Ruby Eyes

Share this post


Link to post
4 minutes ago, Ruby Eyes said:

@Aleoleo

Day and Night Glory drops as well as the sun rising and setting can now be checked via this in-game page: https://dragcave.net/help/time

It would say "Time of Day It is day. The sun is rising." when Day Glories can be found/laid and Sunrises hatch.

It would say "Time of Day It is day." when Day Glories can be found/laid but neither Sunrises nor Sunsets hatch.

etc.

For zombie visibility, I suppose you'll have to check a Zombie?

 

I actually never noticed the added "the sun is rising" sentence! That does help, thanks for the tip! <3

 

...although I still miss the handy "they will next be able to hatch in....." box-thing. Then I didn't have to think at all. XD

Share this post


Link to post

I don't know if it has been suggested yet, but would it be possible for a fansite to put an upper limit on the number of people being able to view eggs at any one given time? Like, maybe 100 users at once? Additionally, any user viewing eggs through a rotator should be kicked automatically after they've given one view to everything, so that other users can give their unique view to the little ones, too. I think that this (or any other appropriate number of users able to view) should be able to prevent further bot attacks like the one that happened to EATW while allowing our eggs and hatchlings to grow up at a reasonable rate. Win-win.

Share this post


Link to post

  • Recently Browsing   0 members

    No registered users viewing this page.