Author Topic: Quadratic Burd Solver  (Read 7425 times)

0 Members and 1 Guest are viewing this topic.

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Quadratic Burd Solver
« on: February 27, 2014, 10:38:39 pm »
Does your teacher hate it when you play Flappy Bird because you are not doing enough work?
Ever wish you could do your math homework while playing your favorite handheld game?
Ever feel solving quadratic equations is just too easy and boring?

Well look no further than the Quadratic Burd Solver.

Using the latest Quantum Technology, I have merged together both a Flappy Bird clone and a Quadratic Solver.

Score points to set your A, B and C variables.

Die three times to see your answer.

Supports imaginary values, because we all have ADHD and imaginary things are just SO much better :D

(Disclaimer, graphics are in progress)

Jokes aside, some known issues so far:

-You do not yet die when you go above or below the map
-Graphics are barebones
-Acceleration is a work in progress (if someone could supply me with getting the physics nailed down, that's be amazing)


So what are you waiting for? Download today and solve all your Flappy Bird and Quadratic needs!
« Last Edit: February 27, 2014, 10:50:04 pm by Scipi »

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Quadratic Burd Solver
« Reply #1 on: February 27, 2014, 11:03:49 pm »
Lol, now someone should do this for calcs. :P

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: Quadratic Burd Solver
« Reply #2 on: February 27, 2014, 11:05:37 pm »
I would have done it, but I don't know enough with Z80 or Axe.

Can do it for the Nspire, though.

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Quadratic Burd Solver
« Reply #3 on: February 28, 2014, 12:24:09 am »
My life... It's complete.
I'm not a nerd but I pretend:

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Quadratic Burd Solver
« Reply #4 on: February 28, 2014, 12:47:11 am »
How to run it btw? I get "A java exception error has occured" ???

Offline ben_g

  • Hey cool I can set a custom title now :)
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +125/-4
  • Asm noob
    • View Profile
    • Our programmer's team: GameCommandoSquad
Re: Quadratic Burd Solver
« Reply #5 on: February 28, 2014, 03:26:38 am »
How to run it btw? I get "A java exception error has occured" ???
Unzip it before running. Then it should work.
My projects
 - The Lost Survivors (Unreal Engine) ACTIVE [GameCommandoSquad main project]
 - Oxo, with single-calc multiplayer and AI (axe) RELEASED (screenshot) (topic)
 - An android version of oxo (java)  ACTIVE
 - A 3D collision detection library (axe) RELEASED! (topic)(screenshot)(more recent screenshot)(screenshot of it being used in a tilemapper)
Spoiler For inactive:
- A first person shooter with a polygon-based 3d engine. (z80, will probably be recoded in axe using GLib) ON HOLD (screenshot)
 - A java MORPG. (pc) DEEP COMA(read more)(screenshot)
 - a minecraft game in axe DEAD (source code available)
 - a 3D racing game (axe) ON HOLD (outdated screenshot of asm version)

This signature was last updated on 20/04/2015 and may be outdated

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Quadratic Burd Solver
« Reply #6 on: February 28, 2014, 04:43:15 am »
ROFL this is totally awesome. XD

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Quadratic Burd Solver
« Reply #7 on: February 28, 2014, 08:30:41 am »
What if you want to set one of the vars a negative value :P

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: Quadratic Burd Solver
« Reply #8 on: February 28, 2014, 10:15:40 am »
What if you want to set one of the vars a negative value :P

I'm probably going to have a flag to where you start going in reverse.

If I wanted to be REALLY evil, I'd do it as the difference between your score and high score :P

Edit:
How to run it btw? I get "A java exception error has occured" ???

You need to make sure you run the jar with all the contents of the zip file extracted. It needs both the lib folder and res.
« Last Edit: February 28, 2014, 10:17:23 am by Scipi »

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline JWinslow23

  • Coder Of Tomorrow
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 556
  • Rating: +43/-6
  • I make quality calculator games...when I have time
    • View Profile
