Stratos: Punto de Encuentro de Desarrolladores

¡Bienvenido a Stratos!

Acceder

Foros





Menu

Mostrar Mensajes

Esta sección te permite ver todos los posts escritos por este usuario. Ten en cuenta que sólo puedes ver los posts escritos en zonas a las que tienes acceso en este momento.

Mostrar Mensajes Menu

Temas - Mikenoworth

#1
CRM32Pro / Hello Again
06 de Abril de 2011, 03:37:35 AM
 Hows it going? I haven't been on here for awhile.

But I still check in from time to time.

I'm still using CRM32Pro, it really gets the job done when you wanna make an SDL game.

I think I'll change my name on here, if I can. I don't like it anymore. :P

Anyway. Azazel, maybe update website with a "Hey I'm still alive." post :)

I know we all have lives outside our personal projects.

So peace out.
#2
CRM32Pro / IButton->GetState() On Right-Click Bug??
29 de Octubre de 2007, 06:03:05 AM
IButton->GetState((SOME_INPUT_BOX)) returns an invalid state when you right-click on an input box.

I am removing the load and save buttons in the map editor to save visual space, so I decided to use a left-click & right-click mouse interface on the input boxes but when you right click on the input boxes IButton->GetState whines that the state is invalid and forces it to 1 instead of returning the invalid state.

Looks to me like you planned on implementing a state for right-clicks but forgot about it ???

Anywho it would be sweet if you could patch this - I almost require this without doing a buttload more work re-implementing save and load buttons. :)

P.S. I didn't check for buttons, but they may also return invalid states for right-clicks. Im sure you will know the answer to that as well.
#3
CRM32Pro / CRM32Pro complient Map Editor v1.6!!
23 de Octubre de 2007, 03:34:37 AM
I have finally released a stable version of my Map Editor that has some cool new features like Layer support!

Lots of thanks to Azazael for patience and motivation!

Latest changes: (v1.6 only)

 v1.6:
   10/22/07 - So many code changes!!
      - Moved map code to a Map Window Module for handling map editting, loading,
      saving, etc. Look at Map.h & Map.cpp for the map format & etc.
      - Added Tileset Window Module for the Tileset picking menu that is shown.
      - Added a resource module that contains all of the resources used by the map
      editor, as well as a resource loader function that initially loads all
      of the resources used by the map editor.
      - Fixed Prev / Next layer buttons. They now use the IButton Interface.
      - Rearranged the info window so now it is always shown and visually takes up
      less room.
      - Removed the MapManager namespace. It was pointless. :)
      - Changed the Map::XOffset and YOffset from floats to ints. This makes all
      previous maps made with the editor non-compatible.
      - The entire map editor now uses one Input Module for keyboard & mouse input
      instead of using all of the various sdl/crm32pro input methods which had
      thrown any kind of input standard out the window.
      - Created a Main Window Module which renders/performs logic for elements of the
      editor that don't fit into any other module. This clears up alot of code.
      - Removed some redundant and performance hitting rectangle drawing that was
      being done twice behind the Tileset Palette.



I hope you don't mind me posting this here. :)
#4
CRM32Pro / I am alive
21 de Septiembre de 2007, 04:25:41 AM
Ahh! Life caught up with me! But I am back and hopefully I can contribute again! I will have alot of updating and fixing of my system (upgraded, woot!) but in no time at all I will be back working with crm32pro!!!

Sorry for the lost time and lost support of the map editor, azazel.
#5
CRM32Pro / Inquiry on Text Input progress..
21 de Febrero de 2007, 09:50:58 PM
Hello. :) Ran into another situation where I use Text Input buttons!

 Having done that, I decided to inquire if you've had a chance to work out the bug and add the capital letters feature? (shift/capslock)

 I'm still using them in hopes a future version will have a fix + the caps  feature.

 Of course, there is no rush - I can code through it easily.
