Sunday, January 26, 2014

Boxes

Added boxes as an option in the toolbar.

Background terrain

Previously it was like this:
Okay, pretend that there isn't a bar at the bottom.
But now it's like this:
Now there's more of an underground feel to it, which is nice.

Saturday, January 25, 2014

Thursday, January 23, 2014

Earthrunner main menu

Finally finished it.
Now I need to implement the other screens (only "start", which leads to the actual gameplay, works as a button fot now). Also screen transitions, particle effects, sound, death animations, and Google Play Services integration.

Tuesday, January 21, 2014

Lighting

I haven't updated in a while, meaning more than a few days. I've been working on stuff a bit here and there, but I think the main thing was lighting. I put working on the Earthrunner rewrite on hold a bit for this. There's still a few problems with it, but here:
edit: now that I've fixed a thing or two, here's a zoomed out view:
On my PC, this is still fairly playable, but further causes too long loading times and lag.

Thursday, January 16, 2014

Some animation

Reimplemented some animation into the Earthrunner rewrite:
I copy and pasted a lot of the code for animation from the old one, so I'm gonna need some cleaning before moving on. Really starting to look like the original game!
Task list now:

  1. Add game over screen
  2. Add HUD
  3. Add other UI stuff
  4. Add particle effect (for sliding)

Fixed some multithreading bugs

Yes, some popped up unfortunately. Hopefully I've killed them now.
I want some visual progress now, it feels like it's lacking.

Tuesday, January 14, 2014

Saving/loading

Took a short break from rewriting Earthrunner and got some of that done. Now great works of art shall never be lost.
Sometimes I have the maturity of only a middle schooler.

Monday, January 13, 2014

Some progress for Earthrunner rewrite

Added support for custom terrain texture, rewrote ball speed algorithm, added static (for now) background, and more GUI utility classes for myself (especially more control on resizeability, which libgdx and scene2d lacks).

Sunday, January 12, 2014

Character control

Well, I fixed the previous problem.
Now, character controls are pretty much good and in nice quality with responsive controls.
I think the next major thing I'll be working on for my Earthrunner rewrite would be reimplementing the art.

Saturday, January 11, 2014

It's slow

That's how it feels. I'm still working on implementing the new Earthformer library into Earthrunner. Currently, I'm stuck on trying to fix how the player gets stuck on the ground sometimes. I'm not sure what it is, it involves box2d, maybe it has something to do with friction.

Friday, January 10, 2014

Chasing Ball

Added (back) the ball:

To Earthrunner

Starting to look familiar...
 This is what the end product should look like:
So replace the art, add a chasing ball, a scrolling background, animation, gibbing, a HUD, sliding, a GUI, and a few more things, and I should be done rewriting the code for Earthrunner and on to adding a few more features and/or working back on Earthformer.

Thursday, January 9, 2014

Textures(!)

Woot, finished the texturing code. I dug through the code of a previous game I made (and the code was messy as hell, it was like exploring a jungle) and found and basically used the same algorithm.
Of course, I ran into some issues here and there; here are some of them:
Black. Caused by shader error.
I had barely any idea on how to get to the wanted result here; this is when I decided to dig through my old code.
 Final result. Downloaded textures from http://www.kenney.nl/ (I like his art; it's almost minimalist) and tweaked a couple of them to get the 3 textures for grass, dirt, and rock. I don't know if I'll be keeping them or not though.

The texturing is more difficult than it looks, or at least I did it in an unnecessarily difficult way.
For each triangle of the terrain, I assign each vertex a color of R, G, or B. If you render it, it'll be like this:
And for each vertex, I also basically assign the texture that corresponds to its element. So rock can be paired with R(ed), dirt with green, and grass with blue. Each color combination of R, G, and B of the triangle tells how much each of the 3 elements influence the final pixel. This means that the middle of the triangle would have a pixel that blends the 3 elements equally.
So yeah, that's how I did blending.
I think I'm going to attempt to implement my newly-written library into Earthrunner, the game I worked on and released as beta.


Wednesday, January 8, 2014

Toolbar-ish

That's going to be the toolbar for now. Oh yeah, I also added the rock element, which was easy.
I think I'll get into texturing now. I've just realized how difficult it's going to be (it's harder than it first seems), although I've had experience in this from a previous game I've worked on but never finished.

Tuesday, January 7, 2014

Dynamic terrain

The basics are done:
It'll be helpful if there are tools such as align, cubic (more accurately "squared"), etc. but if that's going to come, it'll be later. I think I'll make a toolbar or some sort now.

Monday, January 6, 2014

Not done but something





This is the basic sequence to start multiplayer for now; the UI is ugly, I know, but I'm not worrying about the "petty" stuff yet. That's after I'm done with the major framework and stuff.
Multiplayer is not even half done yet; I haven't even gotten into the core networking of sending and recieving messages and whatnot.
The problem is that I don't have access to 2 phones to test on, and that'll probably only happen on the weekends due to the situation I'm in. So if this is true, I'll have to work on something else meanwhile. I'm thinking of dynamic terrain: the ability to add and remove terrain, like Minecraft.

Sunday, January 5, 2014

Step back

Welp, looks like I have to create a main menu screen before I go on to multiplayer since I have to implement a login/logoff button for Google...

On to multiplayer

I'm planning to use Google Play Services to handle much of the multiplayer stuff (inviting, joining, connections), but I've never really done anything like it before.
For the previous stuff I've worked on (world loading, physics, etc.), it's worked fairly smoothly since I've had experience. But for multiplayer implementation, I have no idea how smoothly it'll go; it can take a day, a week, or I might switch to a different API or even completely give up on multiplayer support for my library.
We'll see.

Saturday, January 4, 2014

