Jump to content
  • Advertisement

lilington

Member
  • Content Count

    70
  • Joined

  • Last visited

Community Reputation

48 Neutral

1 Follower

About lilington

  • Rank
    Member

Personal Information

  • Role
    Programmer
  • Interests
    Programming

Social

  • Twitter
    @perrinalain44
  • Steam
    cerisegenius

Recent Profile Visitors

4695 profile views
  1. lilington

    Camera and platform Update

    yep, see you soon with more progress.
  2. lilington

    PC Camera and platform Update

    Hello, It's been a while. I was busy again with other stuff but I managed to work on the game engine (less on the game itself) during this time. The new features are not visible for most of them, it is more about code optimization and organization. But now we have a better 2D camera system that I will present right now. The first nice thing is how to use the camera. I just need to initialize, choose among some functions and call the camera update function it in the game loop. void bkp_graphics_2DinitCamera(BKP_Rect dim, BKP_Rect world,int camera_function); //Initialize int bkp_graphics_camera2D(BKP_Dynamics2D P); //Call in main loop to follow the scene void bkp_graphics_2DsetCameraDim(BKP_Rect dim); //obsolete void bkp_graphics_2DsetCameraWorld( BKP_Rect world); //world limits (up,left,down,right) void bkp_graphics_2DsetCameraAuto(float auto_speed); //obsolete use camera2DsetFunc() instead void bkp_graphics_2DsetCameraSpeed(BKP_Vec2 speed); //set a speed other than default void bkp_graphics_2DsetCameraPanic(float up, float down); //set the panic lines for vertical scroll IMPORTANT void bkp_graphics_2DtoggleCamera(void); //Freeze the camera to the current position or unfreeze void bkp_graphics_camera2DsetFunc(int function); //select a camera function Basically, there are only 2 mandatory functions, others are used to change the default values for the camera function, focus or speed. There are more than listed here. Yes, it is possible to change the camera function during the game. Here is an example of how to use it: BKP_Rect world = setMapPlatform(); bkp_graphics_2DinitCamera(bkp_rect(g_scr.w / 4, g_scr.h * 2 / 5, 0.0f, 0.0f), world, BKP_CAMERAFUNC_SMOOTHSTD); bkp_graphics_2DsetCameraPanic(150,50); bkp_graphics_camera2DsetFunc(BKP_CAMERAFUNC_FOCUS); while(Player->input->Cancel == 0) { bkp_input_capture(Player->input); manage_player(); bkp_graphics_camera2D(Player->dyn); Ugp_draw(); _update_fps_counter( fps); //print on the screen FPS and Memory usage _update_memUsage(mem); } 1/get the world dimension from the level layout. 2/ select smoothstd function for scrolling 3/set the up panic at 150 pixels under the top of the screen and 50 over the bottom of the screen 4/we change the current function to FOCUS to tell the camera to scroll to the target instead of just show the player in the centre (look at the beginning of the 2nd video to see the scrolling animation to find the player). The camera will switch automatically to the function passed in 2DinitCamera as soon as the target is locked. By using BKP_CAMERAFUNC_FIXEDSETFOCUS, we will set the camera without scrolling the prior animation to find the player. I organized the code in the way that it is easy to add a new camera function without modification in the game loop. let's have a look. Actually the bkp_graphics_camera2D() is that simple: int bkp_graphics_camera2D(BKP_Dynamics2D P) { int ret = camera2D(&stc_2D->camera, P); if(BKP_TRUE == ret) { bkp_graphics_2DsetCameraSpeed(stc_2D->camera.delta); bkp_graphics_2DTranslateView(stc_2D->camera.speed); // manual } return ret; } int camera2D(BKP_Camera * S, BKP_Dynamics2D P) { if(S->on == BKP_FALSE) //set or unset by toggle() return BKP_FALSE; return TBL_Camera[S->func](S, P); //all functions are in this table } Notice that I pass a BKP_Dynamics2D structure to the camera instead of anything else not general, all objects I want to get focused by the camera should have a BKP_Dynamics2D structure. That's it, Player, NPC, or whatever object so far has that. it is a simple structure with position, dimension, ... So, next time I want to add a new camera I just have to create the function and set a new entry in the enum of camera functions et voila, nothing to change, just add. LOCKON camera : It is just a basic camera where the player is centred everytime it is possible. For horizontal movements it is ok but when it comes to jumps it starts to hurt our eyes. I did it at the beginning just to be able to test the collisions and travel around the map. This camera function is not really usable to play a platform game. STDsmooth camera This function solves the problem with vertical scrolling and smoothly scroll. when changing the direction we can notice the camera scroll to give us some room in the direction the player is facing. On vertical movement, the Camera scrolls only the player is on a platform or if he is going to high (on the video the orange line) here let see the differences between the two functions on vertical movements.(sorry for the gif, gimp decided to annoy me) . You can see on the left gif the player jumping without the camera moving while on the right gif it moves everytime the player move up The lockon camera is used in Soul of Mask, but I keep it here because this is the choice I made for autoscrolling. I made a function auto scroll before which is obsolete (or not, maybe I will delete it maybe not) and replace by the Lockon camera. I just ask the camera to follow a target different than the player. Here on this video, you will see a green square moving around. The camera will use this green scare as a target, that's it I have an auto scroll now: Coming up next: I will stop the game engine and go back to the game development again, the next time we should have the first image of the game. Thanks for reading. Any technical questions ? don't hesitate. I decided to release the engine part on Github and only keep the game part proprietary.
  3. lilington

    Scroll Mem and Text

    s.Yep Yep!! Back again this time with more changes, it is probably the last stop (I hope) before I start to talk about the new game on its own. So what is new. Let see the main function for an overview, here is a test for almost all the features of the game engine: BKP_Entity_Agent * G[3] ; BKP_PlatformMap * Map; BKP_Vec2i g_scr; BKP_Vec2 TWH; //screen ratio based on game artist TWH.w = sprite.w * screen.w / expected.w same with TWH.h int main(int argc, char **argv) { //bkp_setMouse(GLFW_CURSOR, GLFW_CURSOR_DISABLED, mouse_callback, scroll_callback); //bkp_setLogInfo("logdir/",BKP_LOGGER_DEBUG, BKP_LOGGER_FILEOUT | BKP_LOGGER_TERMOUT, BKP_LOGGER_OAPPEND) //change default log //void bkp_setOpenGLInfo(3, 1) //minimal version 3.1 //bkp_setWindowInfo(1024, 768, BKP_TRUE,"BKP Test"); //fullscreen 1024x768 bkp_setWindowInfo(0, 0, BKP_FALSE,"BKP Test"); // window mode, auto detect screen resolution if(bkp_startEngine(argv) != BKP_TRUE) return EXIT_FAILURE; bkp_input_Init(); g_scr = bkp_graphics_getWindowDimensions(); TWH = bkp_graphics_getTWH(1920, 1080); bkp_input_setKeyPauseTimer(.05); G[0] = (BKP_Entity_Agent *) bkp_memory_getTicket(sizeof(BKP_Entity_Agent)); G[1] = (BKP_Entity_Agent *) bkp_memory_getTicket(sizeof(BKP_Entity_Agent)); G[0]->spritesheet = bkp_graphics_2dloadSurface("data/graphics/h_none.png"); G[1]->spritesheet = bkp_graphics_2dloadSurface("data/graphics/platform.png"); init_player(G[0]); setMap(); BKP_Font * myfont; myfont = bkp_graphics_newFont("data/fonts/DejaVuSans.ttf", 64, 128); BKP_ScreenText * fps = bkp_graphics_appendTextPool("do not care", 64, myfont, bkp_vec2(20 * TWH.w,64 * TWH.h), bkp_vec2(.3 * TWH.w,.3 * TWH.h), bkp_vec4(0.98f,0.98f,0.2f,1.0f)); BKP_ScreenText * mem = bkp_graphics_appendTextPool("can't see me", 128, myfont, bkp_vec2(20 * TWH.w,96 * TWH.h), bkp_vec2(.3 * TWH.w,.3 * TWH.h), bkp_vec4(1.0f,1.0f,1.0f,1.0f)); while(G[0]->input->Cancel == 0) { bkp_input_capture(G[0]->input); manage_platforms(Map); //rotating and moving platforms manage_player(G[0]); bkp_graphics_2dscroll(G[0]->dyn.gbox); Ugp_draw(); _update_fps_counter( fps); _update_memUsage(mem); } bkp_graphics_releaseTextPool(fps); bkp_graphics_releaseTextPool(mem); bkp_graphics_freeFont(myfont); unsetMap(); bkp_memory_releaseTicket(G[0]->input); bkp_memory_releaseTicket(G[0]->spritesheet); bkp_memory_releaseTicket(G[1]->spritesheet); bkp_memory_releaseTicket(G[0]); bkp_memory_releaseTicket(G[1]); bkp_logger_write(BKP_LOGGER_INFO,"\t________________________________\n"); bkp_logger_write(BKP_LOGGER_INFO,"\t*POOLS* Allocated : %.1f Kb\n",(float)bkp_memory_allocated() / 1024); bkp_logger_write(BKP_LOGGER_INFO,"\t*POOLS* Used : %.1f Kb\n",(float)bkp_memory_usage() / 1024); bkp_logger_write(BKP_LOGGER_INFO,"\t*POOLS* Free : %.1f Kb\n",(float)bkp_memory_free() / 1024); bkp_stopEngine(); return EXIT_SUCCESS; } For those who have an allergy to global variables don't worry it is just for testing :P. So, now before starting the engine, it is possible to change some engine states by using functions like bkp_set*(); here they are commented. When the engine starts it will set up my memory pools. Those are a number of memory stacks of a different size. Every time I require some memory it will give me a "ticket" (pointer of size N) popped from stack #n. All allocations are made at the first time an object of size N is required. For example, if I want 64bytes and the pool is empty it will malloc(64 * default_number_of_object) then later I will just need to pop the ticket or push it back. There is no garbage collector but memory leaks are detected and logged. PRO: the number of calls to malloc is very low or at least computable before a game starts. CON: the default values may waste memory. However, using bkp_set_memory*() allows changing the parameter for pools of the same memory. Anyway, I will need to make statistics for each game to calculate how to set up the memory manager. G[0] = (BKP_Entity_Agent *) bkp_memory_getTicket(sizeof(BKP_Entity_Agent)); This line shows how to ask a ticket (pop a block). I can show the details of the memory manager if asked. Next is the text-engine (if I can call it like this), it is still temporary as I am still a beginner with freetype and I am not sure I will continue with it at the moment, I used it because I want a result and don't want to reinvent the wheel. The function to draw is the following, it needs a font loaded by bkp_graphics_newFont (not sure if I want to separate Text module and Graphics module yet) void bkp_graphics_renderText(const char * str, BKP_Font * font, BKP_Vec2 pos, BKP_Vec2 scale, BKP_Vec4 color) In the previous code you don't see any calls of that function because I use an OnscreenTextBuffer, it is a buffer of linked lists where each node contains everything to draw a text on screen such as Text, Position, Scale, Color. Any text can be added to buffer with the following: BKP_ScreenText * fps = bkp_graphics_appendTextPool("do not care", 64, myfont, bkp_vec2(20 * TWH.w,64 * TWH.h), bkp_vec2(.3 * TWH.w,.3 * TWH.h), bkp_vec4(0.98f,0.98f,0.2f,1.0f)); Here a pointer to the buffer entry is returned to "fps", so you guess for which purpose. 64 is the size in bytes of the text length. Once set, the size cannot change but the content can be changed, for example, like this: sprintf(fps->text, "%s : %d", "fps = ", vfps); void _update_memUsage(BKP_ScreenText * stext) { ssize_t s = bkp_memory_using(); sprintf(stext->text,"memory pool : %.2fMb | %ldKb |%ld bytes", (float)(s/ 1024) / 1024, s / 1024, s); return; } and the internal function will write all texts like this: void bkp_graphics_OnScreentext() { if(NULL == stc_Btext->head) return; BKP_ScreenText * ps = stc_Btext->head; // if text not initialize will segfault. Warning for(; NULL != ps; ps = ps->next) bkp_graphics_renderText(ps->text, ps->font, ps->pos, ps->scale, ps->color); return; } The last thing I did was scrolling. I didn't do anything fancy or special here, just adding a VIEW matrix in the shader. Every time I move the view portbkp_graphics_2dscroll(G[0]->dyn.gbox); in the GPU otherwise it keeps its values. It is a single function that takes as a parameter a rectangle to focus on. In the following example, the center of the player's bounding box is used as the point of focus: bkp_graphics_2dscroll(G[0]->dyn.gbox); Something I didn't show here is that is possible so set an autoscroll by just giving a default x/y speed to the scroller once again with a function like bkp_set*(). If I comment one of the bkp_memory_releaseTichet() lines at the end we get this in the log file or/and screen: [ INFO ][ 2018-06-21 15:56:08 ] -> Graphics Engine stopped [OK] [WARNING][ 2018-06-21 15:56:08 ] -> Ticket for Memory pool are not all released, **MEMORY LEAK** P(4) s:320 [ INFO ][ 2018-06-21 15:56:08 ] -> Destroying Memory pools[OK] The memory leak is detected in the Pool number 4 (320 bytes/ticket) unfortunately I do not provide a way to find exactly where it is. However, it is already a good hint to find it. Now a small video to show everything. I made the character bounce to show clearly all platforms' properties. What will come next? So far in my learning process I start to go away from my main goal, indeed if this demo shows a Mario like a game, it is not at all what I am making but some features I needed are now present. As an example, the double jump will not be in my game but I implemented it. It is time to pause the game engine development and go to game dev. Next step should be creating the main character and his/her basic movements. I spend a lot of time separating tasks, making the project ready to receive other contributors. That's why I am creating and documenting all the functions. I also have an artist now, not official yet but... Anyway, my experience made me suspicious. Something I have to recognize I am bad at is levelling. I needed such a long time to pass all basic levels of Soul of Mask, this game is difficult and the difficulty doesn't come crescendo, it is too sudden. I didn't even finish the last level, it looks impossible for me. And as always thanks for reading. Until next time ps: I am thinking about making the game engine open-source, for those who read it please tell me in the comment what you think about that Idea.
  4. lilington

    More collisions and little physics

    Hi everybody, It's been a while, hopefully, I have new stuff. let have a look at a video to see the news. - The dark blue platform will make the character move to the right side. you will see it moving right but as there is no animation looks like I move it myself. this is a platform property: slider. - the tiny platform down is just to test the speculative collision if I come with full speed, in this case, it is around 16pixels/frame - the red platform is sticky and slows the character movements (except jump: todo) Property: sticky - the platform just above allow to go through from down, it is not a property but caused by the structure of the platform, all platforms are made with 4 faces with a flag that allows or not to go through that face. It has to be combined with a boolean (allowed_in_platform = True) to allow the character to not be ejected from the platform - the obvious one is the ice platform as you can see you can reach full speed and slide longer before being able to stop. sticky = 0.0f. At 1.0f your object cannot move at all. - Multi-jumps, I just made it easy for game development. It is just a variable to set (here at 2) to decide how many consecutive jumps are allowed. Here I hide the platforms' sprites and show they collision boxes, you can notice they have different size. You can see the character's collision point and bounding box. coming next. more physics, going back the game design and story. next time I should be able to present the beginning of the game. This may take sometimes as I need to make a lot of decision (reversible for some of them) see you soon.
  5. lilington

    Min collisions

    Hey, I have been busy lately, still learning more about OpenGL and of course my work. I should accelerate a little bit now. Now I added a collision engine, very basic at the moment. it is about detecting if a point is inside a platform rotated or not. plus solve the deformation on rotations in the previous entry. Also updated the math functions. Collision: Nothing very fancy, just check if the point is inside the bouncing box if the platform is not rotated it will return collision detected. if the platform has rotated then the point will be rotated opposite angle to go back to the previous situation and do the same check. int bkp_physics_inPlatform2D(BKP_VEC3 point, BKP_Entity_Platform * p) { float X = point.x; float Y = point.y; if(X > p->bbox.x && X < p->bbox.x + p->bbox.w && Y > p->bbox.y && Y < p->bbox.y + p->bbox.h) { if( p->isrotated == BKP_TRUE) { X = X - p->rotate.center.x; Y = Y - p->rotate.center.y; float x = p->rotate.center.x + X * p->cos_a - Y * (- p->sin_a); float y = p->rotate.center.y + X * (- p->sin_a) + Y * p->cos_a; if(x > p->x && x < p->x + p->w && y > p->y && y < p->y + p->h) return BKP_TRUE; } else return BKP_TRUE; } return BKP_FALSE; } Notice that the cos and sin are precalculated each team the platform if it rotates only. avoiding to use too much expensive cos and sin. You can see on the video the mouse cursor becoming red each time it is inside a platform.You can also see on the sprite 8 points that I will be used to make the collision detection. Gravity: on this other video, I activated gravity. but no collision. it is possible to jump in the air to test the effect of jump Well, that's all done for now. I will unify collision detection and gravity, add some penetration resolution and we will see a first step done. next step will be more about game play.
  6. lilington

    Let's start

    Hi everybody, After my first game and story, it is time to start the new one with more experience this time. The primary goal is to avoid the same mistakes, so I will start to talk about it now. It is not the very beginning as I already have 11000 lines of codes. From Soul of Mask experiences, I learn that I should talk about my game as soon as possible. So I will introduce the new game to my two favourite forums GDN and another one in French: Game name: Not sure about it yet and it is not so important now. Game genre: Platform, Adventure. (kind of limbo and Ninja Gaiden mixt) Programming: C core engine, C or C++ game (not decided yet) Graphics: 2D/3D. Graphics lib: OpenGL > 3.5 Audio: Not sure yet (probably OpenAl) Platforms: for the moment Windows 10 and Linux (other may come later or not) Relative to the game ( story, artwork, ....): As I said it didn't start already, but story big picture is finished. So what am I doing now? I am finishing the first part that will make me decide if I continue the project or not. It is essentially technical like object collision, sprite animation, learning more about platform game technic... What did I do? Well, I decided to not use SDL2 as I want to port my game in some platform that does not support SDL. So I choose OpenGL. Plus I plan to use some 3D features in the game. So I mocked SDL2 behaviour and write it very specifically for my game. Here is a screenshot that shows objects rotating. I used a sprite sheet from Soul of Mask, we can also see a red box and a rectangle coming from a function call drawRectangle (more details soon) here we can see the code I will need to write for an animation: bkp_graphics_2dReady(BKP_TRUE); BKP_Rec dest,src; BKP_Rotate r; src.w = 64; src.h = 64; src.x = 2; src.y = 2; dest.w = 92; dest.h = 92; dest.x = 500; dest.y = 200; static float iii = 0; static double tm = 0; static double ta = 0; static int alpha = 255 ; static int dal = 2; tm = glfwGetTime(); //animation timers if(tm - ta > 64.0f / 1000.0f) { ta = tm; iii += .125; if(alpha <=0 || alpha >=255) dal = -dal; alpha += dal; } r.center.z = 0; r.angle = -iii; r.center.x = dest.x + dest.w / 2; r.center.y = dest.y + dest.h / 2; bkp_graphics_drawSurface(G[0] ,&dest,&src,&r,BKP_GRAPHICS_FLIPNONE, &alpha); dest.w = 368; dest.h = 138; dest.x -= 35; dest.y -= 20; bkp_graphics_2dsetColori(255,255,255,255); bkp_graphics_drawRectangle(&dest, BKP_FALSE); dest.w = 168; dest.x = 250; r.angle = iii; bkp_graphics_drawSurface(G[2] ,&dest,&src,&r,BKP_GRAPHICS_FLIPH, NULL); r.angle = -iii /4; bkp_graphics_drawSurface(G[0] ,&dest,&src,&r,BKP_GRAPHICS_FLIPV, NULL); dest.x = 620; bkp_graphics_2dsetColori(255,0,0,255 / 2); bkp_graphics_drawRectangle(&dest, BKP_TRUE); bkp_graphics_2dFlush(); Looks a little bit like SDL. In this example we can see all the job done so far, Scaling, Positioning, FLIP (vertical, horizontal), Rotate around a point and transparency. Those are all I used with SDL2 so far for Soul of Mask. The first objective is checked. Here is a video that illustrates it: bkp-2018-03-01_15.32.12 I don't go into the deep details about how I did things, but if people request it in the comments I will, I mean I would like to share it as I think some people who use OpenGL better than I do may give me some precious pieces of advice and improve the way I did it, in the meantime more beginner than I am will have a hint to start. Time for a little of performance: The graphics engine is able to draw on those 3 differents devices (here GPU integrated in CPU) - draw a frame in 0.016 ms for 1700 animated sprites on a Intel(R) Core(TM) i5-4210U CPU 1366x768 - draw a frame in 0.016 ms for 1000 animated sprites on a Broadwell Intel Core M-5Y70 HD 4k - draw a frame in 0.016 ms for 7000 animated sprites on a Intel(R) Core(TM) i7-7700 CPU 1920x1080 I didn't test it with a Nvidia or Radeon graphics card yet, for the moment it is irrelevant but it will come later. Conclusion on using custom vs SDL2 pro: Faster. I know everything behind it. con: Fewer features, less flexible, unoptimized and probably full of bugs I didn't notice yet. I also added a log system I didn't have it for my previous game so at any crash I add to try to reproduce it very hard now it is better just have to read log file on crashes. here is the output of this video: DEBUG set Moving to directory `../` [ INFO ][ 2018-03-01 15:27:06] -> Starting Graphics Engine ... [ INFO ][ 2018-03-01 15:27:06] -> Starting GLFW 3.2.1 X11 GLX EGL clock_gettime /dev/js Xf86vm shared [ INFO ][ 2018-03-01 15:27:06] -> Monitor info: [ INFO ][ 2018-03-01 15:27:06] -> #1 1920x1080 [ INFO ][ 2018-03-01 15:27:06] -> #0 1366x768 [ INFO ][ 2018-03-01 15:27:06] -> -------------------------- [ INFO ][ 2018-03-01 15:27:06] -> GL Context Params : [ INFO ][ 2018-03-01 15:27:06] -> GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS : 192 [ INFO ][ 2018-03-01 15:27:06] -> GL_MAX_CUBE_MAP_TEXTURE_SIZE : 16384 [ INFO ][ 2018-03-01 15:27:06] -> GL_MAX_DRAW_BUFFERS : 8 [ INFO ][ 2018-03-01 15:27:06] -> GL_MAX_FRAGMENT_UNIFORM_COMPONENTS : 16384 [ INFO ][ 2018-03-01 15:27:06] -> GL_MAX_TEXTURE_IMAGE_UNITS : 32 [ INFO ][ 2018-03-01 15:27:06] -> GL_MAX_TEXTURE_SIZE : 16384 [ INFO ][ 2018-03-01 15:27:06] -> GL_MAX_VARYING_FLOATS : 128 [ INFO ][ 2018-03-01 15:27:06] -> GL_MAX_VERTEX_ATTRIBS : 16 [ INFO ][ 2018-03-01 15:27:06] -> GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS : 32 [ INFO ][ 2018-03-01 15:27:06] -> GL_MAX_VERTEX_UNIFORM_COMPONENTS : 16384 [ INFO ][ 2018-03-01 15:27:06] -> GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV : 0 [ INFO ][ 2018-03-01 15:27:06] -> GL_MAX_SAMPLES : 8 [ INFO ][ 2018-03-01 15:27:06] -> GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV : 32768 : 32768 [ INFO ][ 2018-03-01 15:27:06] -> GL_MAX_SAMPLES : 0 [ INFO ][ 2018-03-01 15:27:06] -> -------------------------- [ INFO ][ 2018-03-01 15:27:06] -> Opening window with GLFW3 [OK] [ INFO ][ 2018-03-01 15:27:06] -> Renderer : Mesa DRI Intel(R) Haswell Mobile [ INFO ][ 2018-03-01 15:27:06] -> OpenGL version : 4.5 (Core Profile) Mesa 17.2.4 [ INFO ][ 2018-03-01 15:27:06] -> 4.5 [ INFO ][ 2018-03-01 15:27:06] -> program 3 GL_VALIDATE_STATUS = 1: [ INFO ][ 2018-03-01 15:27:06] -> ------------- shader programme 3 info --------------- [ INFO ][ 2018-03-01 15:27:06] -> GL_LINK_STATUS = 1: [ INFO ][ 2018-03-01 15:27:06] -> GL_ATTACHED_SHADERS = 2: [ INFO ][ 2018-03-01 15:27:06] -> GL_ACTIVE_ATTRIBUTES = 1: [ INFO ][ 2018-03-01 15:27:06] -> 0) type:vec3 name: vp location: 0 [ INFO ][ 2018-03-01 15:27:06] -> GL_ACTIVE_UNIFORMS = 2: [ INFO ][ 2018-03-01 15:27:06] -> 0) type:mat4 name: matrix location: 0 [ INFO ][ 2018-03-01 15:27:06] -> 1) type:vec4 name: color location: 1 [ INFO ][ 2018-03-01 15:27:06] -> ------------- end info --------------- [ INFO ][ 2018-03-01 15:27:06] -> program 6 GL_VALIDATE_STATUS = 1: [ INFO ][ 2018-03-01 15:27:06] -> ------------- shader programme 6 info --------------- [ INFO ][ 2018-03-01 15:27:06] -> GL_LINK_STATUS = 1: [ INFO ][ 2018-03-01 15:27:06] -> GL_ATTACHED_SHADERS = 2: [ INFO ][ 2018-03-01 15:27:06] -> GL_ACTIVE_ATTRIBUTES = 2: [ INFO ][ 2018-03-01 15:27:06] -> 0) type:vec3 name: vertex_position location: 0 [ INFO ][ 2018-03-01 15:27:06] -> 1) type:vec2 name: vt_loc location: 1 [ INFO ][ 2018-03-01 15:27:06] -> GL_ACTIVE_UNIFORMS = 3: [ INFO ][ 2018-03-01 15:27:06] -> 0) type:mat4 name: matrix location: 0 [ INFO ][ 2018-03-01 15:27:06] -> 1) type:vec4 name: vt_ location: 1 [ INFO ][ 2018-03-01 15:27:06] -> 2) type:sampler2D name: basic_texture location: 2 [ INFO ][ 2018-03-01 15:27:06] -> ------------- end info --------------- [ INFO ][ 2018-03-01 15:27:06] -> program 9 GL_VALIDATE_STATUS = 1: [ INFO ][ 2018-03-01 15:27:06] -> ------------- shader programme 9 info --------------- [ INFO ][ 2018-03-01 15:27:06] -> GL_LINK_STATUS = 1: [ INFO ][ 2018-03-01 15:27:06] -> GL_ATTACHED_SHADERS = 2: [ INFO ][ 2018-03-01 15:27:06] -> GL_ACTIVE_ATTRIBUTES = 2: [ INFO ][ 2018-03-01 15:27:06] -> 0) type:vec3 name: vertex_position location: 0 [ INFO ][ 2018-03-01 15:27:06] -> 1) type:vec2 name: vt_loc location: 1 [ INFO ][ 2018-03-01 15:27:06] -> GL_ACTIVE_UNIFORMS = 4: [ INFO ][ 2018-03-01 15:27:06] -> 0) type:mat4 name: matrix location: 0 [ INFO ][ 2018-03-01 15:27:06] -> 1) type:vec4 name: vt_ location: 1 [ INFO ][ 2018-03-01 15:27:06] -> 2) type:sampler2D name: basic_texture location: 2 [ INFO ][ 2018-03-01 15:27:06] -> 3) type:float name: alpha_factor location: 3 [ INFO ][ 2018-03-01 15:27:06] -> ------------- end info --------------- [ INFO ][ 2018-03-01 15:27:06] -> 2D Graphics Engine start [OK] [ INFO ][ 2018-03-01 15:27:06] -> Graphics Engine started [ INFO ][ 2018-03-01 15:27:17] -> [ INFO ][ 2018-03-01 15:27:17] -> deleting shader programe 3 [ INFO ][ 2018-03-01 15:27:17] -> deleting shader programe 6 [ INFO ][ 2018-03-01 15:27:17] -> deleting shader programe 9 [ INFO ][ 2018-03-01 15:27:17] -> 2D Graphics Engine closed [OK] [ INFO ][ 2018-03-01 15:27:17] -> Window closed [OK] [ INFO ][ 2018-03-01 15:27:17] -> Graphics Engine stopped [OK] [ INFO ][ 2018-03-01 15:27:17] -> Logger closed [OK] [ INFO ][ 2018-03-01 15:27:17] -> Game Engine stopped [OK] What's next? I am learning about the type of game I am doing, I should have some basic movement of main character and platform collisions soon. I promise myself I will not do everything alone again so this blog will be also used to seduce whoever want to jump into this adventure. But by experience I know I may finish alone again (who knows). Thanks for reading, I will post more as soon as I have something new to show. Have a nice day.
  7. lilington

    2018 Challenge Missile Command

    Yep, here is my contribution to GameDev 2018 Missile Command. The source code is inside the zip :https://github.com/wybifu/missile_command/archive/master.zip github: https://github.com/wybifu/missile_command Windows users: Windows_version.exe Linux users: Linux_version or just compile it for any other OS. language: C library: SDL2 I feel that I have to explain myself as the code is awful: I was just writing as I was thinking when a new Idea popup I just hardcoded it and didn't care if it fits the rest of the code that can provide strange lines like: if (((Agent *)(((Agent *)(a->ptr0))->ptr1)) != NULL) ((Agent *)(((Agent *)(a->ptr0))->ptr1))->visible = BKP_F YEAH !! Absolutely horrible. a small video of gameplay : another shootscreen for pleasure:
  8. Hi everyone, I know there is a lot of blogs and advice about what to do and not do for a beginner in a game industry, I even read a lot myself to find inspiration and avoid common mistakes. Unfortunately, there is not so many talking about real experiences. I am here to tell the story behind "Soul of Mask", my first game and I hope not my last. I will avoid a long post, so it will be in different blog entries presented like this: - Origins and first difficulties, - Technical: Game engines, programing language, tools - Marketing and conclusion. In all point I'll talk from the beginning to the end of the project, there is no chronology so you are free to read what you want in the order you want. Let start then... My name is Alain Perrin, as you may have noticed, not a native English speaker. I am a system dev in a Chinese company based in China. So yes I live in China for quite many years. I always wanted to create a game but I always stop writing my game as soon as I was satisfied with the technical problem I solved. It was enough for me until my wife (fiance at that time) talked about people proud of themselves without any real achievement. Yes, she didn't realize it but it hit me right in the brain and let say ego as she was not talking about me. "Yes I think I can do a game but I never proved it". It is where I decide to start a game and finish it to prove to myself that I can really do it. This will explain a lot of choices I made for my tools such as Programming languages and game engines. Now we know I never planned to make a commercial game, it was just about to start something bigger than Tetris (I did finish it around 2003, a mixt of ASM and C with class dirty code). I decide Pacman with a lot of improvement in the ghosts. My major was AI and face recognition and I wanted to make Pacman with clever ghosts. But, with time I started to add more and more stuff and the game didn't look like Pacman at all, at least in the gameplay. It was still a mase game but a lot of things were too far from Pacman it is when I decide to stop and think about something else, a real game. I started to look for help; another developer and at least a drawer could be pixel artist or just 2D designer even a comics drawer. It is also when the first problems came. As a developer finding another developer was easy to keep him on the project was another challenge. So you guess, he left. And this brilliant guy leaving was a hard strike to my moral, it was so demoralizing. However, this guy was totally honest and told me: " I am leaving because I don't see where this will go". At first, I thought he was talking about money, he may think this project will not bring any money at all. If it was the case I had no way to convince him to stay. But he was talking about achievement. money is not so important when you do something you want to, money is a reward I would love to sell 1Million copy of "Soul of Mask " but it was not my priority and we shared the same thoughts. The problems were the fact that he didn't believe it will finish one day and didn't want to waste is time. Now another part of my personality took control of my mind over depression. The love of challenge. Now I have a new challenge, everything I need to go back to work. I restarted everything with a better design as now I knew I was not doing Pacman anymore. It is also at that moment I made my first big mistake. I read after that it is a common one " I do all the code and I will find soon or later a graphist". So one year passed when I started "Element mask" and I had this: Element Mask Element mask was supposed to be the full game. It was the story of a young man who has to collect all the masked stollen by demons. It was not so beautiful but I was sure that with a full gameplay and a story I will find someone to draw. I google images and made something different. all images in the following image are downloaded from google image: Here you can on the right bottom your different special power. So I spent almost another year trying to find someone to draw. I contacted my brother in law in France who agreed to help. then I went there, meet him and he realised that is was not 3D game and he could not make 2D graphics assets. So 2 years passed, I have an almost ready gameplay but no graphics. My Brother in law and one of his friend remembered that they have a co-worker that may help. This happened in August 2016. They contact the guy who said OK to meet me the next day. My designer invited me to his place and I was already in love and impressed, this guy is a gamer. He had everything, a lot of games and objects from games of all time. Obviously, if I can convince him then that will be finished. And I did it, he was in. I left France and move back to China, He sent me Emails to show his interest. I let him free to change what he wants in the game as long as I can program it. and he did bring the idea of half mechanic characters. here is his first sketch: Hey guys, honestly it was promising, right? But if you bought "Soul of Mask" today you already guess that it didn't work. How? I don't know myself. This was his last email. After that he disappeared, no news, no answers nada, nothing, keine, rien. As if it was not enough I injured myself playing football (soccer for USA). ACL was torn, for those who play sport they know it is a serious injury. Good can come from Bad. Nine months without sport said the doctor, and at least 2 weeks without moving my right knew. So I had to stay at home and this was the good part. I use to play football 3 times per week plus 2 times of basketball. For almost a year I will have to do something else. Unfortunatly I still had no news from my designer. I decided to go again to France to visit my family and try to contact him again. I did and he said sorry but he didn't have time to work on Element mask. Angry programmer. That was too much. I was very pissed. I nicely said " ok I understand we all have our job and our life. No problem". But inside all was fire ready to burn everything around. August 2016 to February 2017 you cannot find 15 seconds to send me a WhatsApp to tell me you are out of the project? you are busy but me I can just wait and hope? I realized that everything is really relative. I was convinced of total failure if I attempt to make Element Mask alone but I just have the proof of the opposite: I would have to work alone if I want it to finish one day. I just remember a funny fact, I can draw myself. I used to draw comics for my classmate when I was in middle school. I bought my watcom and started again. My level is far from what I could do but it was enough for buyer to accept it. actually no body said my game was ugly: Rip Element mask My problem now was different. I had nobody to wait but I was not fast to draw as I was before. Worse, I cannot draw what my code is made fore. So gameplay changed a lot. Every time I failed to draw something, the gameplay will change. This is for example how I moved from a character wearing a mask to bouncing masks. Soul of Mask was born. It was something I could finish before the end of 2017 and I did it. I learn a lot about people, life and myself in this adventure. next blog entry will talk about the coding part. thanks for reading.
  9. lilington

    Soul of Mask released and announcements

    Now that Soul of Mask is released, I will focus on bug reports if any and I announce that I am already working on the next game, I will make blog entry to show progressions. This time I 'll not wait to the end of project.
  10. lilington

    Soul of Mask close to release

    Hey, Me again, I got some problem with SDL2_mixer on macOs, actually I am thinking about cancelling MacOs version as I found no solution to play sounds in this platform. Looks like we will stick with Windows and Linux. Good news, the development is about to be close now. and i provide 3 videos for Tutorial, Mask power presentation, and an easy level to show the gameplay. Tutorial : Mask Presentation: Gameplay. Before each level, the level takes something like 1 to 5 seconds to load depending on the computer, so I added loading screen that presents all the different characters in the game. here you have one. hope you will like it.
  11. lilington

    Soul of Mask

    Hi, My name is Alain Perrin,I come here to present my project (actually almost finished) of game. Soul Of Mask already announced on steam. It is, unfortunately, a one-man job. 3 years of pleasure and nightmares. But it is still a joy to work on it. I was supposed to start talking about this game at least one year ago it is probably a big mistake a made. Anyways better late than never. It is a game about a mask supposed to collect one object and avoid enemies on the map with Pacman view. The main character has to take a mask to be able to collect those object. Those masks have some powers like burning enemies, feezing... by using a power of a mask it is lost. The game is supposed to be released on steam at the end of this month (nov 25th 2017). The game is writen C/SDL, graphics assets are made with gimp and audio lmms/audacity. current status of a game is debug/testing. More info are coming soon. for the moment you can have a look at indiedb and steam Video of the game gameplay:
  • 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!