[QUOTE=T3hGamerDK;31903728]In C++ I don't use a library, I was stupid enough to end up writing my own :v:
But I use JSON in Javascript, Lua and Python too![/QUOTE]
:V I mean what JSON library do you use?
[QUOTE=esalaka;31903680]Lua bindings for minecraft functionality would be pretty awesome.
You'd just have to distribute natives which would be kinda annoying I guess, but hey, you could use LuaJIT. As we all know, it's fast as fuck.[/QUOTE]Lua for Minecraft already exists.
Personally, they should have used Javascript.
[QUOTE=danharibo;31903955]Lua for Minecraft already exists.
Personally, they should have used Javascript.[/QUOTE]
I know how V8 is fast and all, I just happen to prefer Lua. I never liked JavaScript for some reason.
I could make it for javascript but chances are, it would get burried in the minecraft/bukkit forums like all the other mods i made. :downs:
[QUOTE=Map in a box;31904019]I could make it for javascript but chances are, it would get burried in the minecraft/bukkit forums like all the other mods i made. :downs:[/QUOTE]
Minecraft modding is a mess, that's why
[QUOTE=Richy19;31903901]:V I mean what JSON library do you use?[/QUOTE]
What exactly do you mean? In Javascript I juse json2 and Python has it built in and in Lua I made my own.
Is what I'm doing here as bad as I think it is: [url]http://codepad.org/RjN5qHp2[/url]
[QUOTE=Veid;31905103]Is what I'm doing here as bad as I think it is: [url]http://codepad.org/RjN5qHp2[/url][/QUOTE]
Nested switch statements?
There's nothing fundamentally wrong with it. If you start adding more cases it might become difficult to read, though.
[QUOTE=Wyzard;31897990]It'd take a rather hefty UPS to provide several hours of battery power for a desktop PC. My 750VA one provides about half an hour (though it's a few years old). But that's more than enough to ride out a brief outage, or save and shut down cleanly during an extended one.[/QUOTE]
Most PCs don't draw more than 300W when doing general stuff, so unless you're gaming while running from the UPS it should last for more than half an hour.
Just finishing up my final project in artificial intelligence. I have criminals trying to reach a hideout outside of the city. There are cops equipped with laser beams placed throughout the city. They start out using A* to find the quickest path to the end, however the quickest path is very dangerous. They use genetic algorithms to learn overtime which is the safest path.
[media]http://www.youtube.com/watch?v=ewf0jLMV3AM[/media]
This is before I made it so they died if their health is below 0, so ignore that.
Also, what does everyone around here use to record their videos? I'm using camstudio but I couldn't get the lossless codec to work on this pc so the video came out pretty crappy.
[QUOTE=jalb;31905789]Also, what does everyone around here use to record their videos? I'm using camstudio but I couldn't get the lossless codec to work on this pc so the video came out pretty crappy.[/QUOTE]
Fraps.
[editline]23rd August 2011[/editline]
Alternatively, DXTory, but I can never find anywhere to buy the most recent version.
I used camstudio(should of used fraps but whatever) with quality set to max
[QUOTE=ROBO_DONUT;31905311]Nested switch statements?
There's nothing fundamentally wrong with it. If you start adding more cases it might become difficult to read, though.[/QUOTE]
Yeah, it just looks really strange to me. Maybe it's the way I was indenting it.
What do you guys think looks better:
[IMG]http://www.facepunch.com/fp/ratings/tick.png[/IMG] [url]http://codepad.org/cxLgnYNm[/url]
or
[IMG]http://www.facepunch.com/fp/ratings/cross.png[/IMG] [url]http://codepad.org/RjN5qHp2[/url]
[QUOTE=Veid;31906183]Yeah, it just looks really strange to me. Maybe it's the way I was indenting it.
What do you guys think looks better:][/QUOTE]
[img]http://www.facepunch.com/fp/ratings/tick.png[/img], but most IDEs bitch at me for it.
I can read both of them just as easily, and there is such a thing as too much spacing.
I always hated putting case on the same line as switch though. I do it, but only because my IDE does it for me.
I'm tired how in some games input, if you press and hold down a key it doesnt wait a second and if its still down, keep "pressing" that key like windows does. So I made it work that way in my game.
Progress of the game that I'm working on in XNA (WARNING: PROGRAMMER GRAPHICS);
[thumb]http://dl.dropbox.com/u/6470891/gameExample_01.png[/thumb]
It may not look like much, but god damn I'm proud of what I've done so far.
The "Default" square is actually the player, and the brown/green is the test level, drawn from a .txt file and each square consisting of a different tile type, allowing me to do things like change how fast the player walks on them, make appropriate walking noises and whatever I want them to do. The level also lets me batch update/draw all my entities, and soon I'm going to add things like loading the player start position/entities/collision areas from the loading function.
The sprite class I made let's me draw a specific image from a sprite sheet given the height/width and x/y positions, which I'm basically using in everything that has an image associated with it. It actually uses rectangles to draw itself to the screen, so I can re-size any sprite on the fly if needs be.
The screen itself is actually a view matrix which is semi-centered on the player (just noticed that I need to mess around with it slightly to make it 100% correct), and it's zoomed 2* in on the environment, and supports rotation (not sure what I can do with that yet). The SpriteBatch has been modified to draw from it, and to use bilinear interpolation (allows me to keep the images pixely, which is the feel I want to go with. Thanks to the people who helped me in WDYNHW for that).
The shitty brown box is the HUD container, while the black boxes are the item slots, which don't have any actual funtionality as of yet, so I just changed the "Item" sprite in one of them to be a kind-of boot thing. Tomorrow I'll make it so that you can cycle through the boxes, and actually implement some test objects (i.e. boots that make the player walk faster).
There's a load more that I want to do with it, but it's too late at the moment so I'll put it off untill tomorrow.
[QUOTE=Jcorp;31907249]Progress of the game that I'm working on in XNA (WARNING: PROGRAMMER GRAPHICS);
[thumb]http://dl.dropbox.com/u/6470891/gameExample_01.png[/thumb]
It may not look like much, but god damn I'm proud of what I've done so far.
The "Default" square is actually the player, and the brown/green is the test level, drawn from a .txt file and each square consisting of a different tile type, allowing me to do things like change how fast the player walks on them, make appropriate walking noises and whatever I want them to do. The level also lets me batch update/draw all my entities, and soon I'm going to add things like loading the player start position/entities/collision areas from the loading function.
The sprite class I made let's me draw a specific image from a sprite sheet given the height/width and x/y positions, which I'm basically using in everything that has an image associated with it. It actually uses rectangles to draw itself to the screen, so I can re-size any sprite on the fly if needs be.
The screen itself is actually a view matrix which is semi-centered on the player (just noticed that I need to mess around with it slightly to make it 100% correct), and it's zoomed 2* in on the environment, and supports rotation (not sure what I can do with that yet). The SpriteBatch has been modified to draw from it, and to use bilinear interpolation (allows me to keep the images pixely, which is the feel I want to go with. Thanks to the people who helped me in WDYNHW for that).
The shitty brown box is the HUD container, while the black boxes are the item slots, which don't have any actual funtionality as of yet, so I just changed the "Item" sprite in one of them to be a kind-of boot thing. Tomorrow I'll make it so that you can cycle through the boxes, and actually implement some test objects (i.e. boots that make the player walk faster).
There's a load more that I want to do with it, but it's too late at the moment so I'll put it off untill tomorrow.[/QUOTE]
Doesn't look like much.
Edit:
My LD21 attempt before I gave up (stupid physics bug w/ walls).
[IMG]http://localhostr.com/files/1cVnD1W/Log%20Jump.png[/IMG]
[QUOTE=DevBug;31907318]Doesn't look like much.
Edit:
My LD21 attempt before I gave up (stupid physics bug w/ walls).
[IMG]http://localhostr.com/files/1cVnD1W/Log%20Jump.png[/IMG][/QUOTE]
Doesn't look like much.
[QUOTE=BlkDucky;31907347]Doesn't look like much.[/QUOTE]
Never said it did, why post? :smugface:
[highlight](User was banned for this post ("Being an idiot again" - Overv))[/highlight]
[QUOTE=DevBug;31907318]Doesn't look like much.
Edit:
My LD21 attempt before I gave up (stupid physics bug w/ walls).
[IMG]http://localhostr.com/files/1cVnD1W/Log%20Jump.png[/IMG][/QUOTE]
Right, because all the projects you write start off looking fantastic
Edit:
Also i feel i should point out his project currently works and yours doesnt
[QUOTE=Icedshot;31907364]Right, because all the projects people write start off looking fantastic[/QUOTE]
Oh! The drama.
Edit:
How did you not pick up the reference.
[QUOTE=DevBug;31907359]Never said it did, why post? :smugface:[/QUOTE]
It was implied when you said
"This project is bad
"Here is my project"
Edit:
I dont know, but i presume the other people dumbing you also missed the reference
[QUOTE=Icedshot;31907425]It was implied when you said
"This project is bad
"Here is my project"
Edit:
I dont know, but i presume the other people dumbing you also missed the reference[/QUOTE]
The beginning of something...
Hmm, anyone know how I would only show the text thats "inside" the textbox?
Say I have a textbox and a large string,
[code]
+---------------+
|blah blah blah |blah blah blah
+---------------+
[/code]
How would I get only whats in the box, taking in the assumption of the cursor position(cursorPos is the variable, it points to what character in the text the cursor is at)
[QUOTE=DevBug;31907443]The beginning of something...[/QUOTE]
Here we go, backing out again blaming it on trolling
[QUOTE=Map in a box;31907450]Hmm, anyone know how I would only show the text thats "inside" the textbox?
Say I have a textbox and a large string,
[code]
+---------------+
|blah blah blah b|lah blah blah
+---------------+
[/code]
How would I get only whats in the box, taking in the assumption of the cursor position(cursorPos is the variable, it points to what character in the text the cursor is at)[/QUOTE]
If cursor position is based on the current x characters position:
Text.x -= CursorPos * CharacterSize
Use something like: [url]http://www.opengl.org/sdk/docs/man/xhtml/glScissor.xml[/url]
[editline]23rd August 2011[/editline]
[QUOTE=Richy19;31907462]Here we go, backing out again blaming it on trolling[/QUOTE]
I invite you to come to the FP programmers chat, trolling is rampant there.
Offset the text drawing position and clip the rest out?
[editline]23rd August 2011[/editline]
I have a textWidth int,(because when the font maker said monospaced, he lied), what could I do with that?
[QUOTE=DevBug;31907466]I invite you to come to the FP programmers chat, trolling is rampant there.[/QUOTE]
I would but vapour doesnt support it.
Also were not in the chat so your trolling is uncalled for
theres an IRC programmers chat afaik
Sorry, you need to Log In to post a reply to this thread.