Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411504 Posts in 69373 Topics- by 58429 Members - Latest Member: Alternalo

April 25, 2024, 06:21:18 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)What are you programming RIGHT NOW?
Pages: 1 ... 67 68 [69] 70 71
Print
Author Topic: What are you programming RIGHT NOW?  (Read 210132 times)
agoacher
Level 0
*


View Profile WWW
« Reply #1360 on: January 10, 2017, 06:58:21 AM »

I've started a little component/entity framework in my MonoGame engine "Strawberry" (used for Jams).  I have an animated sprite rendering happily and I'm now working on my Content Resolver for entity templates before I add a few more components to it.
Logged
Raptor85
Level 5
*****



View Profile WWW
« Reply #1361 on: January 11, 2017, 01:16:00 AM »

i got bored so I'm currently writing a raycaster that supports faked "room over room" with a mix of c++ and assembly..and then hilariously dumping the pixel buffer  to the screen using opengl render to texture.

Basically I'm rendering fake3d using a real 3d api.
Logged

-Fuzzy Spider
pturecki
Level 0
***



View Profile WWW
« Reply #1362 on: January 15, 2017, 02:41:16 PM »

If deleting the code counts as programming (and of course counts ;P  ), I just started cleaning the mess in - Archaica: The Path Of Light - source code (just to be able to easy write final things; I hope final). I'm going to delete aprox 10-15k lines od code (such a number hurts a bit). Cheers!
Logged

smartyMARTY
Level 0
**


I write, code, sometimes nicely


View Profile WWW
« Reply #1363 on: January 16, 2017, 08:50:23 AM »

Currently writing Plugins for UE4 such as a Volume based approach to a Map/Minimap soluction and a network supported Crafting/Consumables plugin.
Logged

andrewmcwatters
Level 0
*



View Profile WWW
« Reply #1364 on: January 16, 2017, 02:23:47 PM »

working on this new thing i'm calling lgf https://github.com/Planimeter/lgameframework, which is another love-like, but with a focus on 3d and vr interop
its all luajit and ffi because dev time is insanely fast

i'm moving the grid engine off of löve and onto lgf eventually

also working on the long process of creating an openvr driver to use google cardboard as a hmd, which requires an opengl/directx capture client/server setup, so that's kind of a longer project, whereas lgf is like a core replicate of löve done in less than a month
Logged
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #1365 on: January 16, 2017, 07:01:31 PM »

If deleting the code counts as programming (and of course counts ;P  ), I just started cleaning the mess in - Archaica: The Path Of Light - source code (just to be able to easy write final things; I hope final). I'm going to delete aprox 10-15k lines od code (such a number hurts a bit). Cheers!

Those are the best refactors Smiley
Logged

pturecki
Level 0
***



View Profile WWW
« Reply #1366 on: January 18, 2017, 12:13:21 AM »

Quote
Quote from: pturecki on January 15, 2017, 02:41:16 pm
If deleting the code counts as programming (and of course counts ;P  ), I just started cleaning the mess in - Archaica: The Path Of Light - source code (just to be able to easy write final things; I hope final). I'm going to delete aprox 10-15k lines od code (such a number hurts a bit). Cheers!

Those are the best refactors Smiley

Yes, but it hurts a bit Wink The best solution is to write a code which would not have to be deleted :D (probably impossible).
Logged

smartyMARTY
Level 0
**


I write, code, sometimes nicely


View Profile WWW
« Reply #1367 on: January 20, 2017, 08:43:12 AM »

Quote
Quote from: pturecki on January 15, 2017, 02:41:16 pm
If deleting the code counts as programming (and of course counts ;P  ), I just started cleaning the mess in - Archaica: The Path Of Light - source code (just to be able to easy write final things; I hope final). I'm going to delete aprox 10-15k lines od code (such a number hurts a bit). Cheers!

Those are the best refactors Smiley