#6
CRM32Pro / The Map Editor - ATTN: TheAzazel
03 de Febrero de 2007, 10:02:30 AM
Well after a bunch of moping around wishing I knew what to code next, the editor is in a good state!!

 Lots of fixes/changes (GUI changes mostly..).  I still haven't added layers to the maps, not sure if I want to - as it isn't required for my game project :).

 The main issues are:

 Each tile is stored in a data array as a short like so:

   tile = data[ ((map x size * y position) + x position) ];

 Sadly, this leaves no room for other data. I was thinking about expanding it to a long, using the two extra bytes for tile flags, which could tell the game if the tile is accessible to the player or not. (ie. tile collision)
 
 But this would definitly complicate things and force me to expand the editor past what I intended it for. ;)  Besides all that, I want to move on to the actor (sprite) editor and then finally the game itself. So I've decided to release the editor to the public and call it good.
 
 I will include 100% source - Which will expose the inner-workings of the maps themselves - Letting anyone expand upon the basics I've put down. One big thing to note is I use MSVC 7.1, and cannot give support for other compiler packages. I simply don't know how to use them.

 The main editor code is something of a mess, but the map module is pretty clean, just not well-commented. All of the memory leaks that _I_ created have been removed (From the looks of it SDL creates alot of memory leaks on it's own.)

 Anywho, if you want to distribute the editor via your website, that would make it easier on me - I have no place to put the darn thing myself.

 A last bit on the editor before I go: There are some good editors listed on the crm32pro website, which are more flexible/featured than mine. I would rather use them if I didn't have to have things my way.  :lol:  But I would be proud if you wanted to use it to display how awesome CRM32Pro is.  :wink:

 p.s. - Thanks for all the help! 8)
#7
You're gonna kill me on sunday Azazel ;)

  With IStuffDPF I want to Load a DPF, find all the tilesets in the DPF and list them, select them, use 'em, etc.. (in a map editor)

  But I need to know what the format for DPF_BlockData::data is for a Tileset.

  Thanks in advance!
#8
I don't know if you know, but Input boxes are all messed up. :)

  [edit] I've got SetTextRect working, I checked the docs and it says something like "Call SetTextRect if you re-position the buttons." So ok, fixed that. :)

  However, the problem is when I type, I get double characters sometimes, and if you have  more than one key pressed at once (happens alot) the text input will fill up with characters instantly. Also, text input buttons don't support CAPSLOCK or the SHIFT key, why not????

Again,  ?? Whats up with Input boxes??  8)

[/edit]
#9
CRM32Pro / CRM32Pro_CSprite::SetPosition(x, y, 1 ?? )
10 de Enero de 2007, 09:42:43 PM
// cascades the sprites
CRM32Pro_CSprite* cspr = get_spr(spr2);
cspr->SetPosition(10, 10, 0);
cspr = get_spr(spr3);
//cspr->SetPosition(20, 20, 0);
cspr->AutoRestore(0);

//cspr = NULL;

int x = 60, y = 60;

while(!done)
{      
++x; ++y;
cspr->SetPosition(x, y, 1);
spr_man_logic();

while(CRM32Pro.Update(&event))
{
switch(event.type)
{
case SDL_MOUSEBUTTONDOWN:                
break;
case SDL_QUIT:
done = 1;
break;
case SDL_KEYDOWN:
if(event.key.keysym.sym == SDLK_ESCAPE) done = 1;                    
break;
default:
break;
}
}
}


I've tried multiple methods, but the result is always the same - The sprite seems to repeat the path, drawing copies of itself throughout the path.

I've done exactly what the rabbit example does with movement. yet, it's crud. What did I miss?

spr_man_logic() simply sorts the sprites on a per layer basis, and checks for collision, it does nothing with the sprites position.
#10
CRM32Pro / Pixel perfect? Collision Detection
06 de Enero de 2007, 11:21:24 PM
I was wondering how the collision is done with the Collision method. Once collision is found out the be probable - Does it check every pixel of both sprites?

 If so, here is an article on how you can cut out alot of useless pixel checking..

 http://www.gamedev.net/reference/articles/article754.asp

 Is this method similar to the one used in CRM32Pro? Or does this one cut down on pixel-checks?

 I've been looking for ways to *avoid* extreme performance loss on collision checks, because I simply cannot use the Collision method provided by CRM32Pro.

Has any one else had such high performance loss with this method?

 Anywho.. Going back to gamedev to read more. ;)
#11
CRM32Pro / Speed issues
16 de Diciembre de 2006, 11:17:09 AM
I've always had this issue with crm32pro, so it's nothing new. I'm not sure if I'm doing anything wrong, but using the default renderer for win xp using CTile to display about 13 x 11 tiles on the screen + two CRM32Pro_Ssprite sprites - the performance on an 800mhz pc 320mb mem., ati radeon 9600 pro is < ~20 fps with 800x600x32. At 800x600x16 the speed is upped maybe 5 to 10 fps. At 800x600x8 it's really good, but my gfx use their own palettes, up to 80 colors each so things like my text which use the color 4, 4, 4 get converted to 0, 0, 0 and therefore are transparent. I don't want to hack it and change the colorkey just to get a good frame rate on a bpp that's hardly ever used anymore. Plus for some reason it crashed really hard at 8bpp fullscreen, but doesn't at 16 or 32. (or 24, if its supported, I never tried it.)

