Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411588 Posts in 69386 Topics- by 58443 Members - Latest Member: Mansreign

May 06, 2024, 11:10:51 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)What are you programming RIGHT NOW?
Pages: 1 ... 56 57 [58] 59 60 ... 71
Print
Author Topic: What are you programming RIGHT NOW?  (Read 210388 times)
Whiteclaws
Level 10
*****


#include <funny.h>


View Profile
« Reply #1140 on: June 12, 2014, 04:55:21 PM »

My own hashtable  Giggle
It seems like (first impressions) it hashes 4GB of 32bit data into 256KB and the getters are only a few instructions, which is awesome! Going to stresstest furthermore... Maybe I'm just dreaming over a lemon Cheesy
Logged
ThemsAllTook
Administrator
Level 10
******



View Profile WWW
« Reply #1141 on: June 12, 2014, 06:34:03 PM »

My own hashtable  Giggle

That's a fun project - I made one of my own not too long ago. Pretty satisfying experience.
Logged

tjcbs
Level 1
*


View Profile WWW
« Reply #1142 on: June 12, 2014, 11:15:02 PM »

My own hashtable  Giggle

That's a fun project - I made one of my own not too long ago. Pretty satisfying experience.

Ugh. I *think* I have this working perfectly now, and I've had this class for years.  A *lot* of subtle bugs are possible.

One hint: When removing an entry, make sure you re-hash adjacent entries previous to after (a bug in my bug description) the one you removed. This threw me for a loop. And then thinking I fixed it, I forgot to wrap around back to the end beginning when the adjacencies straddled the edges of the table, another crazy once in 10000 times bug. (Assuming you are using a flat hash table).
Logged

tjcbs
Level 1
*


View Profile WWW
« Reply #1143 on: June 12, 2014, 11:28:30 PM »

I'm working on a glowing trail that follows the mouse cursor.

SWEET BABY JESUS this is hard to get right. I thought this would take me like an hour or so. NOOOOO SIR. Its been days and days of trying and scrapping one approach after the next, mounting frustration, despair looming larger and larger. If I knew it would be this hard, I would never have bothered. But now I have to see it through. I *think* I finally see the light at the end of the tunnel. But good god, this sucked.

Logged

Whiteclaws
Level 10
*****


#include <funny.h>


View Profile
« Reply #1144 on: June 13, 2014, 05:08:40 AM »

My own hashtable  Giggle

That's a fun project - I made one of my own not too long ago. Pretty satisfying experience.

Ugh. I *think* I have this working perfectly now, and I've had this class for years.  A *lot* of subtle bugs are possible.

