Math question

Get help using Construct 2

Post » Sat Jan 18, 2014 11:24 am

I'm a math teacher and I use Construct to make excercises for my students. The one big problem I encounter is a good display of fractions.

If I want to display 1/4 in a manner with the 1 above the 4, I have to make a line and two different textboxes or Underline the 1.
Both these options aren't really perfect and also do not look to good.

Anybody any idea how to do this in a more ellegant way??

Thanx!
B
18
S
2
Posts: 7
Reputation: 910

Post » Sat Jan 18, 2014 12:41 pm

Maybe a customised sprite font (ie replace all the capital letters with fractions ? So when you type "A" you would get the "" ? You would be limited on how many fractions you could use.
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,892

Post » Sat Jan 18, 2014 6:38 pm

It might be easiest to have 2 text boxes surrounding a sprite for the bar.

then you can account for any fraction question.
B
88
S
44
G
16
Posts: 1,009
Reputation: 17,971

Post » Mon Jan 20, 2014 8:13 pm

If you are still interested in this let me know because I've had another idea...(after about 2 hours in I am maybe 10% there ! Been distracted by other (easier) problems !)
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,892

Post » Wed Jan 22, 2014 10:09 am

I'm open to every idea.

The idea to replace letters with a fraction had crossed my mind, but it would be limited, since I would have to make all the existing fractions if I want to use them all. And since there are an unlimited number of fractions........

So I can't wait to hear your idea!
B
18
S
2
Posts: 7
Reputation: 910

Post » Wed Jan 22, 2014 4:01 pm

My idea was to have a function that (at least in version 1) would be sent a string of characters with formatting codes embedded in the string eg

~2 would mean that the 2 is the the numerator while #3 would mean the three was the denominator (2/3)

so if I sent "5X~1#2=x" then it would print as "5X=x"

This function would need to know the widths of the characters (using sprite fonts we could find these) Be able to print the characters at half size (with a line between them) (once again Sprite fonts should be able to scale)

Here is a start - and it is very rough - but maybe you could use it ?

The sprite font was from a tutorial by @Paradox - which I recommend you look at.

warning rough !

I intend to revisit this in the not too distant future - but I do get easily distracted !

Hope it, at least, makes some sense ?
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,892

Post » Wed Jan 22, 2014 6:56 pm

OK, pretty good start, but hard to understand in a simple glance. I will work some more on this, since I am freshly starting my exploration of Construct.
Thank you and if you have more ideas I'd love to hear them!

B
18
S
2
Posts: 7
Reputation: 910


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 42 guests