RPGDXThe center of Indie-RPG gaming
Not logged in. [log in] [register]
 
 
Post new topic Reply to topic Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next 
View previous topic - View next topic  
Author Message
DeveloperX
202192397


Joined: 04 May 2003
Posts: 1626
Location: Decatur, IL, USA

PostPosted: Thu Feb 12, 2009 1:59 am    Post subject: [quote]

Captain Vimes wrote:

RedSlash wrote:
Also, declaring global variables in a header file is gonna cause you lots of problems.


This interests me. Why?


Globals are bad.
You need to specify them as extern in the header;
and then re-declare them once in some source file.
That way there is only one instance being #included in your code.
_________________
Principal Software Architect
Rambling Indie Games, LLC

See my professional portfolio
Back to top  
DeveloperX
202192397


Joined: 04 May 2003
Posts: 1626
Location: Decatur, IL, USA

PostPosted: Thu Feb 12, 2009 2:37 am    Post subject: [quote]

Okay Captain. Here.

You should be able to just use the whole project as is.
Unzip and go.

Download ZombieHorde.zip (Dev-C++ Project, Sources, BMP, Windows EXE & DLL)
_________________
Principal Software Architect
Rambling Indie Games, LLC

See my professional portfolio
Back to top  
Ninkazu
Demon Hunter


Joined: 08 Aug 2002
Posts: 945
Location: Location:

PostPosted: Thu Feb 12, 2009 3:23 pm    Post subject: [quote]

This isn't directly related to your problems, but have you experienced Dev-C++ crashing when using auto-complete features or that hint boxes don't disappear sometimes?

I've found Dev-C++ to be a big headache. You may want to look into the (still maintained) IDE called code-blocks.
Back to top  
DeveloperX
202192397


Joined: 04 May 2003
Posts: 1626
Location: Decatur, IL, USA

PostPosted: Thu Feb 12, 2009 3:29 pm    Post subject: [quote]

Ninkazu wrote:
This isn't directly related to your problems, but have you experienced Dev-C++ crashing when using auto-complete features or that hint boxes don't disappear sometimes?

I've found Dev-C++ to be a big headache. You may want to look into the (still maintained) IDE called code-blocks.


Yeah, there is a bug in the auto-complete system.
I usually turn it off.

I personally hate the code::blocks IDE.
Though..it might have changed in the past 3 years since I used it last...

I do my development in gedit, and the terminal in Linux these days now. I love the speed of my development setup. :D
_________________
Principal Software Architect
Rambling Indie Games, LLC

See my professional portfolio
Back to top  
RedSlash
Mage


Joined: 12 May 2005
Posts: 331

PostPosted: Fri Feb 13, 2009 12:46 am    Post subject: [quote]

I'd say code::blocks > Dev-C++. Also, Visual Studio Express C++ is free to download and is quite good.
Back to top  
Ninkazu
Demon Hunter


Joined: 08 Aug 2002
Posts: 945
Location: Location:

PostPosted: Fri Feb 13, 2009 1:55 am    Post subject: [quote]

If I could find a nice autocomplete extension for emacs, I'd use that over anything else, but I haven't looked around hard enough I suppose.
Back to top  
Captain Vimes
Grumble Teddy


Joined: 12 May 2006
Posts: 225
Location: The City Streets

PostPosted: Fri Feb 13, 2009 7:28 pm    Post subject: [quote]

I'll check out code::blocks, but I personally really like Dev-C++.

And thanks, DevX. Did you find out what was wrong?
_________________
"Sometimes it is better to light a flamethrower than to curse the darkness."
- Terry Pratchett
Back to top  
Terry
Spectral Form


Joined: 16 Jun 2002
Posts: 798
Location: Dublin, Ireland

PostPosted: Fri Feb 13, 2009 7:46 pm    Post subject: [quote]

Code::Blocks is pretty cool - I use it for bigger projects because it tends to be a bit more stable, but I find something about Dev-C++ gels better with my coding style (mostly the way you can quickly switch tabs if you have a lot open), so I still use it for smaller projects from time to time.
_________________
http://www.distractionware.com
Back to top  
DeveloperX
202192397


Joined: 04 May 2003
Posts: 1626
Location: Decatur, IL, USA

PostPosted: Sat Feb 14, 2009 12:46 am    Post subject: [quote]

Captain Vimes wrote:
I'll check out code::blocks, but I personally really like Dev-C++.

And thanks, DevX. Did you find out what was wrong?


I did.
You were misusing the engine I wrote for you ;)

Look at the code in what I posted.
_________________
Principal Software Architect
Rambling Indie Games, LLC

See my professional portfolio
Back to top  
Captain Vimes
Grumble Teddy


Joined: 12 May 2006
Posts: 225
Location: The City Streets

PostPosted: Sat Feb 14, 2009 2:27 am    Post subject: [quote]