One hint: When removing an entry, make sure you re-hash adjacent entries previous to after (a bug in my bug description) the one you removed. This threw me for a loop. And then thinking I fixed it, I forgot to wrap around back to the end beginning when the adjacencies straddled the edges of the table, another crazy once in 10000 times bug. (Assuming you are using a flat hash table).
All the possible 32bit combinations will fit in 256kb, no collisions, thus getters and setters are almost the same (one addition, one compare and one lookup, that's it) and no need to rehash anything, at least that's how the algorithm should work
Logged
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #1145 on: June 13, 2014, 07:12:47 AM »

Writing a somewhat game-engine agnostic conversation/flow system.

The xml schema is all done. I've made a test file and I've made a implementation in unity. It keeps track on conversation tokens that are granted by taking various conversation paths. Also has a requirements system.

I'm probably going to author the editor in WPF. I have just started my love affair with XAML. It's so liberating to stop focusing on multi-platform tools and just get the job done. WPF s actually pretty amazing.
Logged

Rainforce15
Level 0
**



View Profile WWW
« Reply #1146 on: June 13, 2014, 02:08:16 PM »

I'm working on a glowing trail that follows the mouse cursor.

SWEET BABY JESUS this is hard to get right. I thought this would take me like an hour or so. NOOOOO SIR. Its been days and days of trying and scrapping one approach after the next, mounting frustration, despair looming larger and larger. If I knew it would be this hard, I would never have bothered. But now I have to see it through. I *think* I finally see the light at the end of the tunnel. But good god, this sucked.

game/rendering engine? Also what have you tried so far, and why did it fail in your opinion?
Logged


I made a game thingy.
It has colors in it and might make you curse. : D
tjcbs
Level 1
*


View Profile WWW
« Reply #1147 on: June 13, 2014, 02:31:10 PM »

My own hashtable  Giggle

That's a fun project - I made one of my own not too long ago. Pretty satisfying experience.

Ugh. I *think* I have this working perfectly now, and I've had this class for years.  A *lot* of subtle bugs are possible.

One hint: When removing an entry, make sure you re-hash adjacent entries previous to after (a bug in my bug description) the one you removed. This threw me for a loop. And then thinking I fixed it, I forgot to wrap around back to the end beginning when the adjacencies straddled the edges of the table, another crazy once in 10000 times bug. (Assuming you are using a flat hash table).
All the possible 32bit combinations will fit in 256kb, no collisions, thus getters and setters are almost the same (one addition, one compare and one lookup, that's it) and no need to rehash anything, at least that's how the algorithm should work
Please explain this algorithm, it doesn't seem possible from your description.
Logged

tjcbs
Level 1
*


View Profile WWW
« Reply #1148 on: June 13, 2014, 02:46:36 PM »

I'm working on a glowing trail that follows the mouse cursor.

SWEET BABY JESUS this is hard to get right. I thought this would take me like an hour or so. NOOOOO SIR. Its been days and days of trying and scrapping one approach after the next, mounting frustration, despair looming larger and larger. If I knew it would be this hard, I would never have bothered. But now I have to see it through. I *think* I finally see the light at the end of the tunnel. But good god, this sucked.

game/rendering engine? Also what have you tried so far, and why did it fail in your opinion?

This is for my own game and engine. The basic problem I think has been the instability and jerkiness of mouse input. And the fact that even a little bit of overlap in the trail causes a noticible artifact.

Every frame I'm emitting a quad whose vertices are manually placed. My solution now is to keep a running average of the last 5 mouse positions, and use the vector form that to the current position to determine the direction of the segment as well as the orientation of the leading edge. This means that the trail can stray from the mouse when moving quickly. Too much "kinkiness" between quads becomes very noticable, but I thought that resorting to bezier curves was overkill, since I'm outputting a quad every frame. I might have to anyway, since I want to port to low-fps platforms (mobile).

I'm doing a horrible job explaining this, partly because it is still a muddle in my head. I have a feeling that this problem is trivial for everyone but me anyway.

Logged

Whiteclaws
Level 10
*****


#include <funny.h>


View Profile
« Reply #1149 on: June 13, 2014, 06:08:24 PM »

My own hashtable  Giggle

That's a fun project - I made one of my own not too long ago. Pretty satisfying experience.

Ugh. I *think* I have this working perfectly now, and I've had this class for years.  A *lot* of subtle bugs are possible.

One hint: When removing an entry, make sure you re-hash adjacent entries previous to after (a bug in my bug description) the one you removed. This threw me for a loop. And then thinking I fixed it, I forgot to wrap around back to the end beginning when the adjacencies straddled the edges of the table, another crazy once in 10000 times bug. (Assuming you are using a flat hash table).
All the possible 32bit combinations will fit in 256kb, no collisions, thus getters and setters are almost the same (one addition, one compare and one lookup, that's it) and no need to rehash anything, at least that's how the algorithm should work
Please explain this algorithm, it doesn't seem possible from your description.
Just Google additive hash functions, mine is a derivation of it, will get the source code online soon if you are interested...
Logged
Rainforce15
Level 0
**



View Profile WWW
« Reply #1150 on: June 13, 2014, 06:58:49 PM »

This is for my own game and engine. The basic problem I think has been the instability and jerkiness of mouse input. And the fact that even a little bit of overlap in the trail causes a noticible artifact.

Every frame I'm emitting a quad whose vertices are manually placed. My solution now is to keep a running average of the last 5 mouse positions, and use the vector form that to the current position to determine the direction of the segment as well as the orientation of the leading edge. This means that the trail can stray from the mouse when moving quickly. Too much "kinkiness" between quads becomes very noticable, but I thought that resorting to bezier curves was overkill, since I'm outputting a quad every frame. I might have to anyway, since I want to port to low-fps platforms (mobile).

I'm doing a horrible job explaining this, partly because it is still a muddle in my head. I have a feeling that this problem is trivial for everyone but me anyway.
sounds alright - I think you describe what I had in mind as well, in terms of building a trail from quads. Also a quad every frame IS overkill for most cases.
Logged


I made a game thingy.
It has colors in it and might make you curse. : D
tjcbs
Level 1
*


View Profile WWW
« Reply #1151 on: June 14, 2014, 01:42:50 AM »


Just Google additive hash functions, mine is a derivation of it, will get the source code online soon if you are interested...

I did, and all I could find is the naive hash function of simply adding up the bytes of whatever you are hashing, which is not what you are describing.
Logged

tjcbs
Level 1
*


View Profile WWW
« Reply #1152 on: June 14, 2014, 01:46:38 AM »

Also a quad every frame IS overkill for most cases.


I don't think it is, I still see some segmentation, but not enough for it to be not good enough, I think .
Logged

Whiteclaws
Level 10
*****


#include <funny.h>


View Profile
« Reply #1153 on: June 14, 2014, 09:19:31 AM »


Just Google additive hash functions, mine is a derivation of it, will get the source code online soon if you are interested...

I did, and all I could find is the naive hash function of simply adding up the bytes of whatever you are hashing, which is not what you are describing.
Naive, but efficient, but still naive, we gotta remove the "naive" part, your homework, tell me why it's naive, and how I can make it non-naive, thinking a bit about it, you'll find out how I did it Wink
Logged
tjcbs
Level 1
*


View Profile WWW
« Reply #1154 on: June 14, 2014, 04:38:51 PM »


Just Google additive hash functions, mine is a derivation of it, will get the source code online soon if you are interested...

I did, and all I could find is the naive hash function of simply adding up the bytes of whatever you are hashing, which is not what you are describing.
Naive, but efficient, but still naive, we gotta remove the "naive" part, your homework, tell me why it's naive, and how I can make it non-naive, thinking a bit about it, you'll find out how I did it Wink

Naive, for one, because it is commutative, so "ab" hashes to "ba". I feel like we are talking about two separate things, your homework is to explain what you are doing.
Logged

InfiniteStateMachine
Level 10
*****



View Profile
« Reply #1155 on: June 14, 2014, 05:09:20 PM »

Started working on the editor for my game engine agnostic dialogue system

Logged

Pineapple
Level 10
*****

~♪


View Profile WWW
« Reply #1156 on: June 14, 2014, 05:38:47 PM »

I just finished writing a lexical scanner and successfully made it tokenize and tree-ify its own source. Also I learned how to use regular expressions in the process.

Coffee
Logged
Jeff Skyrunner
Level 0
**


Never, but question engineer's judgement


View Profile
« Reply #1157 on: June 15, 2014, 06:13:51 AM »

Writing the core algorithm of my puzzle game
Logged

I'm not a insane, my mother had me tested

I'm an engineer. To save time, just assume I'm never wrong
DarkCart
Level 0
**



View Profile WWW
« Reply #1158 on: June 15, 2014, 12:55:04 PM »

Trying to do a Beatles-themed game in Java.

Logged

Try out EasyJava
Whiteclaws
Level 10
*****


#include <funny.h>


View Profile
« Reply #1159 on: June 15, 2014, 01:38:18 PM »


Just Google additive hash functions, mine is a derivation of it, will get the source code online soon if you are interested...

I did, and all I could find is the naive hash function of simply adding up the bytes of whatever you are hashing, which is not what you are describing.
Naive, but efficient, but still naive, we gotta remove the "naive" part, your homework, tell me why it's naive, and how I can make it non-naive, thinking a bit about it, you'll find out how I did it Wink

Naive, for one, because it is commutative, so "ab" hashes to "ba". I feel like we are talking about two separate things, your homework is to explain what you are doing.
Exactly, now add another dimension and a compare to check if a > b
Logged
Pages: 1 ... 56 57 [58] 59 60 ... 71
Print
Jump to:  

Theme orange-lt created by panic