Search found 75 matches

by bnpph
Fri Jun 24, 2011 12:27 pm
Forum: Art, Music, and Design
Topic: Blender exporter or 3D modeler from scratch?
Replies: 4
Views: 1708

Re: Blender exporter or 3D modeler from scratch?

Blender scripts are such a pain. Much better than making a modeler, though.
by bnpph
Fri Jun 17, 2011 1:40 am
Forum: Programming Discussion
Topic: New to gameprogramming but very exited to begin
Replies: 13
Views: 2306

Re: New to gameprogramming but very exited to begin

Star with C.

Move onto C++ when you feel comfortable.
by bnpph
Wed Jun 15, 2011 12:47 am
Forum: Programming Discussion
Topic: Compiling without an IDE
Replies: 6
Views: 1020

Re: Compiling without an IDE

You can run code::blocks off a flash drive - I've done it and it works great. This is what I recommend.

If you don't use an IDE you'll have to mess with makefiles which can be a pain.
by bnpph
Thu Jun 09, 2011 2:42 pm
Forum: Programming Discussion
Topic: Level Editor Help (SDL)
Replies: 5
Views: 858

Re: Level Editor Help (SDL)

3 options:
1. hardcode the directory the correct directory into your game.
2. make a config file that contains the correct directory and load it when your level editor starts. This is probably the best option.
3. use a "save-as" dialog box.
by bnpph
Thu Jun 09, 2011 2:37 pm
Forum: Programming Discussion
Topic: So like, can anyone explain this to me? (OpenGL issue)
Replies: 18
Views: 1966

Re: So like, can anyone explain this to me? (OpenGL issue)

Is your texture part of a texture atlas?
You might be seeing the edges of other surrounding textures.
Try reducing the bounding box of your texture coordinates.
by bnpph
Thu Jun 09, 2011 2:34 pm
Forum: Programming Discussion
Topic: Dynamic Memory Allocation (maps)
Replies: 7
Views: 1143

Re: Dynamic Memory Allocation (maps)

I've changed the sizeof(Tile**)'s to sizeof(Tile*) and the sizeof(Tile*) (from before) to sizeof(Tile). Its still crashing at the same point, this time instead of the whole mess of messages, its giving me the "Segmentation Fault". Hm, that is strange. Are you sure your malloc calls are re...
by bnpph
Wed Jun 08, 2011 9:27 pm
Forum: Programming Discussion
Topic: Dynamic Memory Allocation (maps)
Replies: 7
Views: 1143

Re: Dynamic Memory Allocation (maps)

First off, change: DynamicTileArray(); DynamicTileArray(int width, int height); To DynamicTileArray(int width = 10, int height = 10); This is wrong: (Tile*)malloc(sizeof(Tile*)*10); sizeof(Tile*) is the size of a pointer - which will be 4 bytes on x86. You want sizeof(Tile) instead. Also, sizeof(Til...
by bnpph
Wed Jun 08, 2011 2:23 pm
Forum: Programming Discussion
Topic: So like, can anyone explain this to me? (OpenGL issue)
Replies: 18
Views: 1966

Re: So like, can anyone explain this to me? (OpenGL issue)

Try making the size of the cubes slightly larger so they overlap.
by bnpph
Thu Jun 02, 2011 6:16 pm
Forum: Game Development
Topic: Turret Projectile Offset
Replies: 3
Views: 1602

Re: Turret Projectile Offset

x = turret.x + cos(turret.direction) * turret.length; y = turret.y + sin(turret.direction) * turret.length; Something like that for a single barrel. For multiple barrels, you can either: A. use the above code twice - one perpendicular, and one going outwards B. Use the above code but add a value to...
by bnpph
Thu Jun 02, 2011 1:37 pm
Forum: Programming Discussion
Topic: Programming Philosophy
Replies: 17
Views: 2043

Re: Programming Philosophy

Here is basically what I was trying to say (code wise). //This is a little pseudo.// class Entity { public: virtual void Attack(); }; class Player : public Entity { public: void Attack(); }; void Player::Attack() { std::cout<<"Attack the goblin!"<<std::endl; } class Goblin : public Entity...
by bnpph
Wed Jun 01, 2011 4:14 pm
Forum: Game Development
Topic: Blade Brothers Engine: Creating my first 2D Game Engine
Replies: 272
Views: 37297

Re: Blade Brothers Engine: Creating my first 2D Game Engine

Well, one could actually have all the autotile calculations be done when you change tiles rather than when you render them. That would not only save CPU time, it would also make your life at least a little easier. Yeah, you only need to update the 8 adjacent tiles of the one that has been changed.
by bnpph
Mon May 30, 2011 2:23 pm
Forum: Programming Discussion
Topic: Using Templates for Game Object Inheritance
Replies: 5
Views: 1057

Re: Using Templates for Game Object Inheritance

I use CRTP all the time - it is very handy.

I prefer it over dynamic inheritance.
by bnpph
Mon May 30, 2011 1:43 pm
Forum: Programming Discussion
Topic: Programming Philosophy
Replies: 17
Views: 2043

Re: Programming Philosophy

Anyone care to discuss? http://www.youtube.com/watch?v=p6FSKSdhQgY I like to think of OO as just being a wrapper around procedural calls and data, which in reality it is. For modern video games, it is almost a necessity to use some sort of OO - whether it uses functionality built-into the language ...
by bnpph
Thu May 26, 2011 10:10 pm
Forum: Game Development
Topic: Blade Brothers Engine: Creating my first 2D Game Engine
Replies: 272
Views: 37297

Re: Blade Brothers Engine: Creating my first 2D Game Engine

I already have grid snapping working just fine along with multiple other things like multiple tile selection etc. Oh, I guess I saw that from an outdated video - the new one looks good! The problem is the widget doesn't scroll and it offsets everything. Why not translate the GL matrix to match the ...
by bnpph
Wed May 25, 2011 11:36 pm
Forum: Game Development
Topic: Blade Brothers Engine: Creating my first 2D Game Engine
Replies: 272
Views: 37297

Re: Blade Brothers Engine: Creating my first 2D Game Engine

To check if snapped to grid just use modulo, and split up movements into numbers divisible by grid number.

You are unable to move outside the map in some places because I'm assuming that you are accessing out of bounds data.