[QUOTE=LuaStoned;34053740][hd]http://www.youtube.com/watch?v=r_W3ThAD-fQ[/hd]
The same concept as with the TF2 Const Crit thing.
What you basically do is loop through all available spread seeds (trace each one) and if one hits the right hitbox, use this seed.
€dit: Oh yeah, this is a recoded demo. All the movement is done by hand. (and you don't see any screen shake or whatever).[/QUOTE]
Can you explain what the "available seeds" are? I assumed that there was only one and it can't be changed by the client.
[editline]5th January 2012[/editline]
[QUOTE=dajoh;34055733]Last time I checked, VAC doesn't detect vtable hooks.[/QUOTE]
They do scan IBaseClientDLL::CreateMove IIRC so you need to use VMT hooks (or other alternatives) to hook them.
[QUOTE=icantread49;34057606]any of you guys ever done undo/redo functionality?
[...][/QUOTE]
devbug/turb/chris could you please explain how this is dumb?
[QUOTE=icantread49;34064327]devbug/turb/chris could you please explain how this is dumb?[/QUOTE]
Isn't it much more efficient in terms of both speed and memory to only store the changes made, like you were planning to previously? I would assume that is what they rated you for.
[editline]5th January 2012[/editline]
Unless the file sizes are really small in which case it is probably not worth the effort, and you'll be fine doing it with save files.
[QUOTE=icantread49;34064327]devbug/turb/chris could you please explain how this is dumb?[/QUOTE]
Couldn't you instead just use one Action class with a type enum and an array of objects as parameters to the constructor?
Type would describe what action it's representing and additional data about the action would be stored in the object array.
[QUOTE=Ziks;34064381]Isn't it much more efficient in terms of both speed and memory to only store the changes made, like you were planning to previously?[/quote]
sure it is. but then i end up with code like this:
[cpp]
class UndoDelete : public IUndo
{
private:
SHIFT_ARRAY<std::string> Tags;
SHIFT_ARRAY<SHIFT_ARRAY<uint8_t> > Arrs;
public:
void Include(GameObject* obj);
virtual void Go(GameWorld* world);
};
class RedoDelete : public IRedo, public GameObjectListener
{
private:
std::set<GameObject*> Objects;
public:
~RedoDelete();
void Include(GameObject* obj);
virtual void Go(GameWorld* world);
virtual void OnDestroy(GameObject* obj);
};
void UndoDelete::Include(GameObject* obj)
{
GameTaggable* tag = obj->Get<GameTaggable>();
GameModdable* mod = obj->Get<GameModdable>();
Tags.push_back(tag->Tag);
Arrs.push_back(SHIFT_ARRAY<uint8_t>());
mod->Save(Arrs[Arrs.size() - 1]);
}
void UndoDelete::Go(GameWorld* world)
{
RedoDelete* redo = new RedoDelete();
for (uint32_t i = 0; i < Tags.size(); ++i)
{
GameObject* obj = new GameObject(world);
world->Add(obj);
GameFactory::CreateFromTag(obj, Tags[i]);
GameModdable* mod = obj->Get<GameModdable>();
mod->Load(Arrs[i]);
redo->Include(obj);
}
UndoRedo* undoRedo = world->GetService<UndoRedo>();
undoRedo->PushRedo(redo);
}
RedoDelete::~RedoDelete()
{
for (std::set<GameObject*>::iterator i = Objects.begin(); i != Objects.end(); ++i)
{
GameObject* obj = *i;
obj->Listeners.erase(this);
}
Objects.clear();
}
void RedoDelete::Include(GameObject* obj)
{
Objects.insert(obj);
obj->Listeners.insert(this);
}
void RedoDelete::Go(GameWorld* world)
{
UndoDelete* undo = new UndoDelete();
for (std::set<GameObject*>::iterator i = Objects.begin(); i != Objects.end(); ++i)
{
GameObject* obj = *i;
undo->Include(obj);
obj->Listeners.erase(this);
world->Remove(obj);
}
UndoRedo* undoRedo = world->GetService<UndoRedo>();
undoRedo->PushUndo(undo);
Objects.clear();
}
void RedoDelete::OnDestroy(GameObject* obj)
{
Objects.erase(obj);
}
// later
UndoRedo* undoRedo = world->GetService<UndoRedo>();
undoRedo->PushUndo(new UndoDelete(...));
[/cpp]
instead of simply this:
[cpp]
// doesn't matter what action the user did here
UndoRedo* undoRedo = world->GetService<UndoRedo>();
undoRedo->Push();
[/cpp]
not to mention possible bugs regarding object creation/deletion outside of the undo/redo actions themselves
... now imagine this mess applying to every action the user could possibly perform
regardless of the speed and/or memory overhead of the save-files, the experience is seamless to the user ... and if it wasn't, it can be easily optimized by saving to in-memory "files"
[QUOTE=Overv;34058051]Stop being lazy and learn how to use a video converter. These programs were written to record raw video footage of your screen, not facilitate your video editing needs.[/QUOTE]
I thought it would be a cool project for somebody who cared. No need to call my lazy since I don't even make videos.
Useful webm stuff: [url]http://webmproject.org/code/#webm-repositories[/url]
Unsupported video conferencing application: [url]http://git.chromium.org/gitweb/?p=webm/udpsample.git;a=snapshot;h=c7f51638c1eb930906f4c6d220c7ee4936189b94;sf=tgz[/url] (cpp)
Has anyone been able to get Gwen working with SFML RenderTextures?
Hi guys, I could do with some advice:
I think I've got the 3D stuff figured out, but there needs to be some way for the user to switch between 2D and 3D "modes" - there is some stuff that can have different interpretations based on that context, e.g. 2D implicit relations will be prismatic surfaces in 3D - there's no way to tell which it should be based on what the user plots. Which means I'm going to have to add some stuff to the UI. Which I suck at.
So far, I've got these two ideas for a layout:
[img]http://i.imgur.com/H5EQ4.png[/img]
Either have the output box as a tab at the bottom, and put a checkbox on a different tab, or...
[img]http://i.imgur.com/qjDHY.png[/img]
...put two different canvases in tabs, let the user switch between them, and draw based on the currently selected tab (which I am slightly averse too, not just because of the way it looks but also because of a grapher made by a certain other forum member that behaved in the same way.)
I'm at a bit of a loss here. Which would you guys choose, if you were to use it? One's a little more streamlined, but it also adds extra clutter to the UI. The other looks a little neater (to me), but it also adds an extra step to switching. Or would you guys do it completely differently?
(Also, showing off the error system :v:)
[QUOTE=r0b0tsquid;34065235]Hi guys, I could do with some advice:
I think I've got the 3D stuff figured out, but there needs to be some way for the user to switch between 2D and 3D "modes" - there is some stuff that can have different interpretations based on that context, e.g. 2D implicit relations will be prismatic surfaces in 3D - there's no way to tell which it should be based on what the user plots. Which means I'm going to have to add some stuff to the UI. Which I suck at.
So far, I've got these two ideas for a layout:
[img]http://i.imgur.com/8QXI7.png[/img]
Either have the output box as a tab at the bottom, and put a checkbox on a different tab, or
[img]http://i.imgur.com/qjDHY.png[/img]
Put two different canvases in tabs, let the user switch between them, and draw based on the currently selected tab (which I am slightly averse too, not just because of the way it looks but also because of a grapher made by a certain other forum member that behaved in the same way.)
I'm at a bit of a loss here. Which would you guys choose, if you were to use it? One's a little more streamlined, but it also adds extra clutter to the UI. The other looks a little neater (to me), but it also adds an extra step to switching. Or would you guys do it completely differently?
(Also, showing off the error system :v:)[/QUOTE]
You could just put the checkbox in the blank space between the output and the input.
[QUOTE=icantread49;34064327]devbug/turb/chris could you please explain how this is dumb?[/QUOTE]
Using save files for undo is rather inefficient and won't scale well.
You're far better off having a stack of Actions that can be done and undone.
You could write a whole book on how to implement undo though, it's not a simple problem.
[QUOTE=swift and shift;34065294]Using save files for undo is rather inefficient and won't scale well.[/quote]
1) what is your definition of "inefficient" ?
- slow? it's seamless to the user, so it's clearly not slow
- takes up too much space? around 1000 complete undo's would take up 1-2 MB - a small enough footprint to keep entirely in RAM (if needed)
2) what is your definition of "scaling well"?
- to me, "scaling well" means that no matter what i allow the user to do, undo/redo functionality is available for that action with 1 line of code
- to me, if i had to implement an Action for every possible user modifcation, [b]THAT[/b] wouldn't "scale well"
turb, please elaborate more. sometimes you're friendly and constructive and other times your posts consist of "A is inefficient so B is better" with no justification whatsoever
This is my strategy with Undo.
First of all you make a [B]BaseRUndo [/B]class. It basically saves the entire project. You create it in any place you need an undo. You code it clever so it works as a redo too.
Obviously this is slow, so you make subclasses to speed it up.
So you'd make a [B]RUndo::Move[/B]- for when objects are moved. It takes the movement vectors. You implement an undo and redo function for both.
You'd make a [B]RUndo::Delete[/B] for when objects are deleted.
The idea behind this is that for now you'd have working undo within the hour - but it would be slow and less than ideal. But you can make it better progressively.
[QUOTE=garry;34065669]This is my strategy with Undo.
[...][/quote]
certainly a nice mix of state-based undo and action-based undo
[quote]
So you'd make a [B]RUndo::Move[/B]- for when objects are moved. It takes the movement vectors. You implement an undo and redo function for both.[/QUOTE]
let's say the user moves two objects, then deletes the first one. this would quickly turn into a big mess unless you either serialize/deserialize objects with a unique ID or you keep deleted objects in memory.
oh, and here's another benefit of my (and any) state-based undo: persistent undo. the user can continue working on a scene and undo/redo from wherever they left off, which would be particularly useful for mobile devices where the app could be terminated at any moment
So Gwen wasn't working in sf::View's properly so I decided to check what was going on.
Fixing the text drawing was easy, simply commented out the save and restore opengl state commands.
Checked out the textured boxes, and I see that garry(or someone) has written some opengl code to draw the rectangles (because it took UV coords for the texture) instead of using a SetSubRect command.
I attempted to code a replacement but that didn't really work, is there some kind of glViewport trickery or something I could use to put the texture in my view?
I don't really know that much about OpenGL.
Garry's code, for those who are wondering: [url]http://pastebin.com/T46rnBwe[/url]
Added a wordwrapped (well, per character for now) multiline textbox!
[vid]http://dl.dropbox.com/u/1179448/Misc%20Video/pong_textbox.webm[/vid]
[QUOTE=icantread49;34065658]1) what is your definition of "inefficient" ?
- slow? it's seamless to the user, so it's clearly not slow
- takes up too much space? around 1000 complete undo's would take up 1-2 MB - a small enough footprint to keep entirely in RAM (if needed)
2) what is your definition of "scaling well"?
- to me, "scaling well" means that no matter what i allow the user to do, undo/redo functionality is available for that action with 1 line of code
- to me, if i had to implement an Action for every possible user modifcation, [b]THAT[/b] wouldn't "scale well"
turb, please elaborate more. sometimes you're friendly and constructive and other times your posts consist of "A is inefficient so B is better" with no justification whatsoever[/QUOTE]
So what undo strategy you use really depends on what you're trying to do and how big your data is going to get.
Notepad's undo would be vastly different to Hammer or Blender's undo.
[editline]6th January 2012[/editline]
Also 'undo' doesn't have to be perfect. It's ok to have some actions that aren't undoable.
[QUOTE=swift and shift;34066489]So what undo strategy you use really depends on what you're trying to do and how big your data is going to get.
Notepad's undo would be vastly different to Hammer or Blender's undo.
[/quote]
yes, exactly. i don't even understand what you were on about before :v:
[quote]
Also 'undo' doesn't have to be perfect. It's ok to have some actions that aren't undoable.[/QUOTE]
that becomes really, really annoying. i hate when i'm doing something and i accidentally delete it, then i hit ctrl-y and everything appears to come back except for some tiny little piece that is not undo-able :suicide:
[QUOTE=FoohyAB;34066415]Added a wordwrapped (well, per character for now) multiline textbox!
[vid]http://dl.dropbox.com/u/1179448/Misc%20Video/pong_textbox.webm[/vid][/QUOTE]
It says "trrailing" at the end of the video.
[QUOTE=FoohyAB;34066415]Added a wordwrapped (well, per character for now) multiline textbox!
[vid]http://dl.dropbox.com/u/1179448/Misc%20Video/pong_textbox.webm[/vid][/QUOTE]
Hey, another cursor...
[img]http://www.stupidgifs.com/images/full/45.gif[/img]
[QUOTE=Maurice;34066811]It says "trrailing" at the end of the video.[/QUOTE]
fuck
[QUOTE=DrLuke;34067019]Hey, another cursor...
[img]http://www.stupidgifs.com/images/full/45.gif[/img][/QUOTE]
That disco looks like it only plays early 2000's music.
i maek gaem
[img]http://i.imgur.com/wVBdf.jpg[/img]
Interesting uh artstyle you got going there!
[editline]5th January 2012[/editline]
Where does everyone get all this format documentation? Reverse engineering? Preferably on Valves proprietary files.
[QUOTE=Nigey Nige;34067392]i maek gaem
[img]http://i.imgur.com/wVBdf.jpg[/img][/QUOTE]
Holy shit is your name Nigel?
Hey look it turns out the valve developer wiki contains everything I need![sub][sub](again)[/sub][/sub]
[editline]5th January 2012[/editline]
Nevermind :saddowns:
[QUOTE=Map in a box;34067445]Interesting uh artstyle you got going there!
[editline]5th January 2012[/editline]
Where does everyone get all this format documentation? Reverse engineering? Preferably on Valves proprietary files.[/QUOTE]
For BSP and VTF and stuff:
[url]http://nemesis.thewavelength.net/index.php?p=40[/url]
[url]http://nemesis.thewavelength.net/index.php?c=108#p108[/url]
-late, give me clorks-
[quote= map in a box]Interesting uh artstyle you got going there![/quote]
I keep asking people to do art for me but no-one's interested. ;_;
[QUOTE=Yogurt;34067546]Holy shit is your name Nigel?[/QUOTE]
No.
[QUOTE=Maurice;34066811]It says "trrailing" at the end of the video.[/QUOTE]
It's doubling the letters at the edge on to the newline. oops
[QUOTE=Nigey Nige;34067686]No.[/QUOTE]
Is it just "Nige"?
Sorry, you need to Log In to post a reply to this thread.