Player control

Finally added a controllable player.
The black is a placeholder; there's more important things to deal with for now.
Works on Android with a touchpad--a "soft" joystick-like thing in the bottom-left side of the screen.
After I organize the code a little bit more, I'm hoping to get into multiplayer.

Friday, January 3, 2014

Balls

Very frictional and bouncy red balls, to be exact. Yes, I've finally implemented physics.
I would have recorded a video or made a gif for this, but I don't know or have a very good program to record the screen, and more importantly, it's my bedtime. I ask you to use your imagination; close your eyes, imagine a beautiful landscape with clear blue skies, and now some happy, red, and bouncy balls.

So far

It seems like most, if not all, the multithreading stuff is dealt with. Again, PC ran finely, and even on Android it runs smoothly, no errors and even warnings (although one time it crashed with some ArrayList out OutOfRangeException, but it hasn't come up again since then). In fact, it runs so smoothly it's suspicious. Maybe I'm underestimating modern smartphone power.
I've finished integrating scene2d in libgdx (I haven't mentioned it before but I'm using Java and libgdx, it's great) in the things programmed so far, so maybe it'll be easier to program more stuff later.
So now that multithreading seems to be out of a way, it seems like a large burden is off my shoulders.
Plans now:
  1. Integrate basic physics with Box2D
  2. Create a contollable player
  3. Multiplayer support
I might be getting ahead of myself, especially with #3. I have experience with the first two so they shouldn't be a problem. #3, however, not really.
Also, I've heard that announcing what you're going to do in the future kills your motivation or something, so there's that.

Light blue

Added a sky thing...
So beautiful...sniff
Yes, even these kinds of small advances are posted.

Thursday, January 2, 2014

Multithreading sucks

After placing and sometimes tossing around synchronized blocks cluelessly, it looks like I finally managed to get the multithreaded program working nicely, smoothly, and properly on both PC and Android. However, I'm planning to take closer looks at how I synchronized the code and make a few more tweaks. Hopefully I don't screw up the code that I seemed to have made it work. Was that grammatically correct?

Color

Added some color for the terrain; it's not pretty, but it's something and it'll do for now.
The algorithm for grass is simple for now; if the density value above a tile is negative, the tile is grass. Hopefully I'll incorporate light later.

Wednesday, January 1, 2014

Perlin noise

I'm going to use Perlin noise to generate some terrain for a sidescroller.

I fixed it

I fixed it. When the Marching Squares (MS) is going on, data of the "world" is used. Every square/tile of the world has a "density" value: usually a positive number indicates solid while negatives indicate air. In my program when a value is needed it asks for it in a main "Grid" class. When there is no value previously set Grid returns a negative number, the lowest byte value in Java, -128, to be exact.
Previously I added in the values after each chunk (the world is divided into smaller chunks) goes through MS. This means that the values in the chunk itself will not be recognized by the main Grid, which MS uses to get density values. It is only after the chunk is added to the main Grid that Grid will return intended values.
So what I did was simply add the chunk to Grid right after the values are generated, then use MS.
This is what was originally supposed to happen:
Yes, this is going to be terrain later. It's pretty boring. Here values are generated as follows:
  • If the y-coordinate is less than or equal to 0, output 1 (solid).
  • If the y-coordinate is greater than 0, output -1 (empty).

Now let's make it a little more interesting using 1 or -1 randomly:
Last one: any number (decimals) from -1 to 1:
You can read stuff on Marching Squares if you're interested on how this stuff works. I will later use Perlin noise to generate terrain.

Currently...

And so now I'm reworking my <I don't know the word> engine. Earthrunner was pretty much based on it, so I'm hoping once (or if..) I finish it I'll be able to fix Earthrunner's bugs at the same time. The engine is something I'll be able to use for future games. The engine handles world loading, marching squares, physics, and some other stuff for you.
Since I'm currently rewriting it (since the code was so messy), you might be able to say I'm back to square one. But this time, I know a little more on what I'm doing.
And now I introduce the first screenshot. Well, it's an issue I ran into; this is not supposed to happen:
Instead of a crosshatch thing, there's supposed to be something that looks like flat terrain. I'm off to fix it.

Previously...

Last summer I made my first Android game called Logica; it's a puzzle game. Currently it has over 500 total installs which is actually quite a lot for me, especially compared to something I expected. So far I've earned about 75 cents(!) from it. Either way it has problems: it's too difficult to learn how to play (I think), the art might look amateurish to some (although I aimed for a minimalist style on purpose since I'm a fan of minimalism), there's little resolution support (I tested only on the S2 at the time and it looked fine; however on newer devices the buttons are tiny) and it has quite a few bugs. It's currently sort of like an illegitimate child(?); I do not cherish its existence, at least. I'm not even linking to its Google Play page. But I do say that one day, one day, I'm coming back to it to fix it all up. ...
The second Android game is called Earthrunner, I just released it. It still has a few bugs, but I think it's much better than Logica. It's a run-and-jump game. In Logica, I attempted to be unique/original, but after it failed, I thought "screw it", and so Earthrunner isn't the most unique and original game. Friends said it's fun, but they're friends. I released it about 2 days ago, and I've got only 2 downloads so far. ...One by me and one by a friend... I'm pretty sure it's my fault; I've done little to nothing "PR" on it. Well, I did make a Twitter when I started working on Earthrunner, but I haven't announced its release since I'm not confident enough until the bugs are killed.

New Start

I've decided to start recording my progress on some website again. Apparently I had an old blog on Blogger that didn't even have a single post; I was complete unaware of it. It's just a coincidence that I've created this on the first day of 2014.
It's highly possible this blog is yet another one that is used for one or maybe even two days. I'll see how it goes.