Yes, but it hurts a bit Wink The best solution is to write a code which would not have to be deleted :D (probably impossible).
By not writing code, then in virtue, there is no code to delete. But then, you are not writing code. SO, is the absence of something the answer or is it an impossiblity?
Logged

st33d
Level 2
**



View Profile WWW
« Reply #1368 on: January 23, 2017, 12:45:31 AM »

This spatial hash update for my Missiles:

Code:
/ check for cell recalculation
bounds.center = v;
if(
bounds.x < cellBounds.x ||
bounds.y < cellBounds.y ||
bounds.x + bounds.width > cellBounds.x + cellBounds.width ||
bounds.y + bounds.height > cellBounds.y + cellBounds.height
) {
Cuboid temp = Cuboid.GetCells(bounds, Map.INV_SCALE);
int minX = cells.x < temp.x ? cells.x : temp.x;
int minY = cells.y < temp.y ? cells.y : temp.y;
int maxX = cells.x + cells.width > temp.x + temp.width ? cells.x + cells.width : temp.x + temp.width;
int maxY = cells.y + cells.height < temp.y + temp.height ? cells.y + cells.height : temp.y + temp.height;
for(int y = minY; y < maxY; y++) {
for(int x = minX; x < maxX; x++) {
Pos p = new Pos(x, y);

if(!cells.Contains(p)) {
// new cells found
if(hash.ContainsKey(p)) hash[p].Add(this);
else hash[p] = new List<Missile> { this };
} else if(!temp.Contains(p)) {
// leaving old cells
hash[p].Remove(this);
if(hash[p].Count == 0) hash.Remove(p);
}
}
}
cells = temp;
cellBounds = cells.GetRect(Map.SCALE);
}

I... think that should work. Last time I did one of these I just ripped the object out of the hash and put it back in again. I'm trying to be smart this time and monitor whether the AABB of the Missile crosses the AABB of the cells it occupies and do the least amount of reassignment.
Logged
AaronB
Level 2
**



View Profile WWW
« Reply #1369 on: January 23, 2017, 04:12:23 AM »

Working on adaptive frame buffers for post processing. It's possible I can have tens of thousands of light sources (one per particle) which can impact the frame rate Tongue

I monitor the fps and switch accordingly:

Code:

    int fps = int (1000 / total_average.average());
    if (fps < 15) {
        post_quality = 0.25;
        glBindFramebuffer (GL_FRAMEBUFFER, FramebufferPostProcQuarter);
    }
    else if (fps < 30) {
        post_quality = 0.5;
        glBindFramebuffer (GL_FRAMEBUFFER, FramebufferPostProcHalf);
    }
    else {
        post_quality = 1.0;
        glBindFramebuffer (GL_FRAMEBUFFER, FramebufferPostProc);
    }   
    glViewport (0, 0, light_width*post_quality, light_height*post_quality);

Logged

ThemsAllTook
Administrator
Level 10
******



View Profile WWW
« Reply #1370 on: March 17, 2018, 08:00:09 AM »

I decided to boot up my Windows development environment to see how well the renderer and 3D model loading code I've been writing for the last few months works on it. After fixing a bunch of compile errors and updating my file path handling to understand Windows's conventions, I got static models to draw, but animated ones were missing most of their geometry. Only the pieces that were attached to the root bone and nothing else were showing up.

