🤑 Indie game store🙌 Free games😂 Fun games😨 Horror games
👷 Game development🎨 Assets📚 Comics
🎉 Sales🎁 Bundles

Ochi12's Dev Blog

A topic by ochi12 created 1 year ago Views: 214,329 Replies: 19
Viewing posts 1 to 19

Created the dev blog a little bit late. I think I know what I want to make, I will be posing progress my progress from now on.

I have a feeling this is going to be a lot of fun...

Imagine you're on a spaceship returning from a mission on a foreign planet, suddenly, the propulsor begins to fail. Occasionally, you have no propulsor whatsoever, that would let you in a very vulnerable position in case of an alien attack wouldn't it?(which of course, is going to happen). The [unpropulsed]ship starts to orbit around the earth, you don't have a lot of time until the ship breaks into earth's atmosphere, in which case, aliens will reach earth. You cannot let that happen to your planet, so your mission now is to get to the power generator in the ship, and blow it up. Yes, yes, you'll die, but at least aliens on the ship won't get to earth ;)

Yep, that's basically my game

That was that, as far as the story goes, from a technical point of view, I only got this, working on it, though!

So far so good, got a basic enemy to chase the player and position himself at a prudent distance and then play a shooting animation, no real bullets so far, but collisions, animations and some ultra-basic AI working. Gotta get the basics out of the way quickly and begin working on the RPG-ish content fast!

Yeah, I know, no map so far, it's just more entertaining to work on the enemies and player first.

OK, bullets and the basic enemy working, feel like I should be going faster. Anyway, downloaded a tileset and got a basic test map with Tiled, now back to coding.


After 1 hour, got the map into my game and the map collisions are working. Took longer than expected though, now, let's focus on enemies and items!

I'm still working on the enemy, now the enemy has a sense of "visibilty". Meaning, it won't chase you from the other corner of the map, he must be able to see you first. He can also shoot now, and all units have a certain knockback when they're hit. Bad news are, these changes are not visible and the game looks exactly the same, so, no screenshot for now. I know I said this a few times already, but now I'll start working on the items and power-ups

Well, finally. I made a simple inventory system, you can find items on bags(which monsters will drop when killed), grab them and use them. Really amazed I got this working, now it's just a matter of polishing it up. Screens:




Yep, the boots increases the speed , and the aim is a accuracy power up. I'm obviously not a graphics designer, just look at the bag :p

My game is so bad compared to what you have so far.... I guess i have alot more learning todo!

Right now, the game is lacking a lot of content and the gameplay just doesn't feel right. It's kind of poor, I really look forward to the end of the jam, so I can steal... err, read, others games' source code.

So sad, I hardcoded all of my hud, it was going so well. And then I realized there was a unproject() method in OrthographicCamera. I could've used it instead of hardcoding the hud position relative to the camera... rewritting :(

No progress for now, took a few days "off". Some enhances on the UI only.

Wow, I'm super exited about this, got a few lights working into the game, this is only a simple effect. Meaning, no shadows or anything like that. The most surprising thing to me was that I could get it working without shaders(other than the default one, of course).

