Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views


Sign in to follow this  
Sir Sapo


?????? Gamedev!!

First things first, I got a 3 on my Chemistry AP exam, REJOICE!!! Not bad for a sophmore in highschool[wink].

I actually made a lot of progress today (it's nice for a change). I am really liking the way the engine is falling together. 90% of the things I try and implement I get right the first time with no errors, and the others just take a little longer (except for the mouse cursor code... damn you mouse cursor!!!!). Its odd that 2 days ago I wrote a function that I thought I would never need, and here I am today, using it left and right. Its the little things like that that really make programming fun for me ( that and all the ladies lined up to date me[wink]).

Today I implemented player animation, switches, enemies, and bullets into the engine. Player animation was a snap because I am using one texture to store all of a player's animation(see below) so all I have to do is switch the texture coordinates, and I get some animation going. Here is the template I use to make my textures.

The only bad thing about using one image sheet in OpenGL, is that the textures bleed over the side, and when you are using masking this can raise a bit of a problem, but there has to be a way to solve this, and if anyone knows, please comment or PM me.

The terrain tiles are the same size as the entity tiles, but aren't split up into sections. I think in order to make some animation for the moving terrain (lava, water , blood(eww!!) , etc), I will just mess with the texture coordinates and have the terrain scroll in a direction.

The bullets are just objects that can be tied to a weapon, and when the weapon is fired, the bullets get the type of projectile they are from a function in the weapon class, and then go flying out at the same angle that the player is facing(+ or - a random accuracy factor). The type a bullet recieves dictates other attributes as well, such as splashdamage , splashradius, range , accuracy, etc. Unfortunately, although I have the Shot class written, I cant test it without writing the Weapon class, which should be a lot of fun. The Weapon class will contain data such as Rate of Fire, Magazine Capacity(yes you will have to reload), Accuracy , and type of projectile fired. I cant wait to finish that so that I can start making cool weapons.

Speaking of weapons and ammo, I'm not sure how I'm going to handle picking up ammo in the game. In the game you jump from one point in time to another, and I think that I will have the players original inventory reset every level(because you are starting anew in a different time, which explains how you heal up every new level), and the player will be able to find and use era specific weapons like Ninja Stars, Cannons , and Bats with Nails through them.

The one module that really stands out to me is the Switch class. The switch class contains 7 variables:

x position of switch
y position of switch
x position of target tile
y position of target tile
type of tile to change target to
type of action switch takes
boolean stating if switch has been activated

The switch works by, when activated by the player, changing the tile type of the specified tile into the tile type in the switch object. This can be used to change doors to floors, Water to a Bridge , Lava to Sand, and all this without using a scripting language.

Anyways , here is the screenshot I promised last post:

Well, I better be getting to bed, I've got to get up early tomorrow.
Sign in to follow this  


Recommended Comments

You can fix the texture bleeding problem by setting the wrap mode to clamp to edge

//build the texture object here, glTexImage2D etc...


plus if you arent scaling the textures you may as well use GL_NEAREST for the filtering


Share this comment

Link to comment
Thanks alot LowCalorie, thats what I was looking for.

I was a sophmore last year when I took the test, but I will be a Junior when school starts again.

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!