duhhhh
ofc specular lighting is fucked on planes, all the normals are the same.
[img]http://returnnull.dyndns.org/img/durrr_spec.png[/img]
Updated my java applet game. Now it has a title screen and working menu system. Added females. Now you can spawn cows. You can turn FPS on and off. You can change the options on the random map generator. To play click the link!!!
[url]http://davidjokinen.com/play.php[/url]
[img]http://davidjokinen.com/GameAlpha4.png[/img]
Alpha doesn´t work for me
[URL=http://www.cubeupload.com][IMG]http://www.cubeupload.com/files/72d000uug.png[/IMG][/URL]
On Windows 7.
try PNG maybe?
It does that sometimes with vista too. It is one of the bugs I am working on. The only thing to fix that is clicking the top link and then clicking play link to reload it.
-snip-
[QUOTE=Guru-guru;16358186]Updated my java applet game. Now it has a title screen and working menu system. Added females. Now you can spawn cows. You can turn FPS on and off. You can change the options on the random map generator. To play click the link!!!
[url]http://davidjokinen.com/play.php[/url][/QUOTE]
Looks nice. There's one annoying bug that I'm not sure if you know about: if you go over the buttons above the bottom half, it starts pushing the camera up. It's annoying to click for a button and it jump up away from where you were. Game looks fantastic other than that. :)
[QUOTE=Guru-guru;16358517]It does that sometimes with vista too. It is one of the bugs I am working on. The only thing to fix that is clicking the top link and then clicking play link to reload it.[/QUOTE]
doesn't show anything for me, only a little red X at the corner. I'm on OSX by the way.
[QUOTE=Kat of Night;16359659]doesn't show anything for me, only a little red X at the corner. I'm on OSX by the way.[/QUOTE]
hmm what does it say in the Java Console?
[QUOTE=Guru-guru;16360118]hmm what does it say in the Java Console?[/QUOTE]
Absolutely nothing. I recommend putting the filenames in quotes in the applet tag, the lack of them might be freaking out safari (and firefox)
[QUOTE=Robber;16368859]What's that? :confused:[/QUOTE]
can't you see the hidden picture?
It's me putting pixels on a screen. I know it's like, zilch for you guys, but it's my first openGL app.
[QUOTE=Robber;16368859]What's that? :confused:[/QUOTE]
Face it - some just can't see magic eyes :smug:
Hey Overv how did you get the derma skin in your program? I'm guessing you ripped it of some screenshots or got it directly from gmod folders and are drawing it as a set of images? Either way could you please PM it to me. I would do it myself but I'm not on my main computer so I don't have gmod isntalled.
[QUOTE=Sporbie;16370113]Where could I get nice looking GUI skins for my app? I'm drawing the GUI myself in SFML, so I guess it would just be a set of images?[/QUOTE]
Eh, Overv stole Derma, so I'll use the way I think he's implemented a button as an example. For example, a Derma button uses nine images in CakePhysics - 4 pictures representing the 4 corners drawn that never get resized even when the button size grows, 4 "side", "top" and "bottom" textures between each corner - but not in the center - that get resized or tiled to accommodate button resizing, and a "center" image that probably gets resize raped to size. Obviously, this isn't a general example - but you get the point.
So yes, it's really a bunch of images representing parts of widgets.
that's 9slice y0
So I'm trying to make my program be memory efficient and I have a question.
If I have a class, and all (most actually) members are declared on the stack (int width,height,...;) but in main() I declare an instance of that class on the heap (Class *c= new Class()), where do the object's members go?
Thanks for rating me dumb instead of answering my question, that really helped me.
[QUOTE=Sporbie;16370996]So I'm trying to make my program be memory efficient and I have a question.
If I have a class, and all (most actually) members are declared on the stack (int width,height,...;) but in main() I declare an instance of that class on the heap (Class *c= new Class()), where do the object's members go?
Thanks for rating me dumb instead of answering my question, that really helped me.[/QUOTE]
Say you had:
[code]
class Class {
byte a;
byte b;
byte c;
};
[/code]
If you went:
[code]
Class* v = new Class();
[/code]
Let's say v is at 0x0005 and it points to 0x0007.
[code]
Address Variable Value
0x0005 v 0x0007
0x0006 ???? ????
0x0007 a 0x0000
0x0008 b 0x0000
0x0009 c 0x0000
[/code]
Integers (int) usually take 4 bytes of space, and pointers are usually stored as integers, so this is technically wrong, as 'v' should take up 4 bytes.
So the pointer is stored on the stack (like usual) but it also points to the stack, where the bytes are? I see, I'll just have all the members declared on the heap then.
[QUOTE=Sporbie;16370996]So I'm trying to make my program be memory efficient and I have a question.
If I have a class, and all (most actually) members are declared on the stack (int width,height,...;) but in main() I declare an instance of that class on the heap (Class *c= new Class()), where do the object's members go?
Thanks for rating me dumb instead of answering my question, that really helped me.[/QUOTE]
I'm not very good at C++, but I think if they are members of the class, they are where the class is (in this case on the heap).
[QUOTE=Deco Da Man;16371256]Say you had:
[code]
class Class {
byte a;
byte b;
byte c;
};
[/code]
If you went:
[code]
Class* v = new Class();
[/code]
Let's say v is at 0x0005 and it points to 0x0007.
[code]
Address Variable Value
0x0005 v 0x0007
0x0006 ???? ????
0x0007 a 0x0000
0x0008 b 0x0000
0x0009 c 0x0000
[/code]
Integers (int) usually take 4 bytes of space.[/QUOTE]
I'm pretty sure you're not supposed to assume that class fields are 0'd by default, if you leave them uninitialized then they'll just keep whatever value was there after allocation.
[QUOTE=Robber;16371339]I'm not very good at C++, but I think if they are members of the class, they are where the class is (in this case on the heap).[/QUOTE]
That's exactly what a class object is; a collection of its fields, as well as a pointer to the class vtable if the class has or inherits any virtual functions.
[QUOTE=jA_cOp;16371373]I'm pretty sure you're not supposed to assume that class fields are 0'd by default, if you leave them uninitialized then they'll just keep whatever value was there after allocation.[/QUOTE]
[strikeout]In the case of my example, with the class having no constructor, the values would be 0'd.[/strikeout]
You are right, a, b and c would need to be initialised in order for them to be assured 0 (or whatever value they were initialised to).
I just asked at ##C++ (On Freenode), they confirmed this.
[QUOTE=jA_cOp;16371373]
That's exactly what a class object is; a collection of its fields, as well as a pointer to the class vtable if the class has or inherits any virtual functions.[/QUOTE]
Oh god, vtables so taught me a lesson when I was still learning C++ and I thought 'sig checking' was an awesome idea to see if lua_getuserdata was giving me the right class...
[QUOTE=HubmaN V2;16370189]and a "center" image that probably gets resize raped to size.[/QUOTE]
It uses a quad for the center.
[QUOTE=Sporbie;16371297]So the pointer is stored on the stack (like usual) but it also points to the stack, where the bytes are? I see, I'll just have all the members declared on the heap then.[/QUOTE]
No, if you use new, it's going to be on the heap.
[QUOTE=Overv;16371721]It uses a quad for the center.[/QUOTE]
Oh, my bad.
Sorry, you need to Log In to post a reply to this thread.