Here is how it works(thanks to Kedu at http://stackoverflow.com/questions/21278229/libgdx..., who actually figured out the solution), you get a sprite for your light. Then you draw a black translucent quad covering the whole scene. You should get a darkened version of your scene. How I did it:

game.batch.setColor(0, 0, 0, 0.7f);
game.batch.draw(black, 0, 0, 800, 600); // Draws a black texture over the whole screen
game.batch.setColor(1, 1, 1, 1);

So far so good, after you darkened your scene, it's a matter of using your sprite to light the appropriate parts of it. How? The blendFunctions from OpenGL. Before you draw your lights, you should do:

game.batch.setBlendFunction(GL20.GL_DST_COLOR, GL20.GL_SRC_ALPHA);

The first parameter means you'll be multiplying the source color by the destination color. As the source color is white, the resulting color will be the destination color, a little darkened around the center(see the light texture). And the second argument means the destination color will be multiplied by the alpha of the src color(that is, 1) so it will get a little brighter.

You draw your texture wherever you want, and reset the blendFunc to the default one:

game.batch.setBlendFunction(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA);

This will only get the blending back to normal. Screen shots:

Note: You can change the color of the light by just changing the color of the spritebatch before drawing it.

I have just learned all of this, so I may have missed or misunderstood something, if so, please correct me. I think this method is quite good as it doesn't require coding a shader that will implement basic functionality that opengl has anyways. Have a nice one!

Not a lot of progress so far, you know, Christmas and all that. Think I'll be implementing a few types of enemies, some more items, and then I'll be focusing on creating the "campaign"(maps, npcs and dialogues, etc) as fast as I can. I haven't advanced much these last days, but here's a few screenshoots anyways.

Yep, that thing in the first shoot is a slime. Just fixed some memory management stuff and added lights to characters. Not very exiting :p. Just as a side note, this lighting stuff does increment the number of drawcalls quite a lot, I may add an option to disable it.

(Edited 1 time)

Starting to look like a game already. Items now show a little description when the mouse is over them on the inventory. While implementing this, I had a chance to spot and fix a bug I was not aware of. The cursor is not visible on this screenshot(goddammit) but when I took it, I was hovering the item with the mouse. Really wish I had better assets for my game, next time I'll be teaming up with somebody(I hope).

Edit: also, the items' effects are now random, some items will last longer or increase your stats higher, depending on... well, nothing, it's random!

Mmm, I'm finding that making maps is quite boring, plus, I'm not good at it. Maybe, I could make a couple of tweaks in my design and make this game a softcore roguelike? Yeah, that sounds good. I'll see how it goes, not promissing anything!

(Edited 1 time)

OMG, procedural level creation working(or at least, 90% of it). It's still kind of rough now, but, hey, it works(tm). I taught about using BSP, but it was complex and I was too lazy to search for tutorials on how to implement it(or implement it myself). So, instead of that, I decided to develop my own solution to the problem, faster, better, and buggier(?). Ok, since I'm not using tiled anymore, I used some code I wrote some time ago to create a tile map from a matrix of integers. In the matrix(which should be a square matrix), each int represents one type of tile and the map is generated from it using the number to decide the texture and weather it's solid or not, and the column/row to decide the position. It's simple.

Now, I only have to create a matrix and feed it to the Map class. So, I create rectangles(in tile coordinates) to represent the rooms, I apply some limitations on the size and position beforehand. I take care none of these "rooms" are overlapping, and connect them together. To connect them, I check whether they're aligned on the Y or X axis. If so, I create a straight corridor from one to another. Right now, the algorithm does not support L shaped corridors, so if two rooms cannot be connected with a straight corridor, they're not connected at all. Once, the rooms are placed and connected(kind of), I just loop trough the matrix and place walls around each room/corridor. Then I feed the matrix to the map class, and voilà, a dungeon-ish map up and running.

It's not perfect, but I'm really exited about it, as it's the first time I make something like this. And, it will save me the work of creating each map individually, although, now the maps will look crappier(at least, until I polish the algorithm, if I ever get to do so). I'll upload screenshots later, technical problems :p.

Edit: Now, instead of straight corridors, they're always L shaped corridors. Sometimes they end up being straight corridors anyways, because of some crazy logic with loops(?). Quite happy with the results

Now that internet is back, some random levels:

Slaying some monsters on my procedural generated dungeon

Happy new year everyone!

Haven't touched the game ever since, I got kind of bored. The only addition was a main menu screen(which is not beautiful due to my skills as a designer). I'll work on getting various floors into the game. Bad news are, as the game is now more rogue-like, the story will have less importance on the game, chances are, in the end it will just be a (hopefully funny) shoot 'em up game. I really should have put more effort into the design, as now I won't be able to change a lot of things. Will get to work now! 8 days is more than enough(hopefully).