1,150 Forum Posts by "polym"
I typed in the alphabet with an exclamation mark. It claimed the password is safe. Yeah, no.
Unfortunately I live in Florida and as a result I get the native palmetto bugs. They are nasty ass cockroaches, and not only do they look disgusting, but they grow to a signifigant size and they fly. Plus they multiply and cause allergies. Personally I have trouble killing them (hard to kill + fear) and so whenever I see one, I fucking freak out until it goes away.
Am I a pussy?
At 8/5/12 02:22 AM, andycastaneda wrote: Deal with it.
Luke 16:23,24:16:20:10
Plead Mercy from Jerry Seinfeld!
You're really late. But you know, this IS newgrounds.
I'm surprised it took you ten posts to finally post the source code. It looks like you're trying to keep the function to load all the models in one place, and then to have the derived objects specify what models they are trying to load. Obviously you have a serious design flaw.
You need to separate the loading logic because in reality, each object and its resources would load independent of each other. For example, you might have the stars and then all the planets and stuff. Trying to load them in one instantiation of the object doesn't make sense. Rather than doing,
SolarSystem.load();
...
Planet.addToLoad("shit")
You would do,
SolarSystem.create();
SolarSystem.addPlanet(Planet());
Planet.load();
You still haven't told us what you wanted to do. I think your experience with Java has diluted your learning of C++.
Obviously a base class cannot call a derived class function because it hasn't been defined yet. If you for example have a triangle that derives from a base class shape, it makes no sense for the shape to have any information about a triangle.
At 7/7/12 12:28 AM, TheKlown wrote:At 7/7/12 12:25 AM, DarkShadowblade wrote: There's definitely more to this case than we see.A pedo judge who thinks porn is to blame even tho most people who view porn aren't running out raping little 5 year olds or any minors.
It's completely illogical for this teenager after being found guilty of raping a 5 year old of NOT being given any punishment whatsoever.
Pretty damn sure you're missing the point. A 15 year old raping a 5 year old, and not someone his own age, has some serious psychological problems.
If you give the game designer 'choice', you're allowing them to exploit the user. For example, a game may be good, but it may have terrible controls, and they can get away with it 'because'. It's their choice, right? That doesn't excuse bad game design...but then again, a game making bucks has good game design as the least of its worries.
At 5/15/12 08:46 PM, PsycoMunkey wrote: Hmm....
So is this just creating a variable....in a .XML? If so, I still wouldn't know how to set it up.
Please....somebody...
You just set the pokemon behind the trainer. If the trainer moves onto a certain tile, the pokemon will be on the tile before that trainer. The pokemon will be facing the direction the trainer last moved.
What do you mean there's no easy way to tell time? You're going to have to sync your clock somehow and that means getting the time from somewhere...and whatever source you get the time from..makes it redundant anyway.
At 4/21/12 08:57 PM, caseymacneil wrote: What is the equivalent to the enter frame event in actionscript for java? i've been searching around but i cant find any solutions, and i dont really want to use a simple while true statement cuz' that feels messy.
Flash has a timeline where the frames are called at a fixed rate (by default, 12). So you update whatever you need to at a fixed rate, but considering you're asking a question like this, I don't think what you're going to be doing is a clean method. What I suggest is you look into frameworks or libraries that will help you instead of trying to write a game from scratch....
At 4/17/12 10:05 AM, Boarlock wrote: Ok so I just started wanting to programs things and I have some good ideas. I know some stuff about like programming languages and that stuff but don't really know the basics. Can anyone give me a description if I want to start what do I have to do? Links would be good too if it might help me understand it. Another question will I have to learn like c++ and python to start programming games? Thanks try to make it vivid and understandable.
C++ and Python are good languages to make games. Ruby and Lua are too good scripting languages for games. But something like C# or Java are better because the programming style in Python differs from the other 3 too much (it tries to be a beginner's language, but there are too many gotchas and niche styles.) People would suggest using a library with C++ instead of writing it yourself, and even if you start with DirectX or OpenGL, use a framework or library. No need to start from scratch because you'll most likely give up. That's why a lot of people are using XNA.
At 4/14/12 01:05 AM, skstid2012 wrote: Dude, this is too sweet.
Screenshot.
Hey so some of you may know that brainfuck is a small language that's considered turing complete, and therefore capable of doing any calculation. So I decided as a small project to embed it into an XNA language as a 'scripting language'. First I needed to translate a minimal brainfuck interpreter in C to C#. Then I had to figure out how to do practical keyboard input, and I found a useful class that captures keyboard input using hooks and windows forms. After that, I piped the input to the interpreter, and then changed some of the commands so that they will do something game-wise, rather than text wise.
For example, +++++ will add 5 to the current cell. Well I've decided to load a list of game objects into memory where you can manipulate their properties via brainfuck. So far I have three commands, ROTATEX, ROTATEY, ROTATEZ to rotate the current object on its axes, the current object being whatever cell you're manipulating.
So it looks like:
+++++ Cell 0 sets to 5 for a counter
> Go to first game object loaded in memory
+++++ Rotate by 5 degrees (ROTATEX is the default command)
ROTATEY +++++ Rotate by 5 degrees on Y axis
Like I said, I'm doing this for fun and it could be very interesting.
Note I modified the interpreter quite a bit to get some custom commands and to make it a separate class and flow with the XNA game.
I have a buffer and an input buffer. Whenever the Keyboard class 'hooks' a key, I add it to the input buffer, and then whenever I press the enter key (entered a command) I add that to the buffer. That buffer is what is displayed on the screen. This way I can dynamically plug in and plug out different types of intepreters (brainfuck being the only one)
Now for code.
Game1.cs
kb = new KeyboardBuffer(Window.Handle);
kb.Enable();
bf = new BrainfuckInterpreter(theBox); // Currently only supports one object
....
bf.Parse(kb); // Yup, one liner. That's how awesome this is.
....
// To simulate a blinking cursor
if (blinkTimer < 0.5f)
{
blinkTimer += elapsed;
}
else
{
blinkTimer = 0;
if (blink == "|")
blink = " ";
else
blink = "|";
}
....
spriteBatch.Begin();
// Like a terminal, move the screen when you get past the edge...but no support to move back up yet
// I just have to add key input but I'm lazy
if (f1.MeasureString(bf.buffer + bf.input).Y > GraphicsDevice.Viewport.Height)
offset = f1.MeasureString(bf.buffer + bf.input).Y - GraphicsDevice.Viewport.Height;
spriteBatch.DrawString(f1, bf.buffer + bf.input + blink, -(Vector2.UnitY * offset), Color.White);
spriteBatch.End();
BrainfuckInterpreter.cs
// The keyboard class that I did not implement
// Is just as useful...all I have to do to get the buffered text is call that function
input += kb.GetText();
if (kb.BackSpaceKey)
{
if (input.Length > 0)
input = input.Remove(input.Length - 1);
}
if (kb.EnterKey)
{
// Add the input to the buffer so the user can see it on the screen
buffer += input + "\n";
// We want to read the new input
char_pointer = 0;
// This just sees if the user typed the name of a predefined program (example programs)
if (programs.ContainsKey(input))
{
input = programs[input];
}
chars = new char[input.Length];
chars = input.ToCharArray();
input = "";
// Because of the way I check the input..I have to set the first char to a space (which the interpreter does not read)
// I see if the char array is null before even reading it,
// and set it to null when we're done. This is so I don't have it confined to a loop
if (chars.Length == 0)
chars = new char[] { ' '};
}
if (chars != null)
{
// Read all the way up to the input length
if (char_pointer < chars.Length)
{
// Seeing if we called a command like ROTATEX
for (int i = 0; i < commands.Length; i++)
{
// If we hit a match...
if (commands[i][0] == chars[0])
{
// Make sure we got the right one
// For example ROTATEX and ROTATEY are similar..but the last chars are different
// So the loop has to continue searching if they are different
int l = 0;
bool quit = false;
while (l < commands[i].Length)
{
if (chars[char_pointer + l] != commands[i][l])
{
quit = true;
break;
}
l++;
}
if (quit)
continue;
else
{
currentCommand = i;
switch (commands[currentCommand])
{
// The cell only contains one piece of information at a time (ie position, rotation)
// So we swap it between the gameobject and the cell
// And only manipulate whatever current property is in the cell at the time
// We don't want to set the property to whatever data it was using beforehand
case "ROTATEX":
tape[rotationCell] = (int)gameObject.ModelRotation.X;
break;
case "ROTATEY":
tape[rotationCell] = (int)gameObject.ModelRotation.Y;
break;
case "ROTATEZ":
tape[rotationCell] = (int)gameObject.ModelRotation.Z;
break;
}
char_pointer += commands[i].Length - 1;
}
}
}
}
... // I would post the interpreter, but minimal googling will give you one yourself
// If we're done reading the input
// We set up the new prompt
if (char_pointer >= chars.Length)
{
chars = null;
buffer += "Current command: " + commands[currentCommand] + "\n";
buffer += ">> ";
}
Lol you're all so silly. There are sites that -do- steal, but most of the time those sites are sponsor sites.
At 3/31/12 07:37 AM, Assios wrote: Hey! I have a text box, and a code that is activated when you click a button:
<Input type=button id ="btn" value="stuff" onclick = run()>
But I want it to automatically do run() each time you edit the text box. Thanks in advance!
It's not onclick..it's onkeyup or onkeydown you're looking for.
PHP is not javascript.
You need to tie in javascript some way to change the page dynamically. In fact, you would probably just use javascript for that and not even PHP. However if you wanted to use PHP for the logic, then look into AJAX. Otherwise, stick to javascript.
http://www.php.net/manual/en/language.operators.bitwise.php
Judging from how there's only one instance of ^= on the entire page, it's implied.
I can't look at your code right now, but the first solution is obvious.
Whatever you set the form action to the page will be redirected to. You can set the form action to # or / or whatever the page you're on is to check the logic on that page (so it doesn't redirect.) I'm not sure if this is your intended action, but if you wanted it to not change pages and you wanted a different document do the logic, you'd have to use AJAX or something.
Now as for you wanting to not do the logic until after the form is processed, you have to check if it's already been posted. You simply do an if check like if isset($_POST['name_of_form']). This works because when the form is posted, the variable containing the name of the form is sent. This is basic so it can be explained better elsewhere on the web.
At 3/27/12 12:48 AM, NinoGrounds wrote:At 3/27/12 12:45 AM, NinoGrounds wrote: There you go (PHP):I got that from here, but I never heard of ^= operator being used in PHP. What the heck?
Interestingly enough PHP has a lot of similarities to C...probably because PHP underneath is C.
At 3/26/12 06:42 PM, NinoGrounds wrote: I'm talking authencation systems. What reference to hold in client's cookie, aka what is your method of choice?
Just that :)
I know people use hashing methods...but as a hobby, I read about XOR encryption. Of course, I wrote a program that did random ass bitwise operations to a string, and it ended up being chinese characters.
At 3/25/12 08:54 PM, gearsofwhore wrote: Thank god its not about beiber, and fuck your justin.tv bullshit explain to us exactly why we should waste our time caring about you.
From here on out, you are all known as: kiddies.
At 3/25/12 08:53 PM, tox wrote:At 3/25/12 08:51 PM, polym wrote:how ya figure that?At 3/25/12 08:50 PM, tox wrote: do i get free fries?You're an attention whoring douche.
Look at your posts, man.
At 3/25/12 08:50 PM, tox wrote: do i get free fries?
You're an attention whoring douche.
Shitty music, omegle chats, coding, movies, games, all you could ever possibly want from a deprived person.
Come all and watch me live on J-TV:
At 1 month ago, Drony wrote: Bumping this for those with nothing to do on Saturday.
http://www.mumuplayer.com/svdfsrg
http://www.mumuplayer.com/newgrounds
We need more girls.
At 1 hour ago, ScaryPicnic wrote: PEOPLE R IN
SO LONELY
Man how misleading...when people think operating system, they think Windows, or Mac OS, or Linux..but different distributions are in reality 'kernels'. For the most part, 'distros' have different settings such as the packages installed, modifications of system configs, etc. It's not an operating system in how someone not inclined may view it. Of course I can tell that the way you advertise it you intended this. I understand that you want to cater to artists who may find this useful, but it's incredibly misleading and ignorant.
Not enough girls pm me. I have a few who have talked to me.
More, now.

