Jump to content
  • Advertisement

danne89

Member
  • Content Count

    131
  • Joined

  • Last visited

Community Reputation

133 Neutral

About danne89

  • Rank
    Member
  1. Hi everybody! I'm a sort of typical pacifist, who believes some fictional violence are acceptable. However, I would prefer if there where games suitable for younger children, I am talking about people under the age of 7, where they can train their social skills in the same extent as todays hack and slash MMORPGs. Do you get my point here? I'm not entirely against fictional violence, but I would much rather see games, and in particular MMOs, based on other underlying premesis. And today I havent met anybody who can give me a good game design for a MMO, which isnt entirely based on grinding.
  2. danne89

    I lost my geometry

    nevermind. I think I fixed it.
  3. Hi! See what you can make out of this: #include "terrain.h" #include <SDL.h> #include <GL/gl.h> #include <GL/glu.h> TerrainBlock::TerrainBlock(const char* path) { char data[5][5]; FILE* f = fopen(path, "r"); if (f == NULL) { printf("Error opening %s\n", path); exit(1); } if (fread(data, 1, 25, f) != 25) { printf("Coulndt read 25 elements\n"); exit(1); } displayList = glGenLists(5); for (int base = 0; base < 4; base++) { printf("displaylist = %d\n", displayList + base); glNewList(displayList + base, GL_COMPILE); glBegin(GL_TRIANGLE_STRIP); printf("%d, %d, %d\n", base + 0, data[base + 0][0], 0); printf("%d, %d, %d\n", base + 1, data[base + 1][0], 0); printf("%d, %d, %d\n", base + 0, data[base + 0][1], 1); printf("%d, %d, %d\n", base + 1, data[base + 1][1], 1); printf("%d, %d, %d\n", base + 0, data[base + 0][2], 2); printf("%d, %d, %d\n", base + 1, data[base + 1][2], 2); printf("%d, %d, %d\n", base + 0, data[base + 0][3], 3); printf("%d, %d, %d\n", base + 1, data[base + 1][3], 3); printf("%d, %d, %d\n", base + 0, data[base + 0][4], 4); printf("%d, %d, %d\n", base + 1, data[base + 1][4], 4); glColor3f(1.0, 1.0, 1.0); glVertex3d(base + 0, data[base + 0][0], 0); glVertex3d(base + 1, data[base + 1][0], 0); glVertex3d(base + 0, data[base + 0][1], 1); glVertex3d(base + 1, data[base + 1][1], 1); glVertex3d(base + 0, data[base + 0][2], 2); glVertex3d(base + 1, data[base + 1][2], 2); glVertex3d(base + 0, data[base + 0][3], 3); glVertex3d(base + 1, data[base + 1][3], 3); glVertex3d(base + 0, data[base + 0][4], 4); glVertex3d(base + 1, data[base + 1][4], 4); glEnd(); glEndList(); } } void TerrainBlock::render() { for (int i = 0; i < 5; i++) glCallList(displayList + i); } int main(int argc, char** argv) { if(SDL_Init(SDL_INIT_VIDEO) == -1) { return 1; } SDL_Surface* screen = SDL_SetVideoMode(640, 480, 32, SDL_HWSURFACE |SDL_OPENGL | SDL_DOUBLEBUF); if(screen == NULL) { return 1; } SDL_WM_SetCaption("Hej", "Hej"); TerrainBlock* tb = new TerrainBlock("test.dat"); int fps = 0, ff = 0; float lastframe = 0, thisframe = 0; bool running = true; SDL_Event event; while (running) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); tb->render(); SDL_GL_SwapBuffers(); while(SDL_PollEvent(&event)) { switch(event.type) { case SDL_KEYDOWN: switch(event.key.keysym.sym) { case SDLK_q: case SDLK_ESCAPE: running = false; break; } break; case SDL_QUIT: running = false; break; } } thisframe = SDL_GetTicks(); ff++; if((thisframe - lastframe) > 1000) { fps = ff; ff = 0; lastframe = thisframe; } } delete tb; SDL_Quit(); return 0; }
  4. danne89

    how to store maps in 3D?

    heighmaps, perhaps?
  5. danne89

    Save bitmaps in HDC's

    Ohh! How awfully ambarresed i am.
  6. danne89

    Save bitmaps in HDC's

    It still doesn't work: case WM_CREATE: hdc = GetDC(hWnd); hLogo = CreateCompatibleDC(hdc); hBitmap = CreateCompatibleBitmap(hdc, logo_width, logo_height); ReleaseDC(hWnd, hdc); hOldBMP = (HBITMAP)SelectObject(hLogo, hBitmap); for (y = 0; y < logo_height; y++) { for (x = 0; x < logo_width; x++) { HEADER_PIXEL(logo_data, pixel); SetPixel(hLogo, x, y, RGB(pixel[0], pixel[1], pixel[2])); } } return 0; case WM_PAINT: hdc = BeginPaint(hWnd, &ps); BitBlt(hdc, 0, 0, logo_width, logo_height, hLogo, 0, 0, SRCCOPY); EndPaint(hWnd, &ps); return 0;
  7. Hi! Can anyone try to explain why you cannot do like this: case WM_CREATE: hdc = GetDC(hWnd); hLogo = CreateCompatibleDC(hdc); ReleaseDC(hWnd, hdc); for (y = 0; y < logo_height; y++) { for (x = 0; x < logo_width; x++) { HEADER_PIXEL(logo_data, pixel); SetPixel(hLogo, x, y, RGB(pixel[0], pixel[1], pixel[2])); } } return 0; case WM_PAINT: hdc = BeginPaint(hWnd, &ps); BitBlt(hdc, 0, 0, logo_width, logo_height, hLogo, 0, 0, SRCCOPY); EndPaint(hWnd, &ps);
  8. Hi! I thought it would be nice to use GNU flex to read in my files. I was wrong. I'm expering some strange error. The program just crash. Here is the lex file: %% [0-9]..."-"[0-9]."-"[0-9]. SetCurrentTo(yytext); "-"[0-9]+ SetCurrentTo(yytext); [0-9]+ SetCurrentTo(yytext); [0-9]+"."[0-9]+ SetCurrentTo(yytext); "False"|"True" SetCurrentTo(yytext); , MoveAlong(); '\n' NextEntry(); [ \t]+ ; . PrintError(yytext); %% int yywrap() { printf("In yywrap"); return 1; } And yylex() is called like: .... yyin = f; yylex(); printf("Back!\n");a fclose(f); ParseFileName(mf, path); return 0; } My output is: Comma yytext = 1 Comma yytext = True Comma yytext = 2005-12-22 Comma yytext = 90 Comma yytext = 60006232 Comma yytext = 10000020 Comma yytext = 30001669 Comma yytext = 5 Comma In yywrap ... and then it crash Anyone got any thoughts about this? // Daniel Lännström
  9. I would go for c# and gdi+. You can simply download the necessary files from MSDN and get going. I can be a useful experince to have tried a .NET language as it is the future of Windows development. But C++ is an all-around choice.
  10. danne89

    My first 3D Game

    I just "finished" my first 3D game! Yeah, I know, it is quite boring and a little ugly. I would like some comments though. ragn.dyndns.biz/ragnhild3d.zip
  11. danne89

    Basic collision detection

    Yeah, you are so right.
  12. Hi! I'm making my first 3D game. I like to restrain the player in a certain area. What I'm doing right now is: if(playerPosZ < 6.0 && playerPosZ > -6.0) { move() } ... The problem is, that you begin to glide when you move towards a wall in an angle. My friend say this is a common problem, but still I cant find any information about it neither here nor using Google. Daniel Lännström
  13. danne89

    One-way function??

    Do MMORPGs use public-key protocols to verify passwords? I am reading Applied Cryptography and cannot see any protocols in that book that perfectly forefills the needs of a MMORPG.
  14. MD4, MD5, SHA-0, SHA-1 have all been, more or less, broke. Which are left and which would you use for hashing passwords? // Danne
  15. danne89

    Programmers: Did you Build Your Computer?

    Sorry. I didn't had enough transistors around.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!