I have rewritten Easy Math Challenge in Cerberus X and now the game is with sound again. In the video below, the music is added to the video and the sound effects are off. The video is made with my phone and it was not allowed to record the sound.
When you have solved enough puzzles, you’ll get into a resting screen where there is different background music and old school text scrolling.
The game is a good time killer while sitting for example in a train. 🙂
The year has started quite slowly for me.. Or has it? I’m again a full time student. That really slices quite a lot of hours of my day. At least I try to find time for my Android app Calculus. Some other projects are also in my mind.
Last summer I started coding a “space game” (I called it Androrace), but I lost my interest in it. Video below:
A try to code an update for Calculus as soon as possible.. Hopefully we’ll see some games too!
I’ve been on fever for several days now, when I’m writing this. Nevertheless, now Calculus is at version 3.2.0 beta. Finally saving to Pictures folder work properly — also in later (>=6) Android versions.
One new feature is also possibility to make y limits equal to x limits With this button one can get results like this:
The video below is recorder directly from my phones screen:
Let’s see if I manage to implement some new features to Calculus in near future.
I’d like to tell, why and what kind of bugs there were in my Android game Easy Math Challenge in its early versions.
The smallest bug was that there was “difficulty level 0”. If the user tapped somewhere else than the difficulty level buttons, the game gave “puzzles” like “3 = 3”. Well, those “puzzles” were always correct. This was fixed later.
The more annoying bug was, that in early versions the puzzles sometimes might be impossible.
The reason for that was, that I’ve used numbers also for the operations of puzzles. If for example + (plus) was 45, while calculating the result, the result got wrong so that 45 was part of the calculation numbers, not an operation. This was fixed later.
Video of the version 1.7.2 (no known bugs):
I wrote the program from scratch without any planning and often the usual mistake of mine: Work was done too at too late of hours.
I published recently initial version 1.0 of a calculusprogram called Calculus to Android. I have plans to publish PC version too, when the program is developed further.
The program differentiates and integrates user given polynomial and simplifies all the fractions. The coefficients can be 4 digits long. I haven’t given a limit to amount of terms in the polynomial, the available memory is the only limit.
The coefficients can be fractional too — and of course negative or positive. Next version will be out soon, which will improve some features of the program and add some features too. I’m not aware of any actual bugs in the program at the moment.
See below a demonstration video of the program (in the video Calculus is compiled to PC and used with the mouse):
Calculus is free educational program.
Notice that when integrating the polynomial, Calculus doesn’t give the integral constant.
It’s night when I’m writing this. I came up with a little Monkey X tutorial on how to program the bouncing of the ball, when it touches the bat in the “old school way” — like in the popular C64 game Krakout in the 80s.
In the video for the tutorial you can see, that as the ball touches the bat for the first time, delta y doesn’t change. This is because both the ball and the bat are uneven as height in pixels; now both the ball and the bat have a middle point.
This is just a short piece of code, that doesn’t handle the case, when the ball is at the horizontal top or bottom of the bat. There’s some extra work for anyone who wants to make an 80s style Krakout game. 🙂
The delta y for the ball is calculated simply how the ball’s y-position is related to the middle point to the bat. The “scale” variable is used to adjust the max y-speed of the ball.
Source code below:
Class MyApp Extends App
Field gfxBG:Image, gfxBat:Image, gfxBall:Image
Field scaleX:Float, scaleY:Float
Field touchX:Float, touchY:Float
Field prevTX:Float, prevTY:Float
Field ballX:Float, ballY:Float
Field ballDX:Float, ballDY:Float
' Load graphics
gfxBG = LoadImage("bg2.png")
gfxBat = LoadImage("bat3.png")
gfxBall = LoadImage("ball4.png")
scaleX = DeviceWidth() / 640.0
scaleY = DeviceHeight() / 480.0
ballX = 42
batY = 230
ballY = 230 + 36 - 8
ballDX = 2
ballDY = 0
prevTY = 0
touchY = 0
touchX = 0
touchY = 0
scale = 16
' The if-sentence prevents the bat to appear at bottom of the screen at the start..
If prevTY <> 0 Then batY = batY - (prevTY - touchY)
prevTY = touchY
touchY = TouchY()
touchY = touchY / scaleY
' Keep the bat in the borders of the screen
If batY < 0 Then batY = 0
If batY > 479 - 72 Then batY = 479 - 72
' Move the ball
ballX = ballX + ballDX
ballY = ballY + ballDY
' Keep the ball in the borders of the screen
If ballY < Abs(ballDY) Then ballDY = -ballDY
If ballY > 479 - 17 Then ballDY = -ballDY
If ballX < -Abs(ballDX) Then ballDX = -ballDX
If ballX > 639 - Abs(ballDX) - 16 Then ballDX = -ballDX
' Calculate the deltaY value for the ball in the "old school way"...
If ballX >= 601 - 16 And ballY + 16 > batY And ballY < batY + 72 Then
ballDY = -((batY + 36) - (ballY + 8)) / scale
ballDX = -ballDX
DrawImage gfxBall, ballX, ballY
DrawImage gfxBat, 601, batY
Feel free to use and improve the source above in your own projects.
Here’s the graphics to download (license: public domain), except the background picture (right click and save as…):
The bat is 32 x 73 pixels as size, the ball is 16 x 17 pixels.
For comparing to the C64’s popular Krakout, see the video below:
Many years ago I started to program Krakout style game in the spirit of the good old Commodore 64, but as usual, something went wrong. Three months work with multiple levels and a level editor programmed in Blitz3D were lost because I hadn’t taken backups of the files, when I, well, “fixed” the Windows installation I had at the time…