Search found 50 matches

by captjack
Mon May 03, 2010 2:21 pm
Forum: Programming Discussion
Topic: coding improvement
Replies: 13
Views: 1103

Re: coding improvement

I am using c++, and am semi familiar with classes, I do have some trouble calling functions from different classes, lets say I have 3 classes, a, b, and c, and I want b and c to be able to control something in a, then I wouldn't know how to do it off hand, the only thing I could think of is using p...
by captjack
Mon May 03, 2010 12:09 pm
Forum: Programming Discussion
Topic: Structuring Your Map Format
Replies: 9
Views: 732

Re: Structuring Your Map Format

Just a thought: You could support both formats. Write your engine to support a binary format, optimized and structured as needed. Then, you can write out a map compiler. Using a compiler, you can write hand-coded maps or editor-"coded" maps. The intermediate map can then be run through you...
by captjack
Thu Apr 29, 2010 9:32 pm
Forum: Programming Discussion
Topic: [Solved] Visual Studio question
Replies: 4
Views: 483

Re: Visual Studio question

All you really have to do to make a static library is take main.cpp out and change the project type to .lib. To make it easier, add the header files and the .lib file to the VC++ Directories, that way you dont have to copy all header files to the new project and VC++ will be able to find the .lib w...
by captjack
Thu Apr 29, 2010 9:09 pm
Forum: Programming Discussion
Topic: [Solved] Visual Studio question
Replies: 4
Views: 483

Re: Visual Studio question

Ugh, did you include the C++ files that define all the class functions too or did you just include the header files? Or are the functions defined in the headers? There error looks like its saying that it cant find the function definition. You would have to copy some C++ files from your engine proje...
by captjack
Thu Apr 29, 2010 9:03 pm
Forum: Programming Discussion
Topic: Who wants a challenge?! <SDL/C++>
Replies: 2
Views: 403

Re: Who wants a challenge?! <SDL/C++>

This doesn't answer your question directly, but I'll let you know what I did just for the sake of offering other points of view... My maps are a multi-dimenstional one, like yours. I allow maps of any size, up to a #defined WORLD_MAX_X and WORLD_MAX_Y. The tile maps, look like: 3 3 3 3 3 3 3 3 3 3 3...
by captjack
Thu Apr 29, 2010 8:42 pm
Forum: Programming Discussion
Topic: [Solved] Visual Studio question
Replies: 4
Views: 483

[Solved] Visual Studio question

I've run into a bit of a snag. To date, I've been working on my tile engine and this has been going pretty well. I'm at the point now where I'd like to build out the map editor so I can stop fiddling bits in map files by hand. Seems straight forward and I thought I had a good game plan. I'm trying t...
by captjack
Mon Oct 26, 2009 11:27 am
Forum: Programming Discussion
Topic: Console game
Replies: 19
Views: 1509

Re: Console game

The fact that the NetHack dungeon crawl is still around and being updated makes proof positive that even text-based games are still worthwhile and enjoyable. Congratulations on your success. When I was years younger, I made an attempt at a text adventure. Growing up in the era when text was all we h...
by captjack
Mon Oct 12, 2009 4:26 pm
Forum: Programming Discussion
Topic: Saving to and loading from disk
Replies: 5
Views: 504

Re: Saving to and loading from disk

http://elysianshadows.com/phpBB3/viewtopic.php?f=6&t=2712&p=28647&hilit=binary#p28647 That looks promising! I'll have to spend some cycles reading over your posts in that thread. The code looks like what I tried to do (and failed) on this first go-round of object serialization. Fingers ...
by captjack
Mon Oct 12, 2009 4:21 pm
Forum: Programming Discussion
Topic: Saving to and loading from disk
Replies: 5
Views: 504

Re: Saving to and loading from disk

So that leaves me with the idea that I'll need to iterate through all the map objects in the vector to write them out. What's wrong with that? You might also need to write out the number of objects, to be able to read the same number in again. I would recommend using [put popular file streaming lib...
by captjack
Mon Oct 12, 2009 2:57 pm
Forum: Programming Discussion
Topic: Saving to and loading from disk
Replies: 5
Views: 504

Saving to and loading from disk

In a fit of eggheadedness, I managed to totally muck up my storage code. I was using hard coded game objects using .push_back() on five items. I wanted to migrate to using binary files primarily due to my work on the level editor. See one of my earlier posts for another topic related to vectors of p...
by captjack
Sat Oct 10, 2009 9:31 am
Forum: Programming Discussion
Topic: Alex's programs for F2009
Replies: 21
Views: 1327

Re: Alex's programs for F2009

Nice work. I'm assuming this was made using Javax.Swing? I've only made tic-tac-toe with that and it's kind of annoying getting stuff to line up the way you want in a JPanel. I'm not a Java programmer so I'm not sure if this is helpful, but FormLayoutMaker seems to be a nifty tool for building form...
by captjack
Fri Oct 09, 2009 1:50 pm
Forum: Programming Discussion
Topic: vector<>::iterator question [SOLVED]
Replies: 6
Views: 445

Re: vector<>::iterator question [SOLVED]

class Map : public vector<MapObject*> { } if you wanna really OO it. Nice! A little more step-wise refinement never hurt a source file. It pays to remember the expanse of inheritance. It also pays to not do this when you're tired. :lol: Ever get so caught up in coding that you forget to use the fun...
by captjack
Fri Oct 09, 2009 1:40 pm
Forum: Programming Discussion
Topic: Developing problem solving skills
Replies: 19
Views: 1787

Re: Developing problem solving skills

If you do understand the subject and only looking for proofs/helpers/pointers it can help. Because with that understanding you're able to filter out all the worthless cruft that comes up along with the gems. @Moosader - perhaps you could have an end of chapter "Exercises" section? The cha...
by captjack
Fri Oct 09, 2009 12:51 pm
Forum: Programming Discussion
Topic: Alex's programs for F2009
Replies: 21
Views: 1327

Re: Alex's programs for F2009

yea.. its a pitty that accidents do happen. okay, i'll try and defend my view. i think to have a planned child in your early 20's is irresponsible, in no way are you mentally prepared, or for that matter financially. you are still a child your self. and no im not saying your marriage will fail. or ...