I've optimized the tile display as far as I can, but I'm not sure how to up performance, oh and compiling as release has all kinds of nice issues. (CTile's don't display!!) Also, when I run the program compiled as debug from it's directory, nothing shows and it eventually quits out with no errors, no error info in the log file. When it's compiled as release the sprites show, but the CTiles don't, again no errors.

And I guess you know about this, but the directx renderer is either trying to access or free memory of an invalid pointer when it shuts down so I avoid using it, even though it is very fast.I will list the CTile display code, but i see nothing obviously wrong with it.


class Static_Layer
{
public:
Static_Layer(char* DPF, char* name, int size=256, bool repeat=false)
{
Tileset = new CRM32Pro_CTile();
if(!Tileset->Load(DPF, name))
return;

// set offset to the bottom of the layer of tiles
y_offset = (size - 11) << 6; // 6 = * 64
// set size of map in y coord amount of tiles.
y_size = size;
// if map scrolling repeats
y_repeat = repeat;

// log debug info
#ifdef _DEBUG
Test_Fill();

Tileset->Info();
#endif
}
~Static_Layer(void)
{
delete Tileset;
}

void Test_Fill(void)
{
// fill in some random tiles for ground
for(int x = 0; x < 13; ++x)
for(int y = 0; y < y_size; ++y)
{
// temp
data[x][y] = CRM32Pro.Rand() % 5 + 1;
}
}

void Do(float offspeed=1.0f)
{
if(!Tileset) return;

int x = 0;
int y = 0;
// draw the ground
for(x = 0; x < 13; ++x)
for(y = 0; y < 11; ++y)
{
// temp
// << (shl) is multiply
// >> (shr) is divide
Tileset->SetTileSet( 1, 64  );
int xpos = (x << 6);
int ypos = (y << 6) - (y_offset%64) - 32; // 32 pixel shift downwards
int tiley = (y+(y_offset >> 6));
int tile = data[x][tiley];
Tileset->SetPosition(xpos, ypos);
// check for error
if(tiley>0)
{
tiley = 999;
Tileset->Draw(0, data[x][0]);
}

// on-screen debug info - "yard lines"
#ifdef _DEBUG
if(x==12)
{
char* info = new char[43];
sprintf_s(info, 42, "[%i]", tiley);
Font->PutString(CRM32Pro.screen, xpos - 4, ypos, info);
delete info;
}
#endif
}

// on-screen debug info
#ifdef _DEBUG
char* info = new char[43];
sprintf_s(info, 42, "[Map_Layer First Tile = %i]", (y_offset>>6));
Font->PutString(CRM32Pro.screen, 1, 1, info);
sprintf_s(info, 42, "[Map_Layer Last Tile = %i]", y + (y_offset >> 6));
Font->PutString(CRM32Pro.screen, 1, 24, info);
sprintf_s(info, 42, "[Map_Layer.Y_Offset = %i]", y_offset);
Font->PutString(CRM32Pro.screen, 1, 48, info);
delete info;
#endif

y_offset -= (int)offspeed;
}

private:
CRM32Pro_CTile* Tileset;
// screen of 64x64 tiles WxH = 13 x 11
// max map size = 13 x 512
int data[13][512];
int y_size;
int y_offset;
bool y_repeat;
};
#12
CRM32Pro / CTile
15 de Diciembre de 2006, 01:31:08 AM
// temp
Tileset->SetTileSet( 1, 64  );
Tileset->SetPosition( /*1+*/(x * 64), (y * 64) - (y_offset%64) - 64);
Tileset->Draw(0, data[x][ y + (y_offset / 64)]);


I fixed my problem :)
#13
CRM32Pro / Blowing up chickens!
13 de Diciembre de 2006, 10:24:02 AM
Ah man it's been so long! So I noticed my old project is actually in the games list under links - The one with the chickens. :) Hehe.

I can't remember why, but for some reason the source and data were all erased.

Now with how proud I was that I made that crazy game, and how much I talked to one of the developers, I wonder if I had sent it to him and if so, if he still has it?? And if he still has it, if he could email it to me??

My memory is pretty vague from that time I was working closely with crm32pro, but I do know it was fun - and I've again picked up the library to create another game!

Plus, If anyone has my game, I want to get it to show it off to my girlie. Yeah I'm full of pride.  :twisted:





Stratos es un servicio gratuito, cuyos costes se cubren en parte con la publicidad.
Por favor, desactiva el bloqueador de anuncios en esta web para ayudar a que siga adelante.
Muchísimas gracias.