Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411125 Posts in 69302 Topics- by 58375 Members - Latest Member: Essential34Games

March 13, 2024, 11:07:49 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
  Show Posts
Pages: [1] 2
1  Developer / Playtesting / Re: Minecraft (alpha) on: May 22, 2009, 03:25:33 AM


I can see through walls!

(I was inside a block created by lava falling on water)
2  Player / Games / Re: Infiniminer on: May 09, 2009, 05:56:18 AM
Hehe, thanks for hosting that Hideous! I seem to have lost a significant portion of my day >.>

Also, I'm totally in that screenshot Evil
3  Player / Games / Re: Infiniminer on: May 09, 2009, 04:08:41 AM
I am hosting a server at 213.66.217.189. No Wippien or Hamachi needed, I believe.

I get an error trying to connect to your server =( Anyone else unable to connect?
4  Player / Games / Re: Infiniminer on: May 09, 2009, 03:15:51 AM
I'll join a bit later, I have a massive structure going on a local server that I don't want to throw away just yet. This game is awesome!
5  Player / Games / Re: Infiniminer on: May 09, 2009, 02:34:35 AM
Hmm the hamachi network is still full. I'd love to try this out properly (i.e. not all alone Tongue), maybe we should get some more networks going or something...
6  Player / Games / Re: Ludum Dare 14 - April 17th-19th on: April 17, 2009, 06:58:33 PM
Starts in one minute!
7  Developer / Technical / Re: Dynamic arrays are killing me! on: April 12, 2009, 09:16:35 PM
I'm actually just making this engine as a learning excersize to familiarise myself with SDL. That happened to mean I'm using C++ instead of C, which I'm more used to, and that was what made me decide to use some OOP. So yeah, I kind of quickly got out of my depth, but I've always found I learn better by doing rather than reading so I'll keep at it. I've got a C++ book around here somewhere so I'll try and find it and read up on STL since it seems you guys think quite highly of it Tongue

So yeah that's my excuse for being hopeless at this! But thanks for all the suggestions and help.

EDIT: I found my C++ book, it's from 1994, is that going to be a problem? It's called 'C++ with Object-Oriented Programming' by Paul S. Wang if anybody's heard of it.
8  Developer / Technical / Re: Dynamic arrays are killing me! on: April 12, 2009, 06:44:55 AM
Quote
To call a member function of an object instance to which you have a pointer, you use the -> operator, although (*pointer).function() does work of course. Use pointer->function() instead.
Thanks, I'm not really all that familiar with classes in C++.

Quote
Your deletes look wrong to me. *tiles[ i ] is of type Tile*, not Tile**, and equal to tiles[ i ][0], which you just deleted. What happens when you use the code I gave you?

Read all of this, particularly this.

Your code gives:
Code:
Heap block at 00BE1FA8 modified at 00BE1FD4 past requested size of 24

Thanks for the link, it was quite helpful. I understand why the code I posted above is wrong now, but I'm still at a loss as to the correct code.

What I'm doing at the moment will delete all the individual Tiles (three times each >.>), but leave the pointers for each row and the pointer to those pointers. Is that correct? Your code should be deleting both of those, and I understand why it should be, but it isn't for some reason.

I'm compiling this using Visual Studio Express 2008, if that helps.

Quote
Hi Alex,

Is there any reason not to use STL vectors?

Working with C-style arrays can be very troubling.

To be honest, I only really know C, but since I'm using a C++ compiler and know Java OOP fairly well I thought I'd chuck a couple of objects. I've never used vectors before, but it does look quite similar to a Java List. I might give it a shot if I can't get this working.

EDIT: Ok I've redone it with vectors. I had one of my compiler options configured wrong, which for some reason only chose to explode the linker when using vectors. But anyway, half an hour and half a glass of caffeine later it works! I'm still interested in the solution to the delete problem above if anyone can figure it out.
9  Developer / Technical / Re: Dynamic arrays are killing me! on: April 12, 2009, 03:24:15 AM
Ah that was stupid of me! Adding (x+1) to malloc worked fine. Thanks a bunch!

I'll have a crack at converting it to new/delete since I am using classes, though it's a bit unfamiliar to me.

EDIT: Done. Your allocation was perfect, but the delete that finally worked for me was:

Code:
for (int i = 0; i < maxX; i++) {
    for (int j = 0; j < maxY; j++) {
        delete tiles[i][j];
    }
    delete [] *tiles[i];
}
delete [] **tiles;

It also took me a while to figure out that to use the tile object I had to do
Code:
(*tiles[i][j]).function()
It didn't work without the extra brackets.
10  Developer / Technical / Dynamic arrays are killing me! on: April 12, 2009, 02:07:08 AM
Hey guys, hopefully someone can give me a hand with this. I'm trying to write a basic tile engine and I thought I'd be fancy and use some classes and all kinds of crap. Long story short, it all works right up until I try to free up some memory from my map class.

Here's what I use to create the array of Tiles (another class):
Code:
this->tiles = (Tile **)malloc(sizeof(Tile *)*x);
for (int i = 0; i <= x; i++) {
    this->tiles[i] = (Tile *)malloc(sizeof(Tile)*y);
}

And nothing I use to free it seems to work without giving some indecipherable errors about heaps and death and destruction being rained down on the unsuspecting bits of my RAM.

I've tried these so far:
Code:
delete [] *tiles;
delete [] tiles;

for (int i = 0; i <= x; i++) {
     free(this->tiles[i]);
}
free(this->tiles);
And various combinations of the two.

If anyone could give me some pointers (no pun intended) to help me in the right direction that'd be awesome. If you need more source code I'd be happy to provide.
11  Developer / Playtesting / Re: The Six on: February 24, 2008, 11:54:31 PM
Nice game! I found it fairly hard but fun (could be cause I'm bad Tongue). Only thing I'd suggest is some kind of explanation of how to play, some people might not guess Z and X. Also, I would've appreciated some checkpoints nearer to the start, I redid that section quite a lot...
12  Player / General / Re: How can I get Windows to support Japanese? on: February 23, 2008, 06:26:00 PM
Vista isn't as bad as everyone says it is, everything works fine on my computer ^_^ A friend of mine has exactly the same computer as me, except with Windows Server 2003 on it (don't ask) and we get pretty much the same fps and loading times for most games.
13  Developer / Technical / Re: Game Engine Tutorial Project on: February 23, 2008, 01:13:09 AM
I'm using XNA at the moment, I find it a bit annoying in places because it kind of does everything for you. I guess that's a good thing, but I liked the freedom I had to just do anything when I was using C++/Allegro. An example would be the content pipeline thing, you have to add all your graphics into the project using the IDE (or at least I haven't found another way, if anyone knows please tell me), whereas in Allegro I just added my graphics to a folder and they were in the game if I needed them.

EDIT: By the way, I use it for 2D only... no idea about the 3D side of things.
14  Player / General / Re: How can I get Windows to support Japanese? on: February 21, 2008, 10:11:39 PM
Hmm, I downloaded the game to test it out and even the readme.txt is weird. The only thing I can think of is that there's a font that the English version of Windows doesn't have or something.

Sorry I couldn't help =(
15  Player / General / Re: How can I get Windows to support Japanese? on: February 21, 2008, 05:16:15 PM
I dunno if this will help but to type in Japanese I use this:

Control panel > Regional and Language Settings > Keyboards and Languages > Change Keyboards > Add > Japanese > Microsoft IME

Then you might want to go between the other tabs and fiddle with the options. This will cause a language bar to display either on the top right of the screen or down in the task bar, so you might want to disable it after you've finished playing Tongue

By the way, those instructions are for Vista but I think it's fairly similar in XP, but you might need the XP CD.
16  Developer / Playtesting / Re: The Adventures of Cendah - Action RPG on: February 21, 2008, 05:08:25 PM
Obviously it's just me with the problem, so don't worry about it Tongue Maybe I just read too many fantasy novels =/
17  Developer / Playtesting / Re: The Adventures of Cendah - Action RPG on: February 21, 2008, 02:48:05 AM
You mean all the half demons you've spoken to?

If it was a design decision to use language like that then it's none of my business, but it looks to me like it's just a matter of poor dialog. Sorry if I'm pedantic but in a role playing game dialog is one of the most important parts...
18  Developer / Playtesting / Re: The Adventures of Cendah - Action RPG on: February 20, 2008, 07:16:57 PM
For that particular bit? I'd at least make it grammatically correct: "I've got to get myself another zeppelin". But I'd probably write it as "I must find new means to travel home and tell my people about this discovery" or something like that.
19  Player / General / Re: Super Smash Brothers Brawl: The Beatdown on: February 20, 2008, 06:49:27 AM
There's no release date for Australia =(
20  Developer / Playtesting / Re: The Adventures of Cendah - Action RPG on: February 20, 2008, 06:46:10 AM
It's very well put together and the graphics/music are great but the dialog is really off putting for me. It just seems odd that a half-demon/half-man warrior from a medieval-like time would say something like "I've got to get me another zeppelin". I'd work on the language a bit if I was you.
Pages: [1] 2
Theme orange-lt created by panic