Re: Quadratic Burd Solver
« Reply #9 on: February 28, 2014, 12:11:43 pm »
Genius! :D
Now, if only it prompted you "Positive or Negative?" in the beginning of each round and "Is this value correct?" at the end... ^-^
-Acceleration is a work in progress (if someone could supply me with getting the physics nailed down, that's be amazing)
Pseudocode I used for my game (assuming Y_Pos=0 is on the top):
Code: [Select]
Y_Pos = 0
Accel_Value = 0
bool Bird_Is_Flying = false
Repeat (collision(bird,pipe)) or (quit_game = true) or (Y_Pos < 0) or (Y_Pos > (max_y_pos))
//Replace (max_y_pos) with an actual maximum y position, i.e. the minimum y-value needed in order for the bird not to be visible
   If Bird_Is_Flying = true
      Y_Pos = Y_Pos - Accel_Value
      Accel_Value = Accel_Value - (constant1)
      //Replace (constant) with any constant, tweak to taste (and it must be bigger than (constant2) shown later)
      If Accel_Value <= 0
      //Less than or equal to 0
            Accel_Value = 0
            Bird_Is_Flying = false
      EndIf
   Else
      Y_Pos = Y_Pos + Accel_Value
      Accel_Value = Accel_Value + (constant2)
      //Replace (constant) with any constant, tweak to taste (and it must be smaller than (constant1) shown earlier)
   EndIf
   If (flap_button_pressed = true) and (flap_button_held = false)
   //Debounce it, or else you would fly higher than expected
      Bird_Is_Flying = true
      Accel_Value = (constant3)
      //(constant3) must be WAY bigger than the other two constants; the bigger it is, the higher the jump
   EndIf

//drawing, scrolling, and other stuff here

EndRepeat

//dying code goes here
Hope it helps!
Lol, now someone should do this for calcs. :P
If I could only get a quad solver for Axe, I'd already be ahead of everyone...
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: Quadratic Burd Solver
« Reply #10 on: February 28, 2014, 12:17:01 pm »
I'll take a look and refactor my code later on. Thanks ^_^

Why do you need a quadratic solver? The equation is simple enough.

Code: [Select]
private static void quadEqu(){
    results = new String[2];
    if(b*b - 4 * a * c >= 0){
results[0] = "" + (float)(-b + Math.sqrt(b*b - 4 * a * c))/(2*a);
results[1] = "" + (float)(-b - Math.sqrt(b*b - 4 * a * c))/(2*a);
    }else{
negRoot = true;
results[0] = "" + (float)-b/(2*a) + " + " + (float)Math.sqrt(Math.abs(b*b - 4 * a * c))/(2*a) + "i";
results[1] = "" + (float)-b/(2*a) + " - " + (float)Math.sqrt(Math.abs(b*b - 4 * a * c))/(2*a) + "i";
    }
}

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline JWinslow23

  • Coder Of Tomorrow
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 556
  • Rating: +43/-6
  • I make quality calculator games...when I have time
    • View Profile
Re: Quadratic Burd Solver
« Reply #11 on: February 28, 2014, 12:25:50 pm »
I'll take a look and refactor my code later on. Thanks ^_^
Thank you for considering. It works perfectly on my calc; it should work for you, too. ;)
Why do you need a quadratic solver? The equation is simple enough.
Floating point numbers in Axe Parser is not supported. :P I know how to do one; I just need help with actually "supporting" floating points (it's not possible in pure Axe). Otherwise, I got the game engine down if I wanna do it on-calc.
EDIT: Found a solution! It'll be in development soon.
« Last Edit: February 28, 2014, 12:42:53 pm by JWinslow23 »
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline Joshuasm32

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 142
  • Rating: +19/-7
    • View Profile
    • Network
Re: Quadratic Burd Solver
« Reply #12 on: March 01, 2014, 02:54:23 am »
The creator of FlappyBird removed it from the app stores, but a JS version of the game (with an HTML5 canvas) is still up on his web site at flappybird.nl - maybe the source code could help you with the graphics and such, considering that JS is pretty similar to Java or C++...
My name is Josh and I a developer at Moonzean. I enjoy Radiohead, web development, Java, and cryptograms.
Spoiler For No Surprises, by Radiohead:
A heart that's full up like a landfill
A job that slowly kills you
Bruises that won't heal

You look so tired unhappy
Bring down the government
They don't, they don't speak for us

I'll take a quiet life
A handshake of carbon monoxide

And no alarms and no surprises
No alarms and no surprises
No alarms and no surprises
Silent, silent

This is my final fit
My final bellyache

With no alarms and no surprises
No alarms and no surprises
No alarms and no surprises please

Such a pretty house
And such a pretty garden

No alarms and no surprises
No alarms and no surprises
No alarms and no surprises please