Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411372 Posts in 69353 Topics- by 58405 Members - Latest Member: mazda911

April 13, 2024, 04:43:59 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
  Show Posts
Pages: 1 ... 287 288 [289] 290 291 ... 299
5761  Developer / Business / Re: My Longest Game Project Ever on: June 10, 2010, 03:25:35 PM
I believe I started on our project about five months ago.I started over entirely a about four months minus a week ago. Work is going fine, but it has been a bit slow lately, so two days ago, I decided to make a checklist of deadlines.

I've got work planned for the next seven days now. Everything that was due yesterday is done, and half of the stuff for which I have a little less than 23 hours left to make are done, so it seems to be going fine to follow that list so far, and it's a great way to make sure progress does happen.

The game is not a game yet; I'm fleshing out the framework and the engine at the moment. It's going fine, though and just before I started writing this, I checked the last task off from the deadline list, which was a very good thing to get done. It's a 2D platformer using basic physics, and I just got the automatisation for my objects set to be influenced by physics and surroundings to fall if in the air and, if they land on solid ground, actually stay on it; now I could even just start moving an piece of ground around to make it an elevator, since that part of the physics is already automatic!

@chrknudsen:
I definitely agree with you on your last statement!
5762  Developer / Technical / Re: Trying to design an item system in Game maker. on: June 10, 2010, 06:45:53 AM
Be sure to let us know how it goes. Good luck!
5763  Developer / Technical / Re: The grumpy old programmer room on: June 10, 2010, 06:45:27 AM
I believe that's the system, yes. Not sure what file to edit, though.
5764  Developer / Technical / Re: The grumpy old programmer room on: June 10, 2010, 05:47:10 AM
Echoing the other peoples in here that recommend you learn about what debuggers can do for you. Compilers catch the syntax errors and link errors - debuggers catch everything else. Seriously, learn how to set a breakpoint, to single step, to read a callstack and to use a watch window and your life will become a million times easier.

I was one of those guys who didn't trust the mystic ways of the debugger and spent years falling back on good old trusty print statements. When I found out what I was missing I couldn't believe how I'd lived without proper debugging.
I do know how to use debuggers and breakpoints; I just didn't know how it could help me this time.
I knew that the pointer was NULL all along. That much I had already figured out by a simple line of output to the console.
What I did not know was why the pointer was NULL, and I don't think I would have found out much more quicker even with a debugger.

C::B 10.5 is messing with me  Facepalm :
Seems to be because your project lies in a folder with a name written in a system that reads from right to left (Arabic).
5765  Developer / Technical / Re: How to make a messaging system on: June 09, 2010, 09:10:00 AM
What do you mean by "matching" objects?
5766  Developer / Technical / Re: The grumpy old programmer room on: June 09, 2010, 08:21:03 AM
It is, and I solved it two days before the day of the deadline for it to be solved, so everything's fine.
5767  Community / Creative / Re: While You Work on: June 09, 2010, 08:19:32 AM
You must be one prune-skinned guy!
My hands are above the surface all the time! I have to type.
5768  Community / Creative / Re: While You Work on: June 09, 2010, 06:34:16 AM
I have to add that I do like half my work in the tub. It's awesome.

So you work 40 minutes a day, tops? Undecided

Or is there something going on we really shouldn't know, here? Cheesy
I actually sat in there more than four hours about a week or two ago, haha.
I usually just sit there for about an hour and a half or so, though.
5769  Community / Creative / Re: While You Work on: June 09, 2010, 04:00:55 AM
Impossible. I keep it on a stool next to the tub, below the edge of it.
5770  Community / Creative / Re: While You Work on: June 09, 2010, 03:47:12 AM
Nice, hot water (or cold, if I went in there because of heat).
5771  Developer / Technical / Re: C++ users: SDL or SFML? on: June 09, 2010, 02:58:27 AM
I'd be interested in getting to know this too.
5772  Developer / Technical / Re: The grumpy old programmer room on: June 09, 2010, 02:42:34 AM
The function, notated in pseudocode, was declared like this:

Code:
Type *function()
 {
    if (a < b)
        return NULL;
    else
        return pointer;
 }

