• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Dancho

Members
  • Content count

    21
  • Joined

  • Last visited

Community Reputation

151 Neutral

About Dancho

  • Rank
    Member
  1. ok,2 things... 1.) when you download latest fasm package you receive pdf document about assembly and fasm programming , study it and you will understand what is section and @@ and etc ... 2.) for windows programming APIs download some PSDK and check console func you are using here This code is very simple and you should really understand it before going further...
  2. ok try this snipet and study it for a while, see where you were wrong... format PE console entry cmain include 'win32ax.inc' section '.code' code readable executable cmain: invoke GetStdHandle,STD_INPUT_HANDLE mov [inHandle],eax invoke GetStdHandle,STD_OUTPUT_HANDLE mov [outHandle],eax ; @@: invoke ReadConsole,[inHandle],buffer,MAX_PATH,cRead,0 sub [cRead],2 .if [cRead]=1 stdcall PrintMessage,<'Going Out Now',13,10,0>,15 jmp @f .else stdcall PrintMessage,<'Write Only 1 Char',13,10,0>,19 invoke RtlZeroMemory,buffer,MAX_PATH jmp @b .endif @@: invoke ExitProcess,0 proc PrintMessage uses esi edi ebx,text,len local cWritten:DWORD invoke WriteConsole,[outHandle],[text],[len],addr cWritten,0 xor eax,eax ret endp section '.data' data readable writeable inHandle dd 0 outHandle dd 0 cRead dd 0 buffer rb MAX_PATH section '.idata' import data readable library kernel32,'kernel32.dll' include 'api\kernel32.inc'
  3. check theForger's Win32 API Tutorial,they are covering dialog boxes among other things...
  4. check this : Software optimization resources by Agner
  5. well,if you want to copy string "Bar" to the element descrip then you can do something like this... and btw you cant do direct mem to mem copy in asm... .686 .model flat,stdcall option casemap:none include kernel32.inc includelib kernel32.lib Room Struct descrip BYTE 100 DUP (?) east DWORD ? Room ENDS .data testroom Room <"A Simple Room",10> bar byte "Bar",0 .data? .code start: mov ecx,lengthof bar mov esi,offset bar mov edi,offset testroom.descrip rep movsb invoke ExitProcess,0 end start btw check this forum
  6. Another great ide is:RadASM
  7. check Pelles C http://smorgasbordet.com/pellesc/ you can write loops like that without problems...
  8. @ToohrVyk Isnt your syntax for fputs wrong ? I belive this is correct: int fputs(const char * string, FILE * stream); String is first and stream second argument...
  9. popular assembly communities with friendly members are: The Masm Forum - http://www.masm32.com/board/index.php ASM Community - http://www.asmcommunity.net/ if you want to learn something about assembly programming check it...
  10. hm, the debug version works when I declare HeightMap object as global, like this : #include <iostream> using namespace std; class HeightMap { static const int width=1024; static const int height=1024; public: char map[width][height]; }; HeightMap hm; int main() { return 0; } well,dont know what to think now :)
  11. @Antheus thx, I also think that dynamic allocation is right way to do this,but I was just wondering why release version runs and debug crash and why MinGW works where VC++ doesnt...
  12. @ToohrVyk thx for explanation...
  13. so I have this simple code ( just to demonstrate problem ) #include <iostream> using namespace std; class HeightMap { static const int width=1024; static const int height=1024; public: char map[width][height]; }; int main() { HeightMap hm; return 0; } and it compiles without errors with Visual C++ 2005 EE ( debug and release version ) but it crashes when I try to start debug version , but release version starts normally. On the other hand latest Code::Blocks 8.02 also compile fine and runs debug&release version without crashes. If someone could explain this I would be very grateful. thx
  14. Hi all, The problem is simple but solution is beyond my current knowledge so I'm asking for some help... This little snippet is just for example,it is classic win32+opengl beginner combo,compile/run it and small blue triangle wii be shown it,and then start your favorite screensaver and cancel it and small blue triangle is gone,i.e it isnt redraw again... Now Im not asking how to prevent screensaver to start,I know that,just how to force redraw of the window... As you can see I attempt something with wm_paint message but it isnt working,so Im little lost now what to do... thx all #include <windows.h> #include <gl/gl.h> #include <gl/glu.h> LRESULT CALLBACK win_proc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam); bool register_window(HINSTANCE hinstance); HWND create_window(HINSTANCE hinstance); void setup_pfd(HDC hdc); void initgl(); void render_triangle(); const char app_class_name[]="OpenGL Class"; const char app_win_name[]="OpenGL Window"; const int WINDOW_WIDTH=800; const int WINDOW_HEIGHT=600; HDC g_hdc=NULL; HGLRC g_hrc=NULL; int WINAPI WinMain(HINSTANCE hIns,HINSTANCE hPins,LPSTR cmd,int show) { HWND hwnd=NULL; MSG msg={0}; if(!register_window(hIns)) exit(EXIT_FAILURE); hwnd=create_window(hIns); if(hwnd==NULL) exit(EXIT_FAILURE); ShowWindow(hwnd,SW_SHOW); UpdateWindow(hwnd); bool running=true; initgl(); while(running) { if(PeekMessage(&msg,NULL,0,0,PM_REMOVE)) { if(msg.message==WM_QUIT) running=false; TranslateMessage(&msg); DispatchMessage(&msg); } render_triangle(); SwapBuffers(g_hdc); } return (int)msg.wParam; } LRESULT CALLBACK win_proc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam) { static HDC hdc=NULL; PAINTSTRUCT ps={0}; switch(msg) { case WM_CREATE: hdc=GetDC(hWnd); g_hdc=hdc; setup_pfd(g_hdc); g_hrc=wglCreateContext(g_hdc); wglMakeCurrent(g_hdc,g_hrc); break; case WM_CLOSE: case WM_DESTROY: case WM_QUIT: wglMakeCurrent(g_hdc,NULL); wglDeleteContext(g_hrc); PostQuitMessage(0); break; case WM_PAINT: BeginPaint(hWnd,&ps); render_triangle(); EndPaint(hWnd,&ps); break; } return DefWindowProc(hWnd,msg,wParam,lParam); } void initgl() { glClearColor(0.0,0.0,0.0,0.0); glViewport(0,0,WINDOW_WIDTH,WINDOW_HEIGHT); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(0.0,(GLdouble)WINDOW_WIDTH,0.0,(GLdouble)WINDOW_HEIGHT); glMatrixMode(GL_MODELVIEW); } void render_triangle() { glClear(GL_COLOR_BUFFER_BIT); glLoadIdentity(); glTranslatef(400,300,0.0); glBegin(GL_TRIANGLES); glColor3f(0.0,0.0,1.0); glVertex2i(50,0); glVertex2i(25,25); glVertex2i(0,0); glEnd(); } bool register_window(HINSTANCE hinstance) { WNDCLASSEX wc; memset(&wc,0,sizeof(WNDCLASSEX)); wc.cbSize=sizeof(WNDCLASSEX); wc.style=CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc=win_proc; wc.cbClsExtra=0; wc.cbWndExtra=0; wc.hInstance=hinstance; wc.hIcon=LoadIcon(NULL,IDI_APPLICATION); wc.hCursor=LoadCursor(NULL,IDC_ARROW); wc.hbrBackground=NULL; wc.lpszMenuName=NULL; wc.lpszClassName=app_class_name; wc.hIconSm=LoadIcon(NULL,IDI_APPLICATION); if(!RegisterClassEx(&wc)) { MessageBox(0,"Window Registration Failed","Error",MB_ICONERROR | MB_OK); return false; } return true; } HWND create_window(HINSTANCE hinstance) { HWND hwnd=NULL; RECT window_rect={0}; DWORD exstyle=0; DWORD style=0; exstyle=WS_EX_APPWINDOW | WS_EX_WINDOWEDGE; style=WS_OVERLAPPEDWINDOW ^ WS_MAXIMIZEBOX; window_rect.left=0; window_rect.right=WINDOW_WIDTH; window_rect.top=0; window_rect.bottom=WINDOW_HEIGHT; AdjustWindowRectEx(&window_rect,style,FALSE,exstyle); hwnd=CreateWindowEx(exstyle, app_class_name, app_win_name, style, CW_USEDEFAULT, CW_USEDEFAULT, window_rect.right-window_rect.left, window_rect.bottom-window_rect.top, 0, 0, hinstance, NULL); return hwnd; } void setup_pfd(HDC hdc) { PIXELFORMATDESCRIPTOR pfd; int pixel_format; memset(&pfd,0,sizeof(PIXELFORMATDESCRIPTOR)); pfd.nSize=sizeof(PIXELFORMATDESCRIPTOR); pfd.nVersion=1; pfd.dwFlags=PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER; pfd.iPixelType=PFD_TYPE_RGBA; pfd.cColorBits=32; pfd.cDepthBits=24; pfd.iLayerType=PFD_MAIN_PLANE; pixel_format=ChoosePixelFormat(hdc,&pfd); SetPixelFormat(hdc,pixel_format,&pfd); }
  15. try Pelles C... http://smorgasbordet.com/pellesc/