SpectreNectar

Members
  • Content count

    12
  • Joined

  • Last visited

Community Reputation

138 Neutral

About SpectreNectar

  • Rank
    Member
  1. Ogg Vorbis trouble

    EDIT: I used ov_open on Windows instead of ov_open_callbacks and it's now working. SOLVED   Good afternoon people, would any of you be willing to help me install ogg vorbis ?   I have build the latest versions of ogg and vorbis libs ( including copying ogg into vorbis ) and set up my project to include the libs. But I get this strange error: C:\libvorbis\include/vorbis/vorbisfile.h:57:31: error: 'fseeko64' was not declared in this scope   I tried editing vorbisfile.h manually and got the program running but crashing whenever I tried to load an *.ogg file.   Cheers
  2. A Goblin's Xmas Tale

    We've received an awesome comment about the game at GameJolt:     Bravo! You did an amazing job here people, extremely funny, giggling, sarcastic dialogues mixed with challenging and fast-paced shooting gameplay it's a winning mixture! Especially the goblin is so cool, "just gimme the money and I'll save Christmas you fat fart" XD"     Check out Clown_Nebula's letsplay of our game here if you want:  https://www.youtube.com/watch?v=6RWfe6N3HQY
  3. A Goblin's Xmas Tale

      https://www.youtube.com/watch?v=nw_e3ZbAEoY   Out now! Itch.io: http://giant-goblin-studio.itch.io/a-goblins-xmas-tale GameJolt.com: http://gamejolt.com/games/a-goblin-s-xmas-tale/110149 IndieGameStand.com: https://indiegamestand.com/free-games/2318/a-goblins-xmas-tale/ 64Digits.com: http://www.64digits.com/games/index.php?cmd=view_game&id=5884     A Giant Goblin's Xmax Tale In this 4th-wall-breaking game you take control of the Giant Goblin who has just shot down Santa on Xmas night. Together, you and the Giant Goblin will go on a merry-old-fashioned-evil-ghost-candy-killing-holiday rampage, to maybe save Xmas from the jerk, Valdeze, who has stolen the naughty-and-nice-list and all the presents.   The whole tale is fully voiced by actors 2D pixelart arcade comedy/horror shooter The main game can be played local co-op Local 4 player VS. mode The Giant Goblin will complain if you control him badly Full of surprises and strange things               Website: http://giantgoblinstudio.com Twitter: https://twitter.com/Giant_Goblin_S Facebook: https://www.facebook.com/GiantGoblinStudio
  4. Separating geometry based on closest points?

    Yes that was quite vague, I wasn't sure what I was asking at the time. I've been looking into the GJK algorithm, but I have some trouble implementing it. Here's what I've tried for the 2D case (GML): co_gjk() [CODE] { // Arguments for first OBB var a_cx, a_cy, a_ax1, a_ay1, a_ax2, a_ay2, a_sx, a_sy; a_cx = argument0; a_cy = argument1; a_ax1 = argument2; a_ay1 = argument3; a_ax2 = argument4; a_ay2 = argument5; a_sx = argument6; a_sy = argument7; // Arguments for second OBB var b_cx, b_cy, b_ax1, b_ay1, b_ax2, b_ay2, b_sx, b_sy; b_cx = argument8; b_cy = argument9; b_ax1 = argument10; b_ay1 = argument11; b_ax2 = argument12; b_ay2 = argument13; b_sx = argument14; b_sy = argument15; // Vectors co_gjk_direction_vector_x = -1; co_gjk_direction_vector_y = -1; var posx, posy, negx, negy; posx = co_obb_furthest_point_along_vector_x(a_cx, a_cy, a_ax1, a_ay1, a_ax2, a_ay2, a_sx, a_sy); posy = co_obb_furthest_point_along_vector_y(a_cx, a_cy, a_ax1, a_ay1, a_ax2, a_ay2, a_sx, a_sy); negx = co_obb_furthest_point_along_vector_x(b_cx, b_cy, b_ax1, b_ay1, b_ax2, b_ay2, b_sx, b_sy); negy = co_obb_furthest_point_along_vector_y(b_cx, b_cy, b_ax1, b_ay1, b_ax2, b_ay2, b_sx, b_sy); var ax, ay; ax = (posx-negx); ay = (posy-negy); co_gjk_direction_vector_x = -ax; co_gjk_direction_vector_y = -ay; co_gjk_point_list_x[0] = ax; co_gjk_point_list_x[0] = ay; var n; n = 1; do { // Along direction vector posx = co_obb_furthest_point_along_vector_x(a_cx, a_cy, a_ax1, a_ay1, a_ax2, a_ay2, a_sx, a_sy); posy = co_obb_furthest_point_along_vector_y(a_cx, a_cy, a_ax1, a_ay1, a_ax2, a_ay2, a_sx, a_sy); negx = co_obb_furthest_point_along_vector_x(b_cx, b_cy, b_ax1, b_ay1, b_ax2, b_ay2, b_sx, b_sy); negy = co_obb_furthest_point_along_vector_y(b_cx, b_cy, b_ax1, b_ay1, b_ax2, b_ay2, b_sx, b_sy); ax = (posx-negx); ay = (posy-negy); if(ax*co_gjk_direction_vector_x+ay*co_gjk_direction_vector_y < 0) return false; co_gjk_point_list_x[n] = ax; co_gjk_point_list_y[n] = ay; if(n+1==2) n = co_gjk_line(co_gjk_point_list_x[0], co_gjk_point_list_y[0], co_gjk_point_list_x[1], co_gjk_point_list_y[1]); else n = co_gjk_triangle(co_gjk_point_list_x[0], co_gjk_point_list_y[0], co_gjk_point_list_x[1], co_gjk_point_list_y[1], co_gjk_point_list_x[2], co_gjk_point_list_y[2]); } until(n>=3); return true; } [/CODE] co_gjk_line() [CODE] { var ax, ay, bx, by; ax = argument2; //A is last! ay = argument3; bx = argument0; by = argument1; var aox, aoy, abx, aby; aox = -ax; aoy = -ay abx = bx-ax; aby = by-ay; co_gjk_direction_vector_x = -aby; co_gjk_direction_vector_y = abx; // Not towards origin? if(co_gjk_direction_vector_x*aox+co_gjk_direction_vector_y*aoy<0) { co_gjk_direction_vector_x = -co_gjk_direction_vector_x; co_gjk_direction_vector_y = -co_gjk_direction_vector_y; } return 2; } [/CODE] co_gjk_triangle() [CODE] { var ax, ay, bx, by, cx, cy; ax = argument4; //A is last! ay = argument5; bx = argument2; by = argument3; cx = argument0; cy = argument1; var aox, aoy, abx, aby, acx, acy; aox = -ax; aoy = -ay abx = bx-ax; aby = by-ay; acx = cx-ax; acy = cy-ay; co_gjk_direction_vector_x = -aby; co_gjk_direction_vector_y = abx; // "2D cross product" if(abx*acy-aby*acx>0.0) { co_gjk_direction_vector_x = -co_gjk_direction_vector_x; co_gjk_direction_vector_y = -co_gjk_direction_vector_y; } // Towards origin? if(co_gjk_direction_vector_x*aox+co_gjk_direction_vector_y*aoy>0.0) { // Remove C from simplex co_gjk_point_list_x[0] = ax; co_gjk_point_list_x[0] = ay; return 2; } co_gjk_direction_vector_x = -acy; co_gjk_direction_vector_y = acx; // "2D cross product" if(acx*aby-acy*abx>0.0) { co_gjk_direction_vector_x = -co_gjk_direction_vector_x; co_gjk_direction_vector_y = -co_gjk_direction_vector_y; } // Towards origin? if(co_gjk_direction_vector_x*aox+co_gjk_direction_vector_y*aoy<0) { // Remove B from simplex co_gjk_point_list_x[1] = ax; co_gjk_point_list_x[1] = ay; return 2; } // Done return 3; } [/CODE] co_obb_furthest_point_along_vector_x() [CODE] { var cx, cy, ax1, ay1, ax2, ay2, sx, sy; cx = argument0; cy = argument1; ax1 = argument2; ay1 = argument3; ax2 = argument4; ay2 = argument5; sx = argument6; sy = argument7; return sx*abs(co_gjk_direction_vector_x*ax1+co_gjk_direction_vector_y*ay1); } [/CODE] It's supposed to return true if the OBBs intersect but nothing happens.
  5. Hi What is a good way to separate a sphere or a capsule inside a polyhedron? Thanks!
  6. I'm trying to write a function for my game that returns the distance to the nearest collision along a direction. It is fed the following data: Vector3D origin (Point to start search from) Vector3D volume (Halfwidths) Vector3D direction (Direction to check) The function iterates over a list of "Areas" that are really just axis aligned boundary boxes and attempts to return a distance in the form of a double. But now I've gone and stirred myself blind on it and need some help. The approach that first came to my mind was to project the boxes to the direction, and when I realized that wouldn't work I thought I'd store the normals of the iterated boundary boxes somewhere instead and then do a separating axis test, like what is common in 2D. But then it seems I'd be needing an oriented bounding box test. Is that really necessary? I mean considering the boxes are all aligned. I'd like to know what the correct way to do this would be? Thank you.
  7. RPG Making Competition at 64digits.com

    This is going to be awesome.
  8. Help me using buffer objects

    Thanks, I now have visual output! It covers the whole screen in an orange color though. Could have something to do with my camera matrix. In pursuit of my goal of having the shader make things isometric, I set it up with the GLM math library ( [url="http://glm.g-truc.net/"]http://glm.g-truc.net/[/url] ) to look at the screen like this: [CODE] glm::vec3 eye = glm::vec3(0.0f, 0.0f, 0.0f); glm::vec3 center = glm::vec3(0.0f, 0.0f, 1.0f); glm::vec3 up = glm::vec3(0.0f, 1.0f, 0.0f); glm::mat4 viewMatrix = glm::lookAt(eye, center, up); glUniformMatrix4fv(glGetUniformLocation(p, "vMatrix"), 1, GL_FALSE, glm::value_ptr(viewMatrix)); [/CODE] So I have a few more questions before I can draw things properly. When you create an orthographic projection, any non zero Z value isn't drawn as it is outside znear/zfar range. So if you don't want perspective yet want to have your geometry stored with all three axis, any z coordinate must be set to zero eg. inside a vertex shader. Is this a correct assumption? What range are coordinates inside a vertex shader in? 0.0-1.0? In the following shader, what function do I need in order to set "vertex" to the same value as that inside "t->vertices"? (so I don't need ftransform()) [CODE] #version 330 in vec4 vertex; uniform float ox; uniform float oy; uniform mat4 vMatrix; uniform mat4 mMatrix; out float odepth; void main() { vec4 vert = ftransform() * vMatrix; float sqrX = vert.x; float sqrY = 1.0-vert.y; float sqrZ = vert.z; vert.x = ox + sqrX-sqrY; vert.y = oy + (sqrY+sqrX)/2.0 - sqrZ; vert.z = 0.0; odepth = sqrZ; gl_Position = vert; } [/CODE] Again, thanks very much.
  9. Greetings, I'm having a bit of trouble grasping the concept of drawing things with buffer objects, and a lot of trouble getting anything to be displayed on screen with one. Up until now I have been using gl_begin/gl_end for drawing. So I basically have everything set up more or less how I want it, only I need to know what function calls to make and in what order. Here's what I've tried: //Initialization [CODE] trimesh_rendering* t = get_world_trias(); glGenBuffers(1, &vboId); glBindBuffer(GL_ARRAY_BUFFER, vboId); glBufferData(GL_ARRAY_BUFFER, sizeof(t->vertices)+sizeof(t->normals)+sizeof(t->colors), 0, GL_STREAM_DRAW); glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(t->vertices), t->vertices); // copy vertices starting from 0 offest glBufferSubData(GL_ARRAY_BUFFER, sizeof(t->vertices), sizeof(t->normals), t->normals); // copy normals after vertices glBufferSubData(GL_ARRAY_BUFFER, sizeof(t->vertices)+sizeof(t->normals), sizeof(t->colors), t->colors); // copy colours after normals glBindBuffer(GL_ARRAY_BUFFER, 0); delete_world_trias(t); [/CODE] //get_world_trias() [CODE] trimesh_rendering* TriMeshRenderer::get_world_trias() { trimesh_rendering* t = new trimesh_rendering; int num = 0; node *q; int col, row; //Count num trias for( int r=0; r<world->get_rows()+world->get_cols()-1; r++ ) { for( int c=maximum(0, r-world->get_rows()+1); c<=r && c<world->get_cols(); c++ ) { col = c; row = r-c; for( q = world->get(col,row,0); q != 0; q = q->next ) { TriMesh *mesh = q->shape; if(mesh!=0) { num += mesh->get_numTrias()*9; } } } } triasize = num/9; worldsize = num*3; t->len = num; t->vertices = new GLfloat[t->len]; t->normals = new GLfloat[t->len]; t->colors = new GLfloat[t->len]; int m = 0; for( int r=0; r<world->get_rows()+world->get_cols()-1; r++ ) { for( int c=maximum(0, r-world->get_rows()+1); c<=r && c<world->get_cols(); c++ ) { col = c; row = r-c; for( q = world->get(col,row,0); q != 0; q = q->next ) { TriMesh *mesh = q->shape; if(mesh!=0) { int n = mesh->get_numTrias(); for( int i=0; i<n; i++ ) { Triangle3D tria = mesh->get_tria(i); t->vertices[m+0] = tria.p1.x; t->vertices[m+1] = tria.p1.y-tria.p1.z; t->vertices[m+2] = 0; t->vertices[m+3] = tria.p2.x; t->vertices[m+4] = tria.p2.y-tria.p2.z; t->vertices[m+5] = 0; t->vertices[m+6] = tria.p3.x; t->vertices[m+7] = tria.p3.y-tria.p3.z; t->vertices[m+8] = 0; t->normals[m+0] = tria.normal.x; t->normals[m+1] = tria.normal.y; t->normals[m+2] = tria.normal.z; t->normals[m+3] = tria.normal.x; t->normals[m+4] = tria.normal.y; t->normals[m+5] = tria.normal.z; t->normals[m+6] = tria.normal.x; t->normals[m+7] = tria.normal.y; t->normals[m+8] = tria.normal.z; t->colors[m+0] = 1.0; t->colors[m+1] = 1.0; t->colors[m+2] = 1.0; t->colors[m+3] = 1.0; t->colors[m+4] = 1.0; t->colors[m+5] = 1.0; t->colors[m+6] = 1.0; t->colors[m+7] = 1.0; t->colors[m+8] = 1.0; m+=9; } } } } } return t; } [/CODE] //Update and draw [CODE] glBindBuffer(GL_ARRAY_BUFFER, vboId); glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(3, GL_FLOAT, 0, 0); trimesh_rendering* t = get_world_trias(); glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(t->vertices), t->vertices); // copy vertices starting from 0 offest glBufferSubData(GL_ARRAY_BUFFER, sizeof(t->vertices), sizeof(t->normals), t->normals); // copy normals after vertices glBufferSubData(GL_ARRAY_BUFFER, sizeof(t->vertices)+sizeof(t->normals), sizeof(t->colors), t->colors); // copy colours after normals delete_world_trias(t); glDrawArrays(GL_TRIANGLES, 0, triasize); glDisableClientState(GL_VERTEX_ARRAY); glBindBuffer(GL_ARRAY_BUFFER, 0); glUseProgram(0); [/CODE] My goal is to use a vertex shader to transform primitives from a square to an isometric view.
  10. Chaos VS Santa

    Chaos VS Santa is the first danish produced wrestling game! It is a game that focuses on social christmas get together. Play as Chaos, the toughest wrestler in Denmark, or as everybodys favourite elf Santa. It is a game that requires you to have lightning fast reactions and perception skills, if you don't want to be the one getting counted out. So find a "slow" friend and beat him in the christmas game of the year. http://ddnfilm.dk/game
  11. Which BASIC should I use?

    Quote:Original post by ferdekk you tried purebasic? http://purebasic.com/ No, I haven't It looks very promising! Thanks, I believe this is more than I had hoped for.
  12. Which BASIC should I use?

    Hi there, I'm trying to get an overview of the different BASIC languages (preferrably aimed at game development), with the intention of making a game with it. Which do you recommend? I tried blitzmax and freebasic so far, but blitz seemed too limited and undocumented which eventually led me to read a lot up on freebasic only to discover that development has stoppped years ago and there's still lacking important OOP features. I'm not too much into reinventing the wheel (eg. defining that constant TRUE = 1), and really just wants something like blitz but with the ability to eg. make a copy og the player sprite and gradually add transparent pixels to that drawn on top.