• What Are You Working On? V13
    5,003 replies, posted
[QUOTE=arienh4;25704821]Of course, but CRTs will always display differently than LCDs. I can't even work on a CRT any more without getting a headache.[/QUOTE] It's because CRTs 'flicker'. Ever taken a photo of one? The bright bar moving on the screen is where the screen is being updated.
[QUOTE=PatGlynn;25704939]Yea, the main issue we're having with that sort of system is delete/undelete. Like say you moved a object (stored to undo), deleted the object (stored to undo). Then undid the delete. unless you kept the deleted instance in memory all the commands below it would be invalid. Thats one approach to look at though, keeping things alive until there out of undo stack completely, or having some sort of serialization. But at least to specialize some things using a system like this would be nice on memory[/QUOTE] By invalid do you mean the command might take a pointer to the object that is now no longer valid, as the undo() on the delete command, has recreated the object so it's now somewhere else in memory? A better way might be to refer to objects using some sort of ID system which translates from a string or a number to a pointer, so that when you delete() an object, you can actually delete it from memory. And the undo of delete would recreate the object, but force its ID to be the same as the old one. Using a system like this also makes it bitchin' easier to serialise data for saving/loading/sending across network. But you'd have to make sure you don't accidentally create an object with the same ID/GUID as the old deleted object. [b]Edit[/b] Oh my bad, I see why you put the move() in before delete now. In the delete command you'd have to store all the objects changed properties (position, orientaiton etc) somehow I guess. That way when you undelete you can set the properties back to the correct values.
[csharp]public class TwinkleTwinkle : Choon { public TwinkleTwinkle() { myStandardBPM = 120; } private Synthesizer myPiano; private uint myOctave; private double myTime; protected override void Compose() { Sample pianoSample = Sample.Load( "BassDrums.bassdrum3", this ); myOctave = GetOctave( pianoSample.DetectAveragePitch()); myPiano = new Synthesizer( this, pianoSample ); myTime = 0; FirstVerse(); SecondVerse(); SecondVerse(); FirstVerse(); myPiano.Synthesize(); myPiano.Effects += new LowPassFilter( this ){ Frequency = pianoSample.DetectAveragePitch() * 2 }; Channels[ 0 ].Write( myPiano, 0 ); } private void FirstVerse() { RepeatNote( Note.C ); RepeatNote( Note.G ); RepeatNote( Note.A ); SingleNote( Note.G ); RepeatNote( Note.F ); RepeatNote( Note.E ); RepeatNote( Note.D ); SingleNote( Note.C ); } private void SecondVerse() { RepeatNote( Note.G ); RepeatNote( Note.F ); RepeatNote( Note.E ); SingleNote( Note.D ); } private void RepeatNote( Note note ) { myPiano.Notes.AddNote( note, myOctave, myTime ++, 1 ); myPiano.Notes.AddNote( note, myOctave, myTime ++, 1 ); } private void SingleNote( Note note ) { myPiano.Notes.AddNote( note, myOctave, myTime ++, 2 ); myTime ++; } }[/csharp] Twinkle Twinkle Little Star using a Bass drum :smug: It automatically detects the pitch of the sample and scales it based on that.
[QUOTE=garry;25704505]How would you implement an undo system? Would you save the state of the document/map/model every undo, and revert to it.. or would you do some kind of unique undo function for each action?[/QUOTE] Personally, I would try to store a diff of the document states (assuming you are using text), and rather than have it be a list of undos, have it be a tree. i.e. [code] Action 1 | +-- Action 2 | `-- Action 3 +-- Action 4 | +-- Action 5 | +-- Action 6 | `-- Action 7 `-- Action 8 [/code] Do Action 1 Do Action 2 Do Action 3, Undo Action 3 and Action 2 Perform A new action (Action 4), rinse repeat. All the while storing diff's in a memory file, while also memoizing (no that is not a misspelling~) said diff's in the event of data corruption, etc. [QUOTE=Robert64;25705520] Twinkle Twinkle Little Star using a Bass drum :smug: It automatically detects the pitch of the sample and scales it based on that.[/QUOTE] If you give people a way to make sheet music, I'm pretty sure you'll soon be rivaling [url=http://chuck.cs.princeton.edu/]ChucK[/url]
Point 'n' Click. Just getting basic player movement working for the moment (I LOVE HORROR PUZZLE GAMES ^_^) [editline]28th October 2010[/editline] Also, while I'm here. Can anyone explain quickly how Texture2D.FromStream() works? [editline]28th October 2010[/editline] Also, while I'm here. Can anyone explain quickly how Texture2D.FromStream() works?
I've decided that I'm going to write my multiplayer hacking game in C#, for experience with that. What libraries are there for fileio, scripting languages, and rendering?
[b]Rendering[/b] Slim DX XNA SFML.net I wouldn't recommend XNA to be honest. [b]File IO[/b] [code] using System.IO; [/code] I've found that is pretty good for IO and whatever.
Alright, I've used SFML c++ before so I'll go with SFML.net Nevermind, got docs to work. [editline]28th October 2010[/editline] [code] class Value { Value() { } Value(int val) { ival = val; } Value(string val) { sval = val; } Value(bool val) { bval = val; } void SetValue(int i) { ival = i; } void SetValue(string s) { sval = s; } void SetValue(bool b) { bval = b; } int Geti() { return ival; } bool Getb() { return bval; } string Gets() { return sval; } int ival; bool bval; string sval; } [/code] amidoingitrite? I sure hope C# has function overloading
I got some stuff working Character Selection - Three characters are drawn on screen and you can pick who to play as at any one time Dodgy Ass Movement - I'm using Vector2.Lerp as a quick alternate Render Depth - Who ever is selected renders on top. TODO - Sort out movement Also, let me rephrase something I posted last post. Now I think of your project I WOULD recommend XNA, it's simple and quick. Not the most efficient, but it's efficient enough for small games.
[QUOTE=Loli;25709981]I got some stuff working Character Selection - Three characters are drawn on screen and you can pick who to play as at any one time Dodgy Ass Movement - I'm using Vector2.Lerp as a quick alternate Render Depth - Who ever is selected renders on top. TODO - Sort out movement Also, let me rephrase something I posted last post. Now I think of your project I WOULD recommend XNA, it's simple and quick. Not the most efficient, but it's efficient enough for small games.[/QUOTE] I don't need XNA, I am making a game that is supposed to simulate an old style computer, so I'm just gonna use sfml.net or System.Drawing to draw some old stye stuff
Oh cool. I don't see enough hacking games so it should be interesting atleast. When you say IO, do you just mean reading/writing?
You mentioning hacking games reminds me of hackwars. It had an in game scripting language which I found an exploit in to give me money out of thin air. I recorded it too :v: got the video on my computer.
[QUOTE=Loli;25710141]Oh cool. I don't see enough hacking games so it should be interesting atleast. When you say IO, do you just mean reading/writing?[/QUOTE] That, and listing files in directory's, file management, etc. Also, I heard somewhere you can use C# as a scripting language with some JIT thing or something.
[QUOTE=esalaka;25705007]It's because CRTs 'flicker'. Ever taken a photo of one? The bright bar moving on the screen is where the screen is being updated.[/QUOTE] I know that, but that information doesn't help me combat the problem...
[QUOTE=Jallen;25710178]You mentioning hacking games reminds me of hackwars. It had an in game scripting language which I found an exploit in to give me money out of thin air. I recorded it too :v: got the video on my computer.[/QUOTE] I used to play that game, awhile ago. I found it was stupid that you had to do something to compile programs, so I quit.
This isn't in a release yet since it's not very polished and it's a little glitchy, but I'm working on making the single player mode, which is currently the most playable game mode in Zombie Outrage 2, networked. [media]http://i52.tinypic.com/2yuhw80.jpg[/media] Master Server and the Game As you can see, with the High Score table, it fills up the empty spot of the bottom of the main menu, making it more interesting to watch. The high score list goes up to 10 people, they scroll up. When the 10 scores reach the top, the list repeats and scrolls back from the bottom. [media]http://i56.tinypic.com/2u4hufp.jpg[/media] When you first start the game you're prompt to type in a user name. This is the name that will be posted to the high scores. So what do you think? Any ideas on improvement or things that sound fun?
c-c-c-c-coder design
OOP design question... Say I have a FooManager object that holds a list of Foo objects. Should I use it like this? [code] var foo = fooManager.GetFoo("blah"); if(foo == null) return; foo.SomethingFooDoes(42); [/code] Or like this? [code] fooManager.DoSomethingWithFoo("blah", 42); //returns void [/code] Assuming that it doesn't matter if the Foo named "blah" exists. The latter looks more efficient but something about it looks wrong.
The latter.
The first is better due for less typing and ability to check if it exists. And you're tying the ENTIRE codebase to the fooManager.
definitely the first
I was reading [url=http://duramecho.com/ComputerInformation/WhyHowCppConst.html]an article about the const keyword in C++[/url] when I came across this: [img]http://gyazo.com/16e1b7e60ff3e8d0fe14cb27934f08ee.png[/img] I know what it means, but what the hell went on in the author's mind when he wrote that? :confused:
I'm guessing english isn't his first language, that's a grammatical nightmare and I can't even understand it.
Hey xAustechx, would you like me to design a main menu for you?
I'm just wondering why he expects people to understand stuff like [quote]This is messy because it is essentially making an in-only variable passing method from a both-ways variable passing method which was itself made from an in-only variable passing method just to trick the compiler into doing some optimization.[/quote] [quote]where the 5 uses ‘const’ respectively mean that the variable pointed to by the returned pointer & the returned pointer itself won’t be alterable and that the method does not alter the variable pointed to by the given pointer, the given pointer itself & the object of which it is a method!.[/quote]
Look overv i really do dont understand your read problem with those out examples if everyone once else has a problem please let me informed
I am working on a roguelike. Currently I have: Dungeon Generation [img]http://localhostr.com/files/473356/capture.png[/img] Field Of View [img]http://localhostr.com/files/8d5201/capture.png[/img] Combat [img]http://localhostr.com/files/f4ab09/capture.png[/img] Character Creation [img]http://localhostr.com/files/dcf2c7/capture.png[/img] And some half-done inventory code. What does FP think?
[QUOTE=Overv;25721778]I'm just wondering why he expects people to understand stuff like[/QUOTE] It is kinda hard to read, but I understand it. While I don't know what the optimization is, the first one explains having three methods calling each other, where two methods take a const reference or pass by copy (in-only variable as it's called there) and one takes a non-const reference (both-ways variable). The second one refers to a member-method like this: [cpp]const int *const foo(const int *const var) const;[/cpp]
[QUOTE=flyboy95;25722186]And some half-done inventory code. What does FP think?[/QUOTE] Looking great, nice to see a rouglike with some graphics up in this bitch
[QUOTE=flyboy95;25722186]I am working on a roguelike. Currently I have: Dungeon Generation <img snip> Field Of View <img snip> Combat <img snip> Character Creation <img snip> And some half-done inventory code. What does FP think?[/QUOTE] Not saying that I represent the views for the majestic FP, but I personally think it's looking pretty good
Sorry, you need to Log In to post a reply to this thread.