[video=youtube;1S0aBV-Waeo]http://www.youtube.com/watch?v=1S0aBV-Waeo[/video]
pretty good video for those who have no idea how they work.
-snip-
I have been thinking about making a thread for my app, because if it gains interest, this thread could be spammed a lot, and it would be easier to post updates, without spamming this thread.
But I'm not sure if it's a good idea.
[QUOTE=false prophet;49854037]Hey guys. I wrote a roguelike in C++. It's not much right now, but it has input and collision detection and some other things.
It's not much, and it's ugly to look at because the screen flicker is very noticeable because I am rewriting the console window as fast as I can, I wanted this so I could add small details to the game world but it's pretty dang bad. I think I might drop the console window completely and try to understand OpenGL for a few months or use SDL2 now.
Also, I have learned to hate hate hate forward declarations.[/QUOTE]
Made an console audio player once like this. It's the reason why i deleted it afterwards. It was pretty cool, but annoying because of the flickering.
Restarted my own roguelike over and over again over the past few days because i didn't like my own framework :P It's looking way better now though. Also working more "sequential" (main menu - character creation - map) instead of the other way around.
Main menu:
[img]http://i.imgur.com/tzmjtuO.png[/img]
Take a guess what i'm "ripping off" :v:
[QUOTE=false prophet;49854037]Hey guys. I wrote a roguelike in C++. It's not much right now, but it has input and collision detection and some other things.
It's not much, and it's ugly to look at because the screen flicker is very noticeable because I am rewriting the console window as fast as I can, I wanted this so I could add small details to the game world but it's pretty dang bad. I think I might drop the console window completely and try to understand OpenGL for a few months or use SDL2 now.
Also, I have learned to hate hate hate forward declarations.[/QUOTE]
I don't know how you're doing it now, but at least in C#, it's possible and faster to keep track of tiles that need to be changed, change cursor position (SetCursorPosition) and write just those characters. Another way would be to write the whole screen in one string, one Write call. But yes, using a legitimate graphics library would be better suited for a game, regardless of a console-y artstyle. Dwarf Fortress does it with SDL pretty well.
I feel like I just found the cleanest possible solution for traversing the scene graph (imo)
[code]
void SceneGraph::BuildDrawBucket()
{
m_drawBucket.clear();
for( const auto& cam : m_cameras )
{
// The matrix stack keeps track of the current combined local-to-world transform
MatrixStack stack;
Transform* currentNode = &this->m_root;
Recurse( currentNode, cam, stack );
}
}
void SceneGraph::Recurse( Transform* node, Camera* cam, MatrixStack& stack )
{
stack.Push( *node->GetLocalToWorldMatrix() );
{ // Renderable scope
Model* model = nullptr;
// We only want to create draw keys for objects that have a model
if( !cam->IsCulled( node->GetGameObject()->GetLayer() ) &&
(model = node->GetGameObject()->GetModel()) != nullptr )
{
// Models can have submeshes.
// For every mesh in the model
for( size_t i = 0; i < model->m_meshes.size(); i++ )
{
DrawKey key = GenerateDrawKey( cam, model->m_materials[ i ] );
// We create a new data payload with all the necessary info
// for the Renderer to take care of.
RenderDataPayload payload = RenderDataPayload(
model->m_meshes[ i ],
model->m_materials[ i ],
stack.GetAll(), // world transform matrix
cam );
this->m_drawBucket.insert( std::pair<DrawKey, RenderDataPayload>( key, payload ) );
}
}
}
#ifdef _DEBUG
// TODO: Print graph in console
#endif
if( node->GetChildCount() > 0 )
{
for( int i = 0; i < node->GetChildCount(); i++ )
{
//if( currentNode->GetChild( i )-> ) // IF CHILD NOT VISITED
Recurse( node->GetChild( i ), cam, stack );
}
}
stack.Pop();
}
[/code]
It's probably a problem that's been solved before like this, oh well. I was worried I'd have to keep some kind of 'has been traversed' flag on the nodes. But by (ab)using recursion, I don't! I'm very very happy with this :v:
[QUOTE=cra0kalo;49857070][video=youtube;1S0aBV-Waeo]http://www.youtube.com/watch?v=1S0aBV-Waeo[/video]
pretty good video for those who have no idea how they work.[/QUOTE]
I thought about this a few days ago. If only they'd switched the stack and heap and had the former grow forwards, at least 90% of these errors would still potentially corrupt data but wouldn't be exploitable for ACE. The rest are buffer overflows able to target a callee's return address, which [I]I think[/I] aren't nearly as common if stuff like [I]strcpy[/I] is inlined.
You could still overflow the heap like normal, but only if someone actually put a function pointer on there since you couldn't move to the stack even if there were no unallocated pages between them.
Legacy systems and conventions :why:
[editline]3rd March 2016[/editline]
[thumb]https://dl.dropboxusercontent.com/u/5013896/forum/Facepunch/Programming%20WAYWO/3.2016/mike%27s%20shadow.png[/thumb]
Didn't someone here write a deconvolution algorithm a while back?
[editline]3rd March 2016[/editline]
[QUOTE=Hypershadsy;49857645]I don't know how you're doing it now, but at least in C#, it's possible and faster to keep track of tiles that need to be changed, change cursor position (SetCursorPosition) and write just those characters. Another way would be to write the whole screen in one string, one Write call. But yes, using a legitimate graphics library would be better suited for a game, regardless of a console-y artstyle. Dwarf Fortress does it with SDL pretty well.[/QUOTE]
The fastest way to do this is to get the console buffer and write to that directly.
IIrc, it will update without you having to make any additional function calls, but I could be mistaken.
[QUOTE=tisseman890;49856886]Ready for some hot alpha android apps? :excited:
Changes since last update:
- Fixed a bunch of CSS styling.
- Cleaned up the navigation drawer, and it even shows your username! :toot:
- Added logout button
Go nuts, and feel free to throw some feedback at me! Either in here or through a PM.
[URL="https://www.dropbox.com/s/93yf6l2k3o0mkun/FacepunchDroidFIx.apk?dl=0"]Link to APK[/URL]
[vid]https://my.mixtape.moe/hipnem.webm[/vid][/QUOTE]
I feel like the screen going blank for the loading really breaks the feel and flow of the navigation. It might be better to have the loading circle overlaid on the current page. I don't know how difficult that is to do though.
[QUOTE=Aathma;49858057]I feel like the screen going blank for the loading really breaks the feel and flow of the navigation. It might be better to have the loading circle overlaid on the current page. I don't know how difficult that is to do though.[/QUOTE]
I understand what you mean, the reason why I do this, Is i inject the my custom CSS after page load. So when the page finished loading, the screen would suddenly change. I will look into it, and see if i can do something.
[QUOTE=tisseman890;49858143]I understand what you mean, the reason why I do this, Is i inject the my custom CSS after page load. So when the page finished loading, the screen would suddenly change. I will look into it, and see if i can do something.[/QUOTE]
Could you grab the current view as an image and put that as the background during the load?
[QUOTE=tisseman890;49858143]I understand what you mean, the reason why I do this, Is i inject the my custom CSS after page load. So when the page finished loading, the screen would suddenly change. I will look into it, and see if i can do something.[/QUOTE]
Sorry if you have already answered and I have misunderstood, but couldn't you just have a preloader that is part of the current page?
Like youtube's red bar at the top when switching videos.
[QUOTE=Ricool06;49858361]Sorry if you have already answered and I have misunderstood, but couldn't you just have a preloader that is part of the current page?
Like youtube's red bar at the top when switching videos.[/QUOTE]
I'd rather use a native loader, as that would look smoother, but not a bad idea.
Or simply throw away the webview and make a proper mobile app. Hybrids are useless when you have a browser.
[QUOTE=ichiman94;49859336]Or simply throw away the webview and make a proper mobile app. Hybrids are useless when you have a browser.[/QUOTE]
He is using custom CSS for Facepunch to make it mobile friendly though. So it isn't useless.
Something I've wanted on mobile was to use user scripts or styles, but even just a global dark theme would be great.
[QUOTE=ichiman94;49859336]Or simply throw away the webview and make a proper mobile app. Hybrids are useless when you have a browser.[/QUOTE]
I'm actually experimenting with my own Facepunch API and a non webview version.
The one i posted earlier is actually just a proof-of-concept of an idea, which I think actually works pretty well.
I agree that most hybrid apps are horse shit, but that's mainly because the try to imitate native UI, where I try to make Facepunch more mobile friendly, and adding some nice to have features.
[QUOTE=Aathma;49859526]He is using custom CSS for Facepunch to make it mobile friendly though. So it isn't useless.[/QUOTE]
Exactly, and some custom javascript to implement a native image viewer.
[QUOTE=WrathOfCat;49859609]Something I've wanted on mobile was to use user scripts or styles, but even just a global dark theme would be great.[/QUOTE]
Well im also working on making it possible for each user to use their own custom css/js files with my app.
reverse engineering bits of The Witness...
[img]http://i.imgur.com/Cf6NQvr.png[/img]
[video]https://youtu.be/vKB3_rqZMNA[/video]
[video=youtube;v2jHCfJlaV0]https://www.youtube.com/watch?v=v2jHCfJlaV0[/video]
Fun with testing! I've just realised how really incredibly british I sound
[QUOTE=brianosaur;49855988]Make a program that will evaluate pre fixed expressions. If you are creating programs and not learning anything, then you're not doing it right. [/QUOTE]
What do you mean by that?
Also, while I'm not trying to learn anything, I'm trying to familiarize myself with C++. If I tried to learn new things while I'm still trying to remember to do shit I could do easily a little while ago then I would just get frustrated and quit.
I really fucking wish School didn't get in the way as much as it does...
Generating model space position and bone number texture maps using shaders for use in something special. Hopefully can get that special thing working tomorrow.
[img_thumb]http://i.imgur.com/vQ7WD5l.png[/img_thumb]
[QUOTE=cra0kalo;49857070][video=youtube;1S0aBV-Waeo]http://www.youtube.com/watch?v=1S0aBV-Waeo[/video]
pretty good video for those who have no idea how they work.[/QUOTE]
Very interesting. One of the things I've been meaning to learn about.
One question - why is he adding 10 of the return address? How will that help? Surely if the return address is a non-integer number of address lengths out of position, the return address will be wrong? Or could those padding bytes be anything, and it was just convenient to add 10 of the address instead? I'm not really sure also how the memory "moves about" like he describes, perhaps that's what I'm misunderstanding?
[QUOTE=Trumple;49862328]Very interesting. One of the things I've been meaning to learn about.
One question - why is he adding 10 of the return address? How will that help? Surely if the return address is a non-integer number of address lengths out of position, the return address will be wrong? Or could those padding bytes be anything, and it was just convenient to add 10 of the address instead? I'm not really sure also how the memory "moves about" like he describes, perhaps that's what I'm misunderstanding?[/QUOTE]
What he means with the memory "moving about" is that different compilers will do different things with the stack when generating code (different optimizations or compiler flags will move things around), so we don't actually know exactly which address we will be located at (this is why we have the nop sled and the padding of the return addresses). We are able to do a few things though given some assumptions based on how the stack segment works.
A cool thing with the return address and its position on the stack is it's aligned by DWords (4-bytes), so as long as we start writing the return address padding at the start of the alignment, we just need to worry about actually hitting the return address when we write it (which is why we write it several times so we know it's going to hit).
If you're interested in this kind of thing, I'd recommend this book. It goes over this kind of thing as well as some more technical reasons on why it works. It also shows methods on how you can get the exact address instead of padding things out and hoping for the best. [url]http://www.amazon.ca/Hacking-The-Art-Exploitation-Edition/dp/1593271441[/url]
If you're considering going into debt for higher education you should reconsider it. Listen to this guy
[video=youtube;mEYArWcSNZc]http://www.youtube.com/watch?v=mEYArWcSNZc[/video]
[video=youtube;QFVsVnczYqY]http://www.youtube.com/watch?v=QFVsVnczYqY[/video]
[video=youtube;iZM_JmZdqCw]http://www.youtube.com/watch?v=iZM_JmZdqCw[/video]
I think this is a very important message, it's why I'm sharing it.
[img]https://i.imgur.com/Wezt7vx.png[/img]
What the fuck did i just do?
a thing
I'm in conflict. Help me out here :P
If you are playing a ascii roguelike, and here and there there are "real" images used. Would it be a bother? On one side, it allows for a lot more details. But on the other hand, it's a bit of a style break.
For my player creation, i tried to make it look like an id card. so i added a signature using a image. Tried to make it look a bit pixelated so it "blends in" a bit more.
[img]http://i.imgur.com/AM0w0Kr.png[/img]
So, agree for something if it doesn't bother you. Disagree if it's something that would bother you.
Guys I'm making a game
[IMG]http://i.imgur.com/AYhxAlA.png[/IMG]
[SP]illuminati[/SP]
Now you can use custom themes. :toot:
[vid]https://my.mixtape.moe/kpmcpp.webm[/vid]
[QUOTE=Arxae;49864984][...] But on the other hand, it's a bit of a style break.
[...][/QUOTE]
Do it consistently. That way you break with the existing style but will end up with a new one that is your own and unique.
Did some information retrieval today. This baby searches through RSS feeds.
[code]
public List<String> search(List<String> inTitle, List<String> notInTitle, List<String> inDescription, List<String> notInDescription, String startDate, String endDate) throws IOException, ParseException
{
printQuery(inTitle, notInTitle, inDescription, notInDescription, startDate, endDate);
List<String> results = new LinkedList<String>();
DirectoryReader ireader = DirectoryReader.open(directory);
IndexSearcher isearcher = new IndexSearcher(ireader);
BooleanQuery.Builder bqb = new BooleanQuery.Builder();
if(inTitle != null)
for(String t : inTitle)
bqb.add(new TermQuery(new Term("title", t)), Occur.MUST);
if(notInTitle != null)
for(String t : notInTitle)
bqb.add(new TermQuery(new Term("title", t)), Occur.MUST_NOT);
if(inDescription != null)
for(String t : inDescription)
bqb.add(new TermQuery(new Term("description", t)), Occur.MUST);
if(notInDescription != null)
for(String t : notInDescription)
bqb.add(new TermQuery(new Term("description", t)), Occur.MUST_NOT);
if(startDate != null && endDate != null)
bqb.add(new TermRangeQuery("date", new BytesRef(startDate), new BytesRef(endDate), true, true), Occur.SHOULD);
else if(startDate != null)
bqb.add(new TermRangeQuery("date", new BytesRef(startDate), null, true, false), Occur.SHOULD);
else if(endDate != null)
bqb.add(new TermRangeQuery("date", null, new BytesRef(endDate), false, true), Occur.SHOULD);
BooleanQuery expected = bqb.build();
//System.out.println(expected.toString());
ScoreDoc[] hits = isearcher.search(expected, 1000).scoreDocs;
for (ScoreDoc scoreDoc : hits)
{
String title = isearcher.doc(scoreDoc.doc).getField("title").stringValue();
results.add(title);
}
ireader.close();
return results;
}
[/code]
It's using something called Lucene.
Sorry, you need to Log In to post a reply to this thread.