I looked at the code, but I don't see any real differences aside from the timer code and the fact that you got rid of the separate UpdateSprites() and UpdateBackgrounds() functions. I mean, I don't mind, but I would like to know exactly what the problem was so that I can avoid it in future.
_________________
"Sometimes it is better to light a flamethrower than to curse the darkness."
- Terry Pratchett
Back to top  
Captain Vimes
Grumble Teddy


Joined: 12 May 2006
Posts: 225
Location: The City Streets

PostPosted: Sat Feb 14, 2009 3:16 am    Post subject: [quote]

And one more question, this one not an error.

I want to randomly create a map every time the player starts the game, which I think I can do. What's more difficult is the fact that I want the city to be bigger than 800x600 pixels. I'm not really sure how I would make the camera move with the player, or how to make SDL render only part of a sprite if it's partially offscreen. Are there any tutorials that you guys know on this subject?
_________________
"Sometimes it is better to light a flamethrower than to curse the darkness."
- Terry Pratchett
Back to top  
DeveloperX
202192397


Joined: 04 May 2003
Posts: 1626
Location: Decatur, IL, USA

PostPosted: Sat Feb 14, 2009 4:43 am    Post subject: [quote]

There was not really a need for separate functions.

Because the existing Update method already works for the purpose.
Code:

void Hammer::Update(float deltaTime, bool updateBackgrounds)
{
   spriteManager_->Update(deltaTime);
   if (updateBackgrounds)
   {
      backgroundManager_->Update(deltaTime);
   }
}

_________________
Principal Software Architect
Rambling Indie Games, LLC

See my professional portfolio
Back to top  
DeveloperX
202192397


Joined: 04 May 2003
Posts: 1626
Location: Decatur, IL, USA

PostPosted: Sat Feb 14, 2009 4:45 am    Post subject: [quote]

Captain Vimes wrote:
And one more question, this one not an error.

I want to randomly create a map every time the player starts the game, which I think I can do. What's more difficult is the fact that I want the city to be bigger than 800x600 pixels. I'm not really sure how I would make the camera move with the player, or how to make SDL render only part of a sprite if it's partially offscreen. Are there any tutorials that you guys know on this subject?


Are you looking for a tile engine, or a big-bitmap engine, or a sparse space engine, etc.

Camera control isn't all that difficult.

As for tutorials, that all depends on what you are trying to do.

I can whip up examples for you if you know what sort of example you would want.

..haha..I just finished implementing MY camera controls in my minirpg engine for the 48 hour jam :D
_________________
Principal Software Architect
Rambling Indie Games, LLC

See my professional portfolio
Back to top  
DeveloperX
202192397


Joined: 04 May 2003
Posts: 1626
Location: Decatur, IL, USA

PostPosted: Sat Feb 14, 2009 10:02 pm    Post subject: [quote]

Okay, my previous experience with Code::Blocks (about 5 years ago) sucked ass.

I decided to give it a try today...and I love it now.
I gotta say that I highly recommend it over Dev-C++.
Its much much better, and it runs in Linux :D

I just finished moving my 48-hour minirpg project to Code::Blocks, and I'm happy with the new development workflow.

The editor its simply great.
I still don't bother with the IDE's build tools or settings.
I setup an external tool in the Tools menu for running SConS (what I've been using all along for building projects) and so nothing needs to change, all my code still builds, I just now have a nice project environment that I can quickly edit my sources in.
The symbol browser is really nice, and autocompletion works great.
_________________
Principal Software Architect
Rambling Indie Games, LLC

See my professional portfolio
Back to top  
Captain Vimes
Grumble Teddy


Joined: 12 May 2006
Posts: 225
Location: The City Streets

PostPosted: Tue Feb 17, 2009 12:54 am    Post subject: [quote]

Okay, so, I got Code::Blocks. I'm going to try it out now, but first...

DeveloperX wrote:

PostPosted: Sat Feb 14, 2009 4:43 am Post subject:
There was not really a need for separate functions.

Because the existing Update method already works for the purpose.


I still don't see why this would make the error "class Hammer has no member named 'Update'" appear. I mean, the Update() function was still there. It just called two other functions instead of doing it all in there. Or am I missing something really obvious?

DeveloperX wrote:

Are you looking for a tile engine, or a big-bitmap engine, or a sparse space engine, etc.

Camera control isn't all that difficult.

As for tutorials, that all depends on what you are trying to do.

I can whip up examples for you if you know what sort of example you would want.

..haha..I just finished implementing MY camera controls in my minirpg engine for the 48 hour jam :D


I'm not really sure what the difference between all the different types is. I think I know what a tile engine is (like Pokemon, right?) and I can guess what a big-bitmap is (just one giant bitmap that you render piece by piece), but I'm not sure what a sparse-space is.
But unless the sparse-space is something really, really cool, I think I'm looking for a big-bitmap engine here.
_________________
"Sometimes it is better to light a flamethrower than to curse the darkness."
- Terry Pratchett
Back to top  
Post new topic Reply to topic Page 6 of 8 All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next 



Display posts from previous:   
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum