?

Log in

No account? Create an account
Mar. 6th, 2014 @ 09:12 pm New project
Current Mood: busybusy
Tags: ,
I've started a new project in my free time -- as if I needed more things to do! Last time we played Pathfinder, there was a lot of stuff to keep track of during combat. We were level 8, which means there were a lot of circumstantial modifiers possible. During a few rounds, I got a +2 to hit and for damage because of the bard singing a Bardic Song of Inspire Competence, I was Hasted for 8 rounds, which gives me my first attack in full and gives me a +1 to hit, I had expended two charges of my Nine-fold Spirit Sword to gain Banish Undead (which adds 2D6 of extra damage against such a creature), I had used my Scabbard of Vigor to gain a +3 to hit and +3 to damage for 3 rounds, and I had Challenged my opponent, which gives me another +2 damage bonus.

Calculating all that three times per round (once for every attack, with the to-hit scores differing) is a lot of work, and you tend to miss one or two things.

So I thought I'd make a Pathfinder Combat Tracker: input your regular attacks, the circumstantial bonuses you could get, and let a machine do all the work! And because you'd want this in a handy form factor, it would have to be a smartphone app. And because I don't fancy coding for both iPhone and Android but would love for the app to work on both, I decided to make a HTML5 application for it.
It's been slow going -- mostly because my Javascript is quite rusty, because I haven't been building sites in earnest for seven years now. Coincidentally, I spotted a book in the 'library' at work that someone had gotten at a conference: Mobile Javascript Application Development. Just what I needed, so I loaned it.
I've decided on JQuery Mobile as my platform (a good excuse to learn about JQuery itself too), and so far, things have been going quite well. However, I didn't really think things through, so I have had to re-write lots of code when I got new insights.

It'll get done eventually.
About this Entry
ADM3A
[User Picture Icon]
From:andrewducker
Date:March 6th, 2014 09:12 pm (UTC)
(Permanent Link)
I find that with any new coding system I learn. It gets rewritten at least three times on the way.
(Reply) (Thread)
[User Picture Icon]
From:fub
Date:March 6th, 2014 09:14 pm (UTC)
(Permanent Link)
I think I'm on my third re-write, so perhaps that means I can actually finish it! :)
(Reply) (Parent) (Thread)
[User Picture Icon]
From:andrewducker
Date:March 6th, 2014 09:21 pm (UTC)
(Permanent Link)
Maybe. Have you decided to throw away your original framework and switch to Angular instead?
http://coenraets.org/blog/2013/11/sample-mobile-application-with-angularjs/

I only ask because that's what I did. Which slowed things down a fair bit :->
(Reply) (Parent) (Thread)
[User Picture Icon]
From:fub
Date:March 7th, 2014 09:10 pm (UTC)
(Permanent Link)
The book I used (after I had written a lot of code that sort-of did what I wanted to do but then in a browser) started off with JQuery Mobile as framework. And at work, the person(s) who are in charge of the web frontend chose JQuery, so I thought it would be a good opportunity to learn more about that too.
I could switch it around, but perhaps I'll do that for another project. Right now, I just want to finish it so that my itch can be scratched!
(Reply) (Parent) (Thread)
[User Picture Icon]
From:cissa
Date:March 14th, 2014 09:02 am (UTC)
(Permanent Link)
Interesting! How do you like the book? There's an app we've been thinking of making, but I haven't known where to start.
(Reply) (Thread)
[User Picture Icon]
From:fub
Date:March 15th, 2014 09:37 am (UTC)
(Permanent Link)
The book is interesting, but it won't learn you HTML, CSS, Javascript or even JQuery. It did point me to the existence of JQuery Mobile, and it does come with example code. The code can be downloaded from Github, so you don't need the book for that, but the explanation of the code certainly adds to the whole.
And of course, the code in the book uses already old and deprecated constructs in JQuery Mobile, because that moves so much faster than print.

What kind of app would you want to create?
(Reply) (Parent) (Thread)
[User Picture Icon]
From:cissa
Date:March 15th, 2014 08:41 pm (UTC)
(Permanent Link)
A LOOOONG time ago I did an online Celtic tree-based oracle using Javascript. I'm pretty sure I later translated it to CSS, but it's been many years.

J and I were thinking it'd be nice to do it as an app, and pick up a bit of extra money, maybe. Plus, app=cool!

He's more the programmer than I am, but I did do this one all by myself. I think I'd draft his help with app-ifying it, though.

Ideally, it'd run on various mobile devices, incl Apple.
(Reply) (Parent) (Thread)
[User Picture Icon]
From:fub
Date:March 16th, 2014 03:30 pm (UTC)
(Permanent Link)
If you already coded it in Javascript, you could try running it on the browser on your mobile device. If it works, then you could use PhoneGap to convert it to an app.
(Reply) (Parent) (Thread)
[User Picture Icon]
From:cissa
Date:March 16th, 2014 11:01 pm (UTC)
(Permanent Link)
Ooo! So cool!

I just tried it on my iPad- through a web browser- and it does work. I think I'd want to tweak it some for an app, though. However- if the basic functionality is there, that's a great start!

Thanks for the tips!
(Reply) (Parent) (Thread)