• What Are You Working On? V13
    5,003 replies, posted
[QUOTE=Overv;25535625]I made the offset a lot smaller now and independent of zfar value, but it still exists. What makes it even more interesting is that the issue is nonexistent on Linux.[/QUOTE] Weird, kinda reminds me of z-fighting issues I had with translucent surfaces. I fixed that with a Z-Bias.
[img]http://gyazo.com/cd3c88e675d8e5163c8a257fcdf2d5dc.png[/img] [url=http://foxprods.net/experimentalists/IdleFortress.rar]Download link[/url] Excerpt from the instructions.txt file: [release] List of commands: -Idle:Find a random item -Craft:Enter the crafting dialogue -Recipes:List the recipes Recipes work like this: newRecipe result items+that+you+need So for example, to make a Vintage Merryweather: newRecipe Vintage_Merryweather Refined+Refined+Refined NOTE: CAPS MATTER! Also, spaces should be replaced with '_'. Items: To make an item, do: newItem itemName chance tier So: newItem Jarate 60 weapon Tier does nothing as of yet, but you DO need it. Chance is the chance that it will be in the random inclusion table for each find. It's complex. [/release]
[QUOTE=VeryNiceGuy;25541024]I don't want to make it look better than it actually is. :P Anyone wanna monkey with it and see if they can break it?[/QUOTE] Release a beta. I like breaking things. :v:
Is anyone interested in a YouTube video of my game that I have posted here previously.
[QUOTE=i300;25541779]First Minecraft clones, now TextCraft clones!?!?[/QUOTE] [cpp]ADD_SIMPLE_ITEM(Stone, "stone"); ADD_SIMPLE_ITEM(Branch, "branch"); ADD_SIMPLE_ITEM(Spear, "spear"); ADD_SIMPLE_ITEM(Hammer, "hammer"); #if 0 ITEM_COMBINATION_BEGIN(Spear) COMBINATION_SOURCE("stone") COMBINATION_SOURCE("branch") ITEM_COMBINATION_RESULT(Spear, "spear") ITEM_COMBINATION_BEGIN(Hammer) COMBINATION_SOURCE("stone") COMBINATION_SOURCE("branch") ITEM_COMBINATION_RESULT(Hammer, "hammer") #endif #include <iostream> int main() { Item::registerSubclass("stone", &Stone::create); Item::registerSubclass("branch", &Branch::create); Item::registerSubclass("spear", &Spear::create); Item::registerSubclass("hammer", &Hammer::create); const Item::Combiner stonebranch = Item::Combiner().add("stone").add("branch"); Item::addCombination(stonebranch, "spear"); Item::addCombination(stonebranch, "hammer"); for(Item::Combiner::ResultsRange iter = Item::Combiner().add("stone").add("branch").results(); iter.first != iter.second; ++iter.first) std::cout << iter.first->second << std::endl; }[/cpp] [code]spear hammer[/code] :smug: Also, damn static initialization order fiasco! I can't use my fancy macros to add stuff to the static factory and the combination map :( ADD_SIMPLE_ITEM creates a simple Item-class with the given name. I also have a ScriptedItem-class, but it is still in the works, though the item-factory can already create scripted items: [cpp]std::auto_ptr<Item> ItemFactory::createInstance(const std::string &name) { std::auto_ptr<Item> instance; const CtorMap::const_iterator ctor(getConstructor(name)); if(!isValidEntry(ctor)) { const ScriptedItem::ScriptItemMap::iterator entry(ScriptedItem::getScriptItemEntry(name)); if(ScriptedItem::isValidEntry(entry)) { instance = ScriptedItem::createFromScriptItemEntry(entry); } //should we simplify this and throw from ScriptedItems create-function instead of having this isValidEntry-stuff here? throw std::runtime_error(name + " is not a valid Item."); } else { instance = std::auto_ptr<Item>(ctor->second()); } return instance; }[/cpp]
[QUOTE=Jallen;25535335]That just adds to the authenticity of it and its 1998 look. "den" Don't mix swedish with english in an app D:[/QUOTE] It writes in the language of your windows. Maybe you're right though, i should probably make it all english.
[QUOTE=DevBug;25539515]Since Esa was creating an argument parser... [img_thumb]http://localhostr.com/files/c6195a/YAAP.png[/img_thumb] [url=https://gist.github.com/fe6f98928c69fb1ef703]yaap.h[/url] [url=https://gist.github.com/c007d7895e7dbe4c188a]yaap.c[/url][/QUOTE] Elegant. However, my code was meant to be a quick and dirty solution to argument parsing in just one project, whereas yours would probably work pretty much anywhere. I've been meaning to refactor the code anyway, so in the end it might end up looking more like that. You also made me realize of a few things that are useless in my code. (Also LPYAAPARGUMENT? I've never understood those typedefs. YAAPARGUMENT* is actually [B]shorter[/B] than that and it's clearer that it's a pointer type, so why do such a thing?)
So I think I've got a pretty good idea of how I'm going to be implementing interrupts. I'll be reserving certain parts of the memory for interrupts and interrupt enables. Here's some simple example code showing how you might setup a MouseDown interrupt [code] MOVW #MouseISR,MouseDownInterrupt ; Specify the interrupt handler BSET MouseInterruptEnables,#$01 ; Enable the mouse down interrupt MouseISR: ;Grab x and y coordinates from reserved memory. LDA MouseX LDB MouseY ;The supressed buttons will probably be represented by ;an 8-bit bitfield, each bit corresponding to that button's ;state. ;I should note that the x/y coordinates will be 8-bits each ;since our supported resolution is only 160x240. RTI END [/code] I don't have those addresses hashed out yet but I'm thinking it may make sense to make this reserved portion of memory below the stack pointer, so the stack would actually sit on top of that. This would ensure that the stack won't write into them.
[QUOTE=bladerunner627;25547047]This would ensure that the stack won't write into them.[/QUOTE] What about stack underflow? Is that not a possibility?
[QUOTE=esalaka;25547127]What about stack underflow? Is that not a possibility?[/QUOTE] Underflow happens if you try to pop off values from a stack that is empty, causing it to pop off whatever is below the stack. In our case it would pop off values from the memory reserved for interrupts. This would be user error as you shouldn't be popping stuff off the stack if it's empty. Stack overflow is a little less obvious to circumvent given the tight memory confines.
[QUOTE=bladerunner627;25547230]Underflow happens if you try to pop off values from a stack that is empty, causing it to pop off whatever is below the stack. In our case it would pop off values from the memory reserved for interrupts. This would be user error as you shouldn't be popping stuff off the stack if it's empty.[/QUOTE] And stack overflow wouldn't be an user error?
Okay, I need a notepad program with actual bookmarks. Notepad++ lets you set them but from what I can tell you can't go to them :\. Need one that allows you to set them like, Alt+Shift+1 sets it and then Alt+1 goes to it. Can do it with all the numbers. Or one that allows you to view all bookmarks set and displays the line it is set on. Like how VS does it.
You quoted me before I finished editing my post. Say if the user's program was 63.9Kb (we'll just pretend the backbuffer and interrupts don't exist) you've only got 100bytes left for your stack. Every instruction he writes leaves him less room for the stack. Anyways, the design isn't set in stone but as there are always trade-offs.
[QUOTE=BlkDucky;25545188]Release a beta. I like breaking things. :v:[/QUOTE] Alrighty, [url="http://filesmelt.com/dl/Groove3.zip"]here you guys go.[/url] Let me know if you manage to make it squeak. :v:
[QUOTE=Vbits;25545215]Is anyone interested in a YouTube video of my game that I have posted here previously.[/QUOTE] Yep go for it.
[QUOTE=VeryNiceGuy;25549396]Alrighty, [url="http://filesmelt.com/dl/Groove3.zip"]here you guys go.[/url] Let me know if you manage to make it squeak. :v:[/QUOTE] I managed to make it crash within 30 seconds from finishing the download. I made a new tab, clicked the tab close button, pressed that I want to save before losing changes and didn't pick a file where to save. Oh! It crashes when I click cancel on normal save dialog as well.
Yeah I know about the saving problem. I'll work on that when my brain comes back together.
[QUOTE=VeryNiceGuy;25549396]Alrighty, [URL="http://filesmelt.com/dl/Groove3.zip"]here you guys go.[/URL] Let me know if you manage to make it squeak. :v:[/QUOTE] Well, I was half-way through writing stuff I noticed when this happened: [IMG]http://gyazo.com/1d2d1feb0e628bd566318bf0db5dcf02.png[/IMG] ...Yeah. I just went to make sure I wasn't mistaken about the "save as" thing, clicked save and... Yeah. It squeaked, anyway. Edit: Oh, you know? Well there's some stuff I noticed, anyway.
Alright, thanks. I'll add this stuff in your picture to my to-do list. :) Anyways, how do you guys like it?
[QUOTE=VeryNiceGuy;25549904]Alright, thanks. I'll add this stuff in your picture to my to-do list. :) Anyways, how do you guys like it?[/QUOTE] Pretty awesome. Uh, ignoring the whole crash thing. :v: Are those icons from the famfamfam.com silk icon set, by the way? Edit: Forgot to mention tab-rearrangment. I don't think you can change the order of the tabs, atm. Edit2: And another thing. If you close without saving the only options are to save or not to. There's no cancel.
1. Yes, they are! :) 2. I don't think re-arranging the tabs is a necessity at the moment. 3. I'll add this ASAP. Thanks for the feedback, too!
Needs syntax highlighting!
It's not meant as a code editor, at the moment, though. Just a Text Editor better than Notepad. Maybe people will use it instead of Notepad in youtube movies when they try to show off Runescape cheats! :v:
For the save dialog crashing when you click cancel, it's because you expect that dialog.File or what ever the variable that holds the path is not null. When you press cancel, the program will continue, it's just that the path of the selected file will remain null. What I do: [cpp] SaveFileDialog dialog = new SaveFileDialog(); dialog.Filter = "file type filter*"; dialog.AddExtension = true; dialog.ShowDialog(); if ( dialog.FileName == "" ) return; currentFilePath = dialog.FileName; saveToFile( dialog.FileName );[/cpp]
For christ's sake, I was getting desperate over my ProtoBullet game, I was getting 20-30FPS with 250 bullets. But then I found out I was using a Debug build, so I compiled and ran the Release build: [img]http://img51.imageshack.us/img51/6246/protobullet.jpg[/img] :sigh:
[QUOTE=Darwin226;25550851]For the save dialog crashing when you click cancel, it's because you expect that dialog.File or what ever the variable that holds the path is not null. When you press cancel, the program will continue, it's just that the path of the selected file will remain null. What I do: [cpp] SaveFileDialog dialog = new SaveFileDialog(); dialog.Filter = "file type filter*"; dialog.AddExtension = true; dialog.ShowDialog(); if ( dialog.FileName == "" ) return; currentFilePath = dialog.FileName; saveToFile( dialog.FileName );[/cpp][/QUOTE] Awesome, thanks!
[QUOTE=Shammah;25550884]For christ's sake, I was getting desperate over my ProtoBullet game, I was getting 20-30FPS with 250 bullets. But then I found out I was using a Debug build, so I compiled and ran the Release build: [img_thumb]http://img51.imageshack.us/img51/6246/protobullet.jpg[/img_thumb] :sigh:[/QUOTE] That's doesn't seem right. I mean, I know release build is supposed to be faster but that's WAAAY too much. Have you profiled the code to see where the bottleneck is?
I'll try to ask in here too, how do i resize things in wxwidgets? Nothing happens when i drag/change values..
[QUOTE=Darwin226;25550946]That's doesn't seem right. I mean, I know release build is supposed to be faster but that's WAAAY too much. Have you profiled the code to see where the bottleneck is?[/QUOTE] Nope that's pretty typical.
[QUOTE=Giraffen93;25550954]I'll try to ask in here too, how do i resize things in wxwidgets? Nothing happens when i drag/change values..[/QUOTE] wxWidgets uses so-called sizers: [url]http://neume.sourceforge.net/sizerdemo/[/url]
Sorry, you need to Log In to post a reply to this thread.