• What are you working on? v15
    5,001 replies, posted
[QUOTE=geel9;27826077][url=https://market.android.com/details?id=com.newgrounds.audio]My Android app is out.[/url][/QUOTE] Giving it a try [editline]3rd February 2011[/editline] Cant, I use 2.1
[QUOTE=geel9;27826077][url=https://market.android.com/details?id=com.newgrounds.audio]My Android app is out.[/url][/QUOTE] Set the build target to android 1.6 or something, it will then work on all greater versions of android.
[img]http://chart.apis.google.com/chart?&cht=p&chs=460x250&chd=t:4.7,7.9,35.2,51.8,0.4&chl=Android%201.5|Android%201.6|Android%202.1|Android%202.2|Android%202.3&chco=c4df9b,6fad0c[/img] 2.1 is still a big part of the market Source: [url]http://developer.android.com/resources/dashboard/platform-versions.html[/url]
[QUOTE=sLysdal;27830714][img_thumb]http://chart.apis.google.com/chart?&cht=p&chs=460x250&chd=t:4.7,7.9,35.2,51.8,0.4&chl=Android%201.5|Android%201.6|Android%202.1|Android%202.2|Android%202.3&chco=c4df9b,6fad0c[/img_thumb] 2.1 is still a big part of the market Source: [url]http://developer.android.com/resources/dashboard/platform-versions.html[/url][/QUOTE] Because AT&T won't release 2.2 for the Samsung Galaxy S >:( Anyways, I made a map renderer for asiekierka's [url=http://64pixels.org]64pixels[/url] (Click to view large image) [img_thumb]http://dl.dropbox.com/u/8965316/64px_map_render_1.png[/img_thumb]
[QUOTE=calzoneman;27831152]Because AT&T won't release 2.2 for the Samsung Galaxy S >:([/QUOTE] Same with Sony Ericsson on X10, X8 and X10 mini
[QUOTE=Sakarias88;27822375]It's probably because the one who implemented the spatial partitioning (or the frustum) didn't know what he was doing. To me it seems like it checks the viewers position (not the frustum itself) to find out which partitions to render. [/QUOTE] I made the chunks not render and unload when there 4 chunks away from the player, [QUOTE]And the holes don't seem to be that random. If you haven't noticed the hole is always located at the last row and column of that specific partition.[/QUOTE]Ye, it is but i cant undetstand why it does it, the map gen places it correcly, and if i render the map in a flatgrass a whit a few holes in it it works fine Ffffffffff "tessellation", "spatial partitioning", 'frustum" whattttttt [QUOTE=Orki;27829237]Saw that someone posted a MC clonethingish and thougt i could post this experiment i did using hardware instancing to draw alot of objects without any lag if you use the the regular way of drawing models you will probably only be able to draw a few hundred blocks and only one or two faces of it with hardware instancing i can draw all faces of 50,000 blocks in one screen with 60 fps SCREENS ![/QUOTE] Any chance i could see the way youre rendering them?
[QUOTE=bromvlieg;27832456]I made the chunks not render and unload when there 4 chunks away from the player, Ye, it is but i cant undetstand why it does it, the map gen places it correcly, and if i render the map in a flatgrass a whit a few holes in it it works fine Ffffffffff "tessellation", "spatial partitioning", 'frustum" whattttttt Any chance i could see the way youre rendering them?[/QUOTE] [url]http://msdn.microsoft.com/en-us/library/ee418269(v=vs.85).aspx[/url] [url]http://www.opengl.org/registry/specs/ARB/draw_instanced.txt[/url] And UBO
[QUOTE=ThePuska;27829632]How many times would somevalue be evaluated? I mean in [code]if (somevalue == onevalue || somevalue == othervalue) { //do stuff }[/code] it's evaluated twice, but in the former I'd assume it to be equal to something like [code]a = somevalue if (a == onevalue || a == othervalue) {}[/code] because somevalue only appears in the code once [editline]3rd February 2011[/editline] I think it'd be a better idea in functional languages where functions wouldn't have side-effects.[/QUOTE] If you don't mind it evaluating twice, you can create an (evil) macro: [cpp] #define match_one(a, x, y) (a == x || a == y) if (match_one(somevalue, onevalue, othervalue)) { //... } [/cpp] [editline]f[/editline] whoops. accidentally rated myself
What if a is a function or value being incremented?
People say ray/sphere intersection is the easiest kind. Guess I'm doing something wrong then :v:. [cpp]// p here is a point on the primitive // line: p = s + n * d // sphere in origin: |p| = r // // Solve for intersection: // // |p| = radius // p.x^2 + p.y^2 + p.z^2 = r^2 // (s.x+n*d.x)^2 + (s.y+n*d.y)^2 + (s.y+n*d.y)^2 = r^2 // s.x^2 + n^2 * d.x^2 + 2*n*s.x*d.x + s.y^2 + n^2 * d.y^2 + 2*n*s.y*d.y + s.z^2 + n^2 * d.z^2 + 2*n*s.z*d.z = r^2 // ( d.x^2 + d.y^2 + d.z^2 ) * n^2 + ( 2*s.x*d.x + 2*s.y*d.y + 2*s.z*d.z ) * n + s.x^2 + s.y^2 + s.z^2 - r^2 = 0 // D = ( 2*s.x*d.x + 2*s.y*d.y + 2*s.z*d.z )^2 - 4 * ( d.x^2 + d.y^2 + d.z^2 ) * ( s.x^2 + s.y^2 + s.z^2 - r^2 ) // n = ( -( 2*s.x*d.x + 2*s.y*d.y + 2*s.z*d.z ) + sqrt( ( 2*s.x*d.x + 2*s.y*d.y + 2*s.z*d.z )^2 - 4 * ( d.x^2 + d.y^2 + d.z^2 ) * ( s.x^2 + s.y^2 + s.z^2 - r^2 ) ) ) / ( 2 * ( d.x^2 + d.y^2 + d.z^2 ) )[/cpp] There is probably some dot/cross product magic that makes all of this go away.
from what I'm seeing, it looks like there definitely is some vector math magic that'll solve that very complicated looking math.
[cpp]#include <iostream> #include <cmath> struct Vector { Vector( float x, float y, float z ) { this->x = x; this->y = y; this->z = z; } Vector operator *( float n ) { return Vector( x*n, y*n, z*n ); } Vector operator +( Vector& vec ) { return Vector( vec.x + x, vec.y + y, vec.z + z ); } float x, y, z; }; float sqr( float n ) { return n*n; } int main() { // Line Vector s ( 0.0f, 0.0f, 0.0f ); Vector d ( 0.0f, 0.0f, 1.0f ); // Sphere float r = 3.0f; // Intersections float discriminant = sqr( 2*s.x*d.x + 2*s.y*d.y + 2*s.z*d.z ) - 4 * ( sqr( d.x ) + sqrt( d.y ) + sqr( d.z ) ) * ( sqr( s.x ) + sqr( s.y ) + sqr( s.z ) - sqr( r ) ); float n1 = ( -( 2*s.x*d.x + 2*s.y*d.y + 2*s.z*d.z ) + sqrt( discriminant ) ) / ( 2 * ( sqr( d.x ) + sqr( d.y ) + sqr( d.z ) ) ); float n2 = ( -( 2*s.x*d.x + 2*s.y*d.y + 2*s.z*d.z ) - sqrt( discriminant ) ) / ( 2 * ( sqr( d.x ) + sqr( d.y ) + sqr( d.z ) ) ); // Solutions Vector int1 = s + d * n1; Vector int2 = s + d * n2; std::cout << "Intersections at:" << std::endl; std::cout << "( " << int1.x << ", " << int1.y << ", " << int1.z << " )" << std::endl; std::cout << "( " << int2.x << ", " << int2.y << ", " << int2.z << " )" << std::endl; return 0; }[/cpp] [img]http://gyazo.com/1d8abd1f44fe4f3e3125a23537199da2.png[/img] :smug: Also, I'm aware that I should check the discriminant for amount of solutions.
Why the sqrt amongst the sqrs? D = sqr( 2 * dotp(s, d) ) - 4 * dotp(d, d) * (dotp(s, s) - r) n = ( -2 * dotp(s, d) +- sqrt( D ) ) / ( 2 * dotp(d, d) )
[QUOTE=ThePuska;27835047]Why the sqrt amongst the sqrs? D = sqr( 2 * dotp(s, d) ) - 4 * dotp(d, d) * (dotp(s, s) - r) n = ( -2 * dotp(s, d) +- sqrt( D ) ) / ( 2 * dotp(d, d) )[/QUOTE] Yeah, just noticed that I was essentially doing dot products. And that sqrt was a typo. Final function: [cpp]void intersectLineSphere( Vector s, Vector d, Vector c, float r, Vector& solution1, Vector& solution2 ) { s = s - c; float discriminant = sqr( 2 * s.Dot( d ) ) - 4 * d.Dot( d ) * ( s.Dot( s ) - sqr( r ) ); float n1 = ( -2 * s.Dot( d ) + sqrt( discriminant ) ) / ( 2 * d.Dot( d ) ); float n2 = ( -2 * s.Dot( d ) - sqrt( discriminant ) ) / ( 2 * d.Dot( d ) ); solution1 = s + d * n1 + c; solution2 = s + d * n2 + c; }[/cpp]
I added States, which are kind of independent levels, they each have their own Update/Drawing function and I will add that they can also load stuff. [img]http://puu.sh/Rto[/img] Before using SetState it was white! I was thinking this would be the easiest way to make it, as I plan on adding scripting support(I think I will use lua.). Does anyone think this is a good idea, before I plan on using it more?
So I've been getting used to prolog for one of my AI modules at uni. It's fascinating and makes you think in unusual ways, and about how knowledge can be represented in the smallest possible way while still being able to infer new facts. The bugs can be quite hilarious at times, just now prolog was telling me how my sister is actually my and her own brother and was quite insistent; it was stuck in an infinite loop. Trying to work out recursion now :psyduck: [QUOTE=commander204;27837012]I added States, which are kind of independent levels, they each have their own Update/Drawing function and I will add that they can also load stuff. [img_thumb]http://puu.sh/Rto[/img_thumb] Before using SetState it was white! I was thinking this would be the easiest way to make it, as I plan on adding scripting support(I think I will use lua.). Does anyone think this is a good idea, before I plan on using it more?[/QUOTE] You should integrate the console into the same window as the game, then besides being awesome it'd also work in fullscreen :P
[QUOTE=Overv;27834656]People say ray/sphere intersection is the easiest kind. Guess I'm doing something wrong then :v:.[/QUOTE] Here's [url=http://www.facepunch.com/threads/1028402-What-are-you-working-on-V14?p=26510773&viewfull=1#post26510773]my implementation[/url] that I posted awhile back.
Laptop died again, this time the fan started screaming at me. Programming held off for another week! I feel so empty.
while I am working on my game, decided to upload a simple compass app, just to keep my devleopers account not empty [url]https://market.android.com/details?id=com.nekokittygames.com[/url] Excuse the bad grammer, seems the web market takes some time to update. Also just got the account from my father (christmas and all) and seems he assumed name, had to be billing name.
[QUOTE=nekosune;27842153]while I am working on my game, decided to upload a simple compass app, just to keep my devleopers account not empty [url]https://market.android.com/details?id=com.nekokittygames.com[/url] Excuse the bad grammer, seems the web market takes some time to update. Also just got the account from my father (christmas and all) and seems he assumed name, had to be billing name.[/QUOTE] [img]http://gyazo.com/b40cdfd3f2bd6f4b9da91db5efd4e26f.png[/img] :confused: [editline]3rd February 2011[/editline] Also you can change the name in which you distribute in the developer console.
[QUOTE=foszor;27842439][img_thumb]http://gyazo.com/b40cdfd3f2bd6f4b9da91db5efd4e26f.png[/img_thumb] :confused: [editline]3rd February 2011[/editline] Also you can change the name in which you distribute in the developer console.[/QUOTE] will reupload with the limit set lower, oh and I did, it shows up properly on the phones now, but the web interface still shows his >.> [editline]4th February 2011[/editline] it is now a lower limit, however, it seems the web interface wil take a while to catch up, still showing the old stuff.
alright, i've finally put speex support in my demo utility and it works... almost: [url]http://dl.dropbox.com/u/2116169/voicedump.mp3[/url] it seems to be playing back at the right speed, but the pitch appears to have been totally destroyed (pitch bending won't even help it). i have no clue why. could be the source engine's absurd implementation of speex, because microphone input is grabbed at 11025hz despite the fact that speex only supports 8/16/32khz.
[media]http://i.imgur.com/dEuuW.png[/media] I've been playing around with [url=http://code.google.com/p/asmjit/]AsmJit[/url] and decided to make a simple scripting language. It's obviously not much different from ASM but I'm only playing around. Anyways, I just got functions (partially) done. It's JIT compiled. :smug: By the way, efeX, I'm not working with you anymore. Maybe next year. :) Oh, this isn't for Zach's shit either.
[QUOTE=Rohans;27844834][media]http://i.imgur.com/dEuuW.png[/media] I've been playing around with [url=http://code.google.com/p/asmjit/]AsmJit[/url] and decided to make a simple scripting language. It's obviously not much different from ASM but I'm only playing around. Anyways, I just got functions (partially) done. It's JIT compiled. :smug: By the way, efeX, I'm not working with you anymore. Maybe next year. :) Oh, this isn't for Zach's shit either.[/QUOTE] Why would you ever do that? It's assembly! C can do pretty much the same thing!
[QUOTE=supersnail11;27846042]Why would you ever do that? It's assembly! C can do pretty much the same thing![/QUOTE] It's called learning. Posts like these make me want to hit that big ignore button of yours
[QUOTE=mmavipc;27846453]It's called learning. Posts like these make me want to hit that big ignore button of yours[/QUOTE] Touche
I'm working on learning java. Also working on getting help, please! someone help me in the "what do you need help with" thread. :emo:
[QUOTE=supersnail11;27846734]Touche[/QUOTE] You do know that 'touche' is [I]not[/I] a pretentious way of saying 'you too', right? Its meaning is closer to 'You got me there!'. [quote] touché [tu&#720;&#712;&#643;e&#618;] interj 1. (Individual Sports & Recreations / Fencing) an acknowledgment that a scoring hit has been made in a fencing competition 2. an acknowledgment of the striking home of a remark or the capping of a witticism [from French, literally: touched] [/quote]
With the .obj file format, it has groups, in these groups do the verts start again? EG: [code] g abc v 1 2 3 f 1 g def v 3 2 1 f 1 << Is this vert(1,2,3) or vert(3,2,1)? [/code] [editline]4th February 2011[/editline] They are absolute index. Anyone understand why drawing an object holes occur? [img]http://i.imgur.com/LNYhD.png[/img]
[QUOTE=COBRAa;27849882]Anyone understand why drawing an object holes occur? [img_thumb]http://i.imgur.com/LNYhD.png[/img_thumb][/QUOTE] I'm guessing you're drawing wireframe and that there's no quad or triangle lines to draw in the empty spots. So it'd be large flat sections on the model causing the 'holes' to appear - if you draw without wireframe and with texturing the holes should disappear.
Sorry, you need to Log In to post a reply to this thread.