Following a hunch, I discovered the problem... I was using a uvec4 attribute in my vertex shader to index a uniform array of matrices for bone transforms. Typing this attribute as uvec4 had given me some weirdness earlier (and was the thing that prompted me to switch to GL 3.2 core, since GLSL version 120 didn't seem to be able to handle it at all), and it seems that my AMD OpenGL drivers didn't understand it for some reason. Only index 0 was being referenced correctly. I'm not sure what the others were doing, but whatever it was, the result was that that bone matrix was invalid and the geometry didn't draw.

I switched the attribute to a vec4, updated all of my code that uses that vertex format, reconfigured my model exporter, and reexported the model I was using. Everything worked! I'm glad I caught the problem early enough that the integer data type wasn't too entrenched. It still feels wrong to use a float type to index an array, but hey, if it's what GLSL wants, I can deal with it.

I guess I should put this together into a bug report and send it off to someone.
Logged

oahda
Level 10
*****



View Profile
« Reply #1371 on: March 17, 2018, 08:35:20 AM »

I did kind of the same thing for my animations actually because of lack of integer support on some platforms.
Logged

Aleid Cross
Level 0
*


Hey! :D


View Profile WWW
« Reply #1372 on: March 29, 2018, 03:42:37 PM »

We're working on a Air Combat / Dogfight mobile game: War in the Skies. Based on a game that we did back on 2010, so we're using most of the same code to make it https://www.facebook.com/warintheskies/

The other is a Puzzle / Math mobile game. The funny thing is that i dream about this game and the we did it XD https://www.facebook.com/mathordice/
 

Logged

gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #1373 on: April 01, 2018, 02:14:06 AM »

delete facebook Tongue

Re: What are you programming RIGHT NOW?
https://neoshaman.github.io/Javascript-experiment/
« Last Edit: April 01, 2018, 02:32:51 AM by gimymblert » Logged

l0bster
Level 0
***



View Profile
« Reply #1374 on: April 15, 2018, 05:44:21 AM »

I'm coding a programm right now that turns normal images into pixel art Smiley It basicly checks the average color for each 6x6 square and finds the nearest color in another color palette (like gameboy colors)





I also have some further ideas where to go with this. For example running an algorithm that recognizes edges and forms in the images and create some pop art stýle pictures where only the "important" parts are visible Smiley
« Last Edit: April 15, 2018, 05:57:32 AM by lobstersteve » Logged
CodeLobe
Level 0
***


Decide to Act Sensibly


View Profile WWW
« Reply #1375 on: April 15, 2018, 10:11:42 PM »

Getting the main loop and multiple input-layers working in a strange form of assembly language that thinks its parents are C and Brainfuck.

Code:
//------------------------------------------------------------------------------
GameInit: ///< Configure the game's display and input.

Init(); // Initialize user's platform.

v0 = 08; // Set global action table count to 1.
v0^ = 01;

v0 = v0^; // Allocate action table pointer list.
v0 <<= 02;
Alloc(0);

v1 = 0c; // Set global pointer for action list.
v1^ = v0;

CreateActionTable( 1 ); // v1 = action table pointer.
v0^ = v2; // Add the action table to the list.
SetActiveActionTable( 1 );

v2 = GameLogic;
SetActionTable_Update( 1 ); // Set the update function.

v2 = GameMouseMove;
SetActionTable_MouseMoved( 1 ); // Set the mouse movement function.

// TODO: Set the action table function pointers.

RenderInit();
v0 ? 0;
if( == ) GameInit_configRender;
error( 0100 ); // Error 256, can't init rendering system.

GameInit_configRender:
SetRenderOffsets();
SetupDisplay();

// TODO: remove hardcoded testing values:
v0 = 080;
v0^ = 01000; // start at ~57 degrees of rotation.
v0 += 04;
v0^ = 0100; // X position = 256
v0 += 04;
v0^ = 064; // Y position = 100

return;

//------------------------------------------------------------------------------
main: ///< Program entry point
GameInit();

// Call the action table update function in a loop.
main_loop:
GetActiveActionTable();
ActionTable_Update();
jump main_loop;

Now the menu or other modal system can push an ActionTable on a stack (doubly linked list) and intercept events for a while, then pop itself off the stack to resume prior logic & input.

You don't have to kill me, I'm already dead.
Logged
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #1376 on: April 19, 2018, 12:49:24 PM »

Tile assignment through overlapping edge and corner in inflated square planet (with dead code lying around)
- I first tried to split the surface into subsurface, which might be the prefered method for generic shape generalization
- Then I switch to per tile test

Basically corner create tiles that aren't rendered at all, the surface is always relative to the center tile.

Code:
void plaincoordinate(Vector3 pos,MeshGenerator.axis face, int hash){//parameter need replace with member

Vector3 facepose  = new Vector3(
Mathf.Floor(pos.x*hash)+hash,
Mathf.Floor(pos.y*hash)+hash,
Mathf.Floor(pos.z*hash)+hash);

Vector3 faceplane = mulVector( VectorPlane(face),facepose); //get the coordinate to a plane
Vector2 groundPosition = GroundPlane(face,faceplane); //turn coordinate into 2d

int groundsize = this.groundradius * 2 +1;//is a member, obsolete
int terrainsize = this.hashes * 2; //should be member?
if (groundsize > terrainsize){groundsize = (terrainsize/ 2)-1;}//error handling, rescale to terrainsize

//find overlap
Vector2 tileFaceSize0 = Vector2.zero;
Vector2 tileFacesize1 = new Vector2(groundsize,groundsize);

int leftbound = -this.groundradius + (int)groundPosition.x;
int rightbound =  this.groundradius + (int)groundPosition.x;
int upperbound =  this.groundradius + (int)groundPosition.y;
int bottombound = -this.groundradius + (int)groundPosition.y;

//iterate grid base on bound, assign tile to face base on coordinate check

//---------------------------------
//old way of figure out zone cut around limit
//horizontal bound
if (leftbound < 0){//Debug.Log("l<0");
tileFaceSize0.x = Mathf.Abs((float)leftbound);
tileFacesize1.x = groundsize - tileFaceSize0.x;}
else if (rightbound > terrainsize-1){//Debug.Log("r>s");
tileFaceSize0.x = (float)(rightbound - terrainsize+1);
tileFacesize1.x = (float) groundsize - tileFaceSize0.x;}
//vertical bound
if (upperbound > terrainsize-1){//Debug.Log("u>s");
tileFaceSize0.y = (float)(upperbound - terrainsize+1);
tileFacesize1.y = (float) groundsize - tileFaceSize0.y;}
else if (bottombound < 0){//Debug.Log("b<0");
tileFaceSize0.y = Mathf.Abs((float)bottombound);
tileFacesize1.y = groundsize - tileFaceSize0.y;}

//int Hbound;
//if leftbound then Hbound = 1
//else if rightbound then Hbound = -1
//else Hbound = 0

//int Vbound;
//if bottombound then Vbound = 1
//else if upperbound then Vbound = -1
//else Vbound = 0

//return new vector2 (Hbound, Vbound)

//return new Vector4(tileFacesize1.x,tileFacesize1.y, tileFaceSize0.x,tileFaceSize0.y);

//create terrain
//face 0 -> x1,y1
//if face 1 -> x0,y1
//if face 2 -> x1,y0
//if disable -> x0,y0

//Debug.Log("size: "+hashes*2);
//Debug.Log("right: " + rightbound + " center: " + groundPosition + " left: " +leftbound);
//Debug.Log("up: " + upperbound + " center: " + groundPosition + " down: " + bottombound);
//Debug.Log(facepose );

//Debug.Log(
// "   x0: " + tileFaceSize0.x + " - y0: " + tileFaceSize0.y +
// " ----- x1: " + tileFacesize1.x + " - y1: " + tileFacesize1.y// +
//);

//new strategy:
//iterate all tiles, if coordinate outside, assign face accordingly
}

Code:
void checkBound(Vector2 pos){
//float groundsize = (float)this.groundradius * 2 +1;
//1 -> size of the face
bool left   = pos.x >  1;// groundsize;
bool right  = pos.x < -1;//groundsize;// < 0;
bool up     = pos.y >  1;//groundsize;
bool bottom = pos.y < -1;//groundsize;// < 0;

//if left or right AND bottom or up then disable else find next face
string debugtext = (left || right) && (up || bottom) ? "discard" : "keep";
Debug.Log( "  left  "+ left + " - right " + right + " - up " + up + " -bottom " + bottom + "  :  " + debugtext);
//Debug.Log(groundsize + " // " +pos.x + "," + pos.y);

}

I still need a graph structure to handle neighbor face of the planet, we cannot guarantee they have the same coordinate basis at all, which open to generalization to any planet shape, as a graph is always arbitrary, provided all shape are made of quad.
Logged

CodeLobe
Level 0
***


Decide to Act Sensibly


View Profile WWW
« Reply #1377 on: May 05, 2018, 01:15:09 AM »

Squeezing instructions down by rewriting 32bit code as 16bit code so I can fit one more feature in Yet Another Boot Loader (yet another Alternative OS in development).

Code:
BootLoad:
ljmp $0x07C0, $_relocate # Convert CS:IP = 0000:7C00 to 07C0:0000


# Move the bootstrap code to make way for OS bootstrap.
_relocate:
movw %cs, %ax # Set DS:SI to source: 07CO:0000
movw %ax, %ds
xorw %si, %si

movw $0x50, %ax # Set ES:DI to destination: 0050:0000
movw %ax, %es
movw $0, %di

movw $0x100, %cx # Copy 512 bytes 2 at a time = 256 reps.
cld
rep movsw

ljmp $0x0050, $_init # Jump to the relocated code.


# Initialize the program state, set video mode, stack, etc.
_init:
movw %ax,            %ds # Set data segment to new code segment.

# Create the stack
movb $0x70, %al # Set SS just after the bootstrap code.
movw    %ax,            %ss
movw $0x900, %sp # Set SP to 2.25KB

# Set Video mode.
movw $3, %ax # 80x25 text w/ color
int $0x10 # Sets vidmode and cursor shape.

"Funny" thing: All these years of hardware development and the x86[-64] still reads 512 bytes from the boot drive, places it at offset 0000:7C00 then executes that code in 16bit "real" mode.  UEFI et. al. were supposed to save us from having to fit bootstrap loader code into one small sector, but really just added another boot platform to the list we have to support.

Everyone uses GRUB nowadays, why not just use GRUB?  Bootloaders are easy and GRUB is bloated.  This is for embedded SOC (system on a chip) and space is scarce (has to fit in with the BIOS image).  Grub must have a .cfg that is updated since it uses hardcoded drives and OS boot partitions.  GRUB is at minimum 31 kilobytes.  My entire bootloader is 466 bytes, it dynamically scans the entire system for bootable drives, if no key is pressed it boots the first OS partition.  If a key is pressed it lists bootable partitions and allows selection of OS, like Grub, but without needing a hardcoded .cfg;  You can hotswap drives in and my bootloader will find them, but GRUB will not.  My bootloader can bootload GRUB if users need it for some odd reason.

TL;DR: Reinventing the Wheel, again.
Logged
Daid
Level 3
***



View Profile
« Reply #1378 on: May 05, 2018, 05:10:23 AM »

Wait, you are using a SOC with x86? Any particular reason you decided on x86 instead of ARM?
(And I still think enabling the A20 line is the strangest legacy thing in x86 booting)

I'm also curious how your work relates to gaming? Building some kind of stand alone gaming system?
Logged

Software engineer by trade. Game development by hobby.
The Tribute Of Legends Devlog Co-op zelda.
EmptyEpsilon Free Co-op multiplayer spaceship simulator
Crimsontide
Level 5
*****


View Profile
« Reply #1379 on: May 05, 2018, 08:42:51 AM »

Reminds me of this:


I wrote a boot loader and simple OS years ago in university, and even then I thought the 512 byte pre-boot bootloader was archaic...  I can't believe it hasn't changed.
Logged
Pages: 1 ... 67 68 [69] 70 71
Print
Jump to:  

Theme orange-lt created by panic