This was a mistake, because a should be > b for it to return NULL, but I made a spelling mistake that I never noticed and then had to suffer for it.
5773  Community / Creative / Re: While You Work on: June 09, 2010, 02:07:26 AM
I have to add that I do like half my work in the tub. It's awesome.
5774  Community / Creative / Re: Keyboard Control Poll on: June 09, 2010, 01:22:05 AM
I've never seen WASD spelled as SAWD. That's what I guess I prefer, though, but I'm right handed; any game using both the mouse and keys for steering should provide both arrows and WASD; right-handed people use WASD, and left-handed people use the arrows.
5775  Developer / Technical / Re: The grumpy old programmer room on: June 09, 2010, 12:59:13 AM
The pointer was returned by a function which was supposed to return NULL if a value was > than another value. I had accidentally written <, and so NULL was always returned.
Don't you have a debugger?  That would have told you your problem straight away.
It wasn't a problem in that sense.
It was a problem in that my selection checking if the pointer was of a certain datatype failed because the pointer was NULL.
It was not a problem in that the program did not compile, or segmentation faulted or something like that. It ran fine; certain important selections failed causing certain events not to get invoked.
It was a problem for me, but not a problem in the program, if you see what I mean. I knew that the pointer contained the wrong value all along, but I didn't know why, and the reason it worked with one pointer was because that pointer was retrieved using a different function.
5776  Developer / Technical / Re: The grumpy old programmer room on: June 09, 2010, 12:48:57 AM
The problem? I had accidentally written < instead of > in a function.
How was that affecting the cast?
The pointer was returned by a function which was supposed to return NULL if a value was > another value. I had accidentally written <, and so NULL was always returned.
5777  Developer / Technical / Re: The grumpy old programmer room on: June 08, 2010, 11:44:39 PM
HAHAHAHA!

You know how I told you about the dynamic cast problem the other day?
It had been a mystery for like over a week. I solved it today.
The problem? I had accidentally written < instead of > in a function.
5778  Developer / Technical / Re: Trying to design an item system in Game maker. on: June 08, 2010, 10:27:08 PM
I'm glad to be able to help.
How's it working out for you? Have you tried anything yet?
5779  Developer / Technical / Re: The grumpy old programmer room on: June 08, 2010, 01:00:17 AM
I start treating the parenthesis like code blocks when they get too long

Code:
if(
  enormouslyLongConditionWithALotOfEquations() &&
  otherStupidlyLongCheckThatCanOnlyBeReadInATextEditorWithWordWrap()
)
{
  doIt();
}
I kind of do that, but not that extreme:

Code:
if (enormouslyLongConditionWithALotOfEquations() &&
    otherStupidlyLongCheckThatCanOnlyBeReadInATextEditorWithWordWrap())
    doIt();
5780  Developer / Technical / Re: Trying to design an item system in Game maker. on: June 07, 2010, 11:56:09 PM
Game Maker is object-oriented. Take advantage of this fact.
In general, two main classes (in Game Maker called objects) should be enough; Inventory and Item.
Inventory will be a class actually containing items, and Item will be a superclass to derive any individual types of items from.

The Inventory class should contain functionality for drawing the inventory and manipulating it in any way the user should be allowed to.
This might include deleting items or putting them in a different order, and hovering over them to see a description.

The Item class could be pretty simple to begin with.
Assign it a few variables; title, description, attack, defense and level, for example, depending on what you want.
Another handy property would be a variable containing the allowed amount of items of a certain kind to stack in one inventory slot.
The sprite of each item should be the icon to display in the inventory. The base class Item needs no sprite.

As you want to create new types of items, derive them from the original Item class, setting it as its parent, and assign a sprite.
Then set the proper values for the variables you previously declared in the base class; you even have the opportunity of randomisation, as previously suggested.

Now, move back to the Inventory class. This class should contain an array, in which items are to be put.
When drawing the inventory, loop through the elements of this array, and properly place them into the inventory grid, retrieving the sprite member variable from each item.
If you have decided for item stacking to be present, also print out the amount of items in the current stack in the loop; this should also be handled by an array in the Inventory class.

Now check the position of the mouse. If it's hovering over one of the icons (do a simple rectangle check), draw a box displaying the title, description, required level and anything else you want in there, also retrieved from the member variables of the instance in the current index of the array in your iteration.
If you've discovered that the mouse is hovering over the icon, you also want to check for clicks for interaction; a left click might do one thing with the item, and a right click might do another thing. If the icons should be able to be moved around, holding down the mouse should obviously allow you to drag this icon around until the mouse is released, and something else should happen depending on where the player decided to let go of the mouse button.

I hope this can point you in the right direction and shed some light upon your confusion.
Pages: 1 ... 287 288 [289] 290 291 ... 299
Theme orange-lt created by panic