[QUOTE=chaz13;31554991]It's yours for the small price for $1,000,000! I'll even throw in the source code, the director's commentary and a lock of my (pubic) hair.
(But seriously, thanks :smile: Although it's far from anything remotely impressive..)[/QUOTE]
Hmm intriguing, I can't really name a drop down survival simulator with that styling (there probably is somewhere), it is a very good concept and could turn out godly :D
[QUOTE=Imhotep;31555322]I've been working on a bit of that 2D dynamic shadow business:
[video=youtube;RMoQEsNR0F0]http://www.youtube.com/watch?v=RMoQEsNR0F0[/video][/QUOTE]
I've been meaning to learn how to do this. I don't know when I am going to, but I will at some point.
[editline]5th August 2011[/editline]
I'd like some feedback on some Animations I implemented.
[url=http://i3software.org/s/Digit_0.3.zip](Download)[/url]
(Arrow Keys to move)
It looks great when you're moving and the world isn't scrolling, but it looks to harsh when the world scrolls. I could make it so it only displays this animation when you're mining minerals, or something. Feedback would be nice!
[QUOTE=chaz13;31555520]I've always had an issue where the shadows are not drawn on top of the casting object so they don't cover objects behind it either and your video doesn't show that, do you get that issue or not? Because that lighting's awesome.[/QUOTE]
It's quite possible that I've misunderstood your question, but those shadows are drawn after the casting objects are drawn, so they will always cover the objects (unless, of course, there is another light source in the shadows path).
I've made a program that takes in a number and outputs an 8x8 .bmp.
It works by turning the input string into an __int64 and then check each bit and turn a pixel white or black depending on the pixel.
That explanation made no sense so here are some pictures (Scaled up to 256x256)
123456789
[img]http://dl.dropbox.com/u/2670708/Programming/C%2B%2B/Double%20to%20image/Double%20to%20image/123456789scale.bmp[/img]
1478954174
[img]http://dl.dropbox.com/u/2670708/Programming/C%2B%2B/Double%20to%20image/Double%20to%20image/1478954174scale.bmp[/img]
18446744073709551615
[img]http://dl.dropbox.com/u/2670708/Programming/C%2B%2B/Double%20to%20image/Double%20to%20image/18446744073709551615scale.bmp[/img]
Give me more numbers to convert :v:
Do 1
Now with slightly smaller images for less page stretch!
[img]http://dl.dropbox.com/u/2670708/Programming/C%2B%2B/Double%20to%20image/Double%20to%20image/1scale.bmp[/img]
I'm kinda learning a bit of C++.NET at the moment, and I decided I wanted to make some random program that fucks with bitmap files.
Before:
[img]http://dl.dropbox.com/u/12453703/data.png[/img]
After:
[img]http://dl.dropbox.com/u/12453703/data_new.png[/img]
[code]// CLRConsole02.cpp : main project file.
#include "stdafx.h"
using namespace System;
using namespace System::IO;
int main(array<System::String ^> ^args)
{
FileStream^ fs = gcnew FileStream("data.bmp",FileMode::Open);
FileStream^ fs_newfile = gcnew FileStream("data_new.bmp",FileMode::Create);
BinaryWriter ^bw = gcnew BinaryWriter(fs_newfile);
const int arrayLength = fs->Length;
BinaryReader^ br = gcnew BinaryReader(fs);
// create a byte array to hold data.bmp (let's call it "buffer array")
array<Byte>^dataArray = gcnew array<Byte>(arrayLength);
// copy data into byte array
br->Read(dataArray,0,arrayLength);
// let's create an array of random bytes (let's call it "random byte array")
Random^ randObj = gcnew Random();
array<Byte>^randBytes = gcnew array<Byte>(200);
randObj->NextBytes(randBytes);
// get a random position from "buffer array", and give it a random byte from
// "random byte array"
for(int i = 0; i < arrayLength; i++)
{
dataArray[ randObj->Next(200,arrayLength) ] = randBytes[ randObj->Next(0,1) ];
}
bw->Write(dataArray);
br->Close();
fs->Close();
fs_newfile->Close();
return 0;
}[/code]
Source: [url]http://dl.dropbox.com/u/12453703/BitmapEffer.zip[/url]
I'm very well aware this code could probably be way more simplified / more efficient, so any code simplification is appreciated. I also tried to make sure the program didn't add bytes into the header section of the .bmp... but that was a pretty cheap solution.
[QUOTE=Hypershadsy;31553235]I remember reading that Freshman year. Hoooly shit that sounds like so much fun (to be either person).[/QUOTE]
I read it the other day when I stumbled upon it on Wikipedia :P
[QUOTE=chaz13;31553258]Hm, I haven't but that sounds pretty cool. I might do a mix of all the idea, a survival style game which happens to have dinosaurs which you can hunt and trap with makeshift traps.
My main issue at the mo is all the foilage is basically un-usable, if that makes sense. As in, collisions or any operation on an individual plant will be really slow due to how it works, so things like chopping trees down for wood won't work as of current. Hmm.[/QUOTE]
I really recommend reading the story, it'll give you a feel of how much fun it'd be as a game. :)
0000000000e02040
[editline]5th August 2011[/editline]
Do that :D
that's not a number i can use dangit
[QUOTE=Dryvnt;31555887]Give me more numbers to convert :v:[/QUOTE]
Nice :v:
314159265
(pi without the decimal place)
Hmm, I must be doing it wrong
[QUOTE=Chrispy_645;31556135]Nice :v:
314159265
(pi without the decimal place)[/QUOTE]
[img]http://dl.dropbox.com/u/2670708/Programming/C%2B%2B/Double%20to%20image/Double%20to%20image/314159265.png[/img]
Whoah, turns out C# is a lot, lot faster than I imagined. It can sort through and perform some calculations with [i]all[/i] of the foilage within 800 pixels around the camera with no performance drops whatsoever, it looks like a survival game will be on its way!
[QUOTE=Map in a box;31556137]Hmm, I must be doing it wrong[/QUOTE]
If you want, I could use the character codes from your letters instead of actual numbers.
[editline]6th August 2011[/editline]
For example:
Hi Facepunch. I am using character codes.
[img]http://dl.dropbox.com/u/2670708/Programming/C%2B%2B/Double%20to%20image/Double%20to%20image/Hi%20Facepunch.%20I%20am%20using%20character%20codes..png[/img]
@ à�
[editline]5th August 2011[/editline]
If its possible
[QUOTE=Map in a box;31556272]@ à�[/QUOTE]
[img]http://dl.dropbox.com/u/2670708/Programming/C%2B%2B/Double%20to%20image/Release/ldjsi.png[/img]
[editline]6th August 2011[/editline]
I think I'll stop now. This is spamming the thread too much.
[QUOTE=Dryvnt;31556201][img]http://dl.dropbox.com/u/2670708/Programming/C%2B%2B/Double%20to%20image/Double%20to%20image/314159265.png[/img][/QUOTE]
seein' a face here
[QUOTE=Dryvnt;31556303][img]http://dl.dropbox.com/u/2670708/Programming/C%2B%2B/Double%20to%20image/Release/ldjsi.png[/img]
[editline]6th August 2011[/editline]
I think I'll stop now. This is spamming the thread too much.[/QUOTE]
My attempts to convert the hacker emblemto 64bit integer failed.
Anyway.. I spent 30 minutes trying to make a texture loader for OpenGL.
:saddowns:
[QUOTE=Chrispy_645;31556010]I'm kinda learning a bit of C++.NET at the moment, and I decided I wanted to make some random program that fucks with bitmap files.
Before:
[img]http://dl.dropbox.com/u/12453703/data.png[/img]
After:
[img]http://dl.dropbox.com/u/12453703/data_new.png[/img]
[code]// CLRConsole02.cpp : main project file.
#include "stdafx.h"
using namespace System;
using namespace System::IO;
int main(array<System::String ^> ^args)
{
FileStream^ fs = gcnew FileStream("data.bmp",FileMode::Open);
FileStream^ fs_newfile = gcnew FileStream("data_new.bmp",FileMode::Create);
BinaryWriter ^bw = gcnew BinaryWriter(fs_newfile);
const int arrayLength = fs->Length;
BinaryReader^ br = gcnew BinaryReader(fs);
// create a byte array to hold data.bmp (let's call it "buffer array")
array<Byte>^dataArray = gcnew array<Byte>(arrayLength);
// copy data into byte array
br->Read(dataArray,0,arrayLength);
// let's create an array of random bytes (let's call it "random byte array")
Random^ randObj = gcnew Random();
array<Byte>^randBytes = gcnew array<Byte>(200);
randObj->NextBytes(randBytes);
// get a random position from "buffer array", and give it a random byte from
// "random byte array"
for(int i = 0; i < arrayLength; i++)
{
dataArray[ randObj->Next(200,arrayLength) ] = randBytes[ randObj->Next(0,1) ];
}
bw->Write(dataArray);
br->Close();
fs->Close();
fs_newfile->Close();
return 0;
}[/code]
Source: [url]http://dl.dropbox.com/u/12453703/BitmapEffer.zip[/url]
I'm very well aware this code could probably be way more simplified / more efficient, so any code simplification is appreciated. I also tried to make sure the program didn't add bytes into the header section of the .bmp... but that was a pretty cheap solution.[/QUOTE]
The interesting thing to write now is something that takes an image ran trough this program and attempts to recover the original.
[QUOTE=grlira;31556795]The interesting thing to write now is something that takes an image ran trough this program and attempts to recover the original.[/QUOTE]
Possible and simple by knowing the exact time the "random byte array" was created.
Each time I try to register a texture with opengl it returns 0.
:((
[QUOTE=Map in a box;31556922]Each time I try to register a texture with opengl it returns 0.
:(([/QUOTE]
How are you trying to create the textures?
[QUOTE=Chrispy_645;31556010]I'm kinda learning a bit of C++.NET at the moment, and I decided I wanted to make some random program that fucks with bitmap files.
[code]-code-[/code]
Source: [url]http://dl.dropbox.com/u/12453703/BitmapEffer.zip[/url]
I'm very well aware this code could probably be way more simplified / more efficient, so any code simplification is appreciated. I also tried to make sure the program didn't add bytes into the header section of the .bmp... but that was a pretty cheap solution.[/QUOTE]
Do not use C++.net. Either use C++ or C#. C++.net should only ever be used to wrap unmanaged code.
C++.Net is technically no more. It's C++/CLI
[editline]6th August 2011[/editline]
[QUOTE=high;31557095]Do not use C++.net. Either use C++ or C#. C++.net should only ever be used to wrap unmanaged code.[/QUOTE]
It's sort of like Obj-C++. Not suitable for anything but interfacing.
[editline]6th August 2011[/editline]
in before someone arrives and says they always program in Obj-C++
[QUOTE=robmaister12;31557082]How are you trying to create the textures?[/QUOTE]
[code]
glTexParameteri(GL11.GL_TEXTURE_2D,GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST);
glTexParameteri(GL11.GL_TEXTURE_2D,GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST);
glTexImage2D(GL11.GL_TEXTURE_2D,0,GL11.GL_RGBA,img.getWidth(),img.getHeight(),0,GL11.GL_RGBA,GL11.GL_UNSIGNED_BYTE,rgba);
glPixelStorei(GL11.GL_UNPACK_ALIGNMENT, 4);
[/code]
I think its very invalid.
rgba contains the RGBA of each pixel, in bytes.
[QUOTE=Dryvnt;31556303][img]http://dl.dropbox.com/u/2670708/Programming/C%2B%2B/Double%20to%20image/Release/ldjsi.png[/img]
[editline]6th August 2011[/editline]
I think I'll stop now. This is spamming the thread too much.[/QUOTE]
Do it in reverse. Then we can have random picture -> 64 bit numbers and back again
a type of model for gmod
[IMG]http://i816.photobucket.com/albums/zz89/eirexe/mikumbinev2.jpg[/IMG]
[highlight](User was banned for this post ("This isn't programming." - Overv))[/highlight]
[QUOTE=eirexe;31557362]a type of model for gmod
[IMG]http://i816.photobucket.com/albums/zz89/eirexe/mikumbinev2.jpg[/IMG][/QUOTE]This is the [i]Programming[/i] section
[QUOTE=Map in a box;31557168][code]
glTexParameteri(GL11.GL_TEXTURE_2D,GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST);
glTexParameteri(GL11.GL_TEXTURE_2D,GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST);
glTexImage2D(GL11.GL_TEXTURE_2D,0,GL11.GL_RGBA,img.getWidth(),img.getHeight(),0,GL11.GL_RGBA,GL11.GL_UNSIGNED_BYTE,rgba);
glPixelStorei(GL11.GL_UNPACK_ALIGNMENT, 4);
[/code]
I think its very invalid.
rgba contains the RGBA of each pixel, in bytes.[/QUOTE]
make sure that you generate and bind a texture before you call that - glGenTextures(1, &myTexture); glBindTexture(GL_TEXTURE_2D, myTexture); and make sure to unbind afterwards - glBindTexture(GL_TEXTURE_2D, 0);
Sorry, you need to Log In to post a reply to this thread.