• What Are You Working On? V13
    5,003 replies, posted
[QUOTE=Richy19;25734305]Not much to see but im thinking a hack'n'slash game. Think its doable? its my first sfml/c++ project. btw Joshy isnt about is he? i have a grid :v: just there to help me with the positioning and because i wanted to :P IT HURTS TO LOOK AT Also strange how the FPS has dropped about 1/3 on linux compared to windows[/QUOTE] Not sure if it's the grass tile or the magenta grid-lines but it burns my eyes. D: Of course it's doable, you've got this far, right? [editline]30th October 2010[/editline] [QUOTE=Richy19;25734305]Not much to see but im thinking a hack'n'slash game. Think its doable? its my first sfml/c++ project. btw Joshy isnt about is he? i have a grid :v: just there to help me with the positioning and because i wanted to :P Also strange how the FPS has dropped about 1/3 on linux compared to windows[/QUOTE] That fps seems rather low even dropped a third... Unless you're running on ancient hardware or something? Edit: Or maybe you just haven't optimised it, yet :v:
[QUOTE=BlkDucky;25734338]Not sure if it's the grass tile or the magenta grid-lines but it burns my eyes. D: Of course it's doable, you've got this far, right?[/QUOTE] It's probably the magenta lines because: [media]http://i51.tinypic.com/j803kj.png[/media] Is less stress on my eyes. And yes, I did have to make an image to check if I was right. :|
changed the grid color and the image, dont know if its any better
[QUOTE=Richy19;25734526]changed the grid color and the image, dont know if its any better[/QUOTE] It's better, but I have 2 colors that may help you decide. Light Green: (186, 255, 199) [media]http://i52.tinypic.com/66ymx0.png[/media] Or Black: (0,0,0) [media]http://i51.tinypic.com/pc67q.png[/media] I like light green more in my opinion. : )
Mehh to be honest the grid was more of an indev thing to see how easy it was/ help me with the positioning So i have uploaded an image without grids Also as you might have noticed the trees get randomly positioned around the screen :v: [QUOTE=BlkDucky;25734338] Edit: Or maybe you just haven't optimised it, yet :v:[/QUOTE] Nop not at all :v:
[QUOTE=Richy19;25734835] Nop not at all :v:[/QUOTE] [code] if(fps <30) { std::cout<<"Get a faster computer\n"; return 0; } [/code] Optimized my game pretty well.
Btw do you thing efficiency wise it would be better to take the 25x20? tiles image and just draw it into a 800x640 buffered image?
[QUOTE=xAustechx;25735264][code] if(fps <30) { std::cout<<"Get a faster computer\n"; return 0; } [/code] Optimized my game pretty well.[/QUOTE] what if someone drags the window? :colbert:
[QUOTE=xAustechx;25735264][code] if(fps <30) { std::cout<<"Get a faster computer\n"; return 0; } [/code] Optimized my game pretty well.[/QUOTE] You should really return 1 to tell the operating system it failed, also use a message box
Hey xAustechx, I got bored and made this in Photoshop. You can have the PSD and fonts if you'd like. [img_thumb]http://anyhub.net/file/z-o.png[/img_thumb]
[QUOTE=andersonmat;25736323][img]http://anyhub.net/file/z-o.png[/img][/QUOTE] This is too good to be held back in some thumbnail.
[QUOTE=andersonmat;25736323]Hey xAustechx, I got bored and made this in Photoshop. You can have the PSD and fonts if you'd like. [img_thumb]http://anyhub.net/file/z-o.png[/img_thumb][/QUOTE] good shit
[QUOTE=efeX;25736412]good shit[/QUOTE] Thanks mate. :dance:
[QUOTE=andersonmat;25736323]Hey xAustechx, I got bored and made this in Photoshop. You can have the PSD and fonts if you'd like. [img_thumb]http://anyhub.net/file/z-o.png[/img_thumb][/QUOTE] Gimme the font!
[QUOTE=andersonmat;25736323]Hey xAustechx, I got bored and made this in Photoshop. You can have the PSD and fonts if you'd like. [img_thumb]http://anyhub.net/file/z-o.png[/img_thumb][/QUOTE] Holy shit andersonmat that is fucking awesome. : o If you really don't mind giving me the fonts: Email: [email]theaustech@gmail.com[/email] Skype: austech987 MSN: [email]austech987@hotmail.com[/email] And when it does get put in the game, if you'd allow if of course, you'll get full credit for the background. ;D But no lie, that is awesome. Can't believe you actually did this for my project, thanks : )
[QUOTE=Richy19;25735642]Btw do you thing efficiency wise it would be better to take the 25x20? tiles image and just draw it into a 800x640 buffered image?[/QUOTE] Well you could just keep a buffer and rerender only what changes. If the camera isn't moving ofc. [editline]30th October 2010[/editline] You'd just have to keep track of which tiles have been drawn on, and draw the original image back
[QUOTE=DevBug;25737080]Gimme the font![/QUOTE] The title font: [url=http://www.dafont.com/sidewalk.font][img]http://ahb.me/NEe/.png[/img][/url]. The game selection font: [url=http://www.dafont.com/defused.font][img]http://ahb.me/NEj/.png[/img][/url].
Holy awesomeness, cleaning up some C#, thanks Turb! Before: [cpp] // Convenient URL grabbing menuItem.DropDownItems.Add(Str._(Str.MenuItemCopyPrimary), null, (sender, e) => { CloudAppItem senderItem = (CloudAppItem)((ToolStripMenuItem)sender).OwnerItem.Tag; Clipboard.SetText(senderItem.Url); });[/cpp] After: [cpp] // Convenient URL grabbing menuItem.DropDownItems.Add(Str._(Str.MenuItemCopyPrimary), null, (sender, e) => FromRecentMenuItem(sender, x => Clipboard.SetText(x.Url)));[/cpp] Though I should probably get around to a better solution to "Str._(Str.blah)" some time...
I just dropped a small update in for Hue, for the CMake file, as it wouldn't allow for a sudo make install. My bad. I'm about to finish up my small file system library (I've already finished it, just need to do some testing :D). It's called dao, and it's basically a (very) small wrapper around the Posix and Win32 File System API. I'll post a link, as well as some examples once it is done. It's effectively pretty simple though. It lets you check it a file, or directory exists, create a hierarchy of directories, list the items in a directory (assuming they are either a file, or a directory), get environment variables, split a path (everything needs to be a forward slash), set environment variables, get the current working directory, change directories, and get the system PATH separator. (effectively a ':' or a ';'). First example I'll post will show how to make a colored ASCII tree using Hue and Dao. Then I guess it's back to working on my build system for the interim :v:
[QUOTE=Jallen;25731984]They do some amazing shit with rotations. I don't have a clue how they work but I find it incredible that a 4x4 matrix can do so much cool shit, and then you multiply them together and it does both the things... IN THE ORDER OF THE MULTIPLICATION!? I don't even want to know how they work. To me, matrices are magical boxes which do extraordinary things.[/QUOTE] So you just do transformations? Boring ): How do you use matrices if you don't know how they work? Do you just copy like (cos x -sin x) (sin x cos x) For everything? I used to be able to prove that but I've forgotten how.
[QUOTE=Sh33p;25740153]So you just do transformations? Boring ): How do you use matrices if you don't know how they work? Do you just copy like (cos x -sin x) (sin x cos x) For everything? I used to be able to prove that but I've forgotten how.[/QUOTE] Well, there are helper functions in directX which make translation and rotation matrices for you, and multiply them together etc. I just use them. If you wanted though and if you are a badass at maths, you could make some 3D programs programming all of the maths stuff yourself. There are definitions on all of the formulas on the internet but converting them into an algorithm can be a challenging task.
[url]http://blog.wolfire.com/2010/07/Linear-algebra-for-game-developers-part-3[/url]
[QUOTE=Jallen;25740306]Well, there are helper functions in directX which make translation and rotation matrices for you, and multiply them together etc. I just use them. If you wanted though and if you are a badass at maths, you could make some 3D programs programming all of the maths stuff yourself. There are definitions on all of the formulas on the internet but converting them into an algorithm can be a challenging task.[/QUOTE] Well then, I guess I was a badass until I copied over the view frustum one. For my 2D game, I wrote all the matrices my self.
[QUOTE=Darwin226;25740657]For my 2D game, I wrote all the matrices my self.[/QUOTE] Matrices in a 2D game?
[QUOTE=Siemens;25740666]Matrices in a 2D game?[/QUOTE] Um yes, how do you think you rotate an array of pixels or screenspace quads?
[QUOTE=Jallen;25740723]Um yes, how do you think you rotate an array of pixels or screenspace quads?[/QUOTE] Oh right, good point :x
[QUOTE=Jallen;25740306]Well, there are helper functions in directX which make translation and rotation matrices for you, and multiply them together etc. I just use them. If you wanted though and if you are a badass at maths, you could make some 3D programs programming all of the maths stuff yourself. There are definitions on all of the formulas on the internet but converting them into an algorithm can be a challenging task.[/QUOTE] I'm not sure about DX, but you might not want to rely on the graphics library to provide your matrix functions, seeing as they were removed from OpenGL in 3/4.
[QUOTE=raBBish;25740896]I'm not sure about DX, but you might not want to rely on the graphics library to provide your matrix functions, seeing as they were removed from OpenGL in 3/4.[/QUOTE] For OpenGL I'm sure there are loads of third party maths libraries and I highly doubt the D3DX helper libraries will be going anywhere any time soon.
[QUOTE=raBBish;25740896]I'm not sure about DX, but you might not want to rely on the graphics library to provide your matrix functions, seeing as they were removed from OpenGL in 3/4.[/QUOTE] Deprecated in 3.something and removed in 4, I believe.
Here is the ascii tree program written using [url=http://github.com/mnmlstc/dao]Dao[/url] and [url=http://github.com/mnmlstc/hue]Hue[/url]. Didn't take too long. Also, it was a perfect opportunity to use recursion :D [cpp] #include <iostream> #include <vector> #include <string> #include <cstdlib> #include <dao/dao.hpp> #include <hue/console.hpp> #include <hue/color.hpp> hue::console console; void print_members(const std::string& dir, int& indent_level); int main(int argc, const char* argv[]) { std::vector<std::string> parameters(argv, argc + argv); std::string root_dir; if (parameters.size() > 2) { console.errput << hue::color::red << "usage: vls [DIRECTORY]" << std::endl; exit(1); } if (parameters.size() != 2) { root_dir = dao::get_environment("HOME"); } else { root_dir = parameters.at(1); } if (!dao::is_dir(root_dir)) { console.errput << hue::color::red << "error: " << root_dir << " does not exist, or is not a directory" << std::endl; exit(1); } console.output << hue::color::magenta << root_dir << std::endl; console.output << hue::color::none << "|" << std::endl; int indent = -1; print_members(root_dir, indent); } void print_members(const std::string& dir, int& indent_level) { indent_level += 1; std::vector<std::string> dirs = dao::list_dirs(dir, true); std::vector<std::string> files = dao::list_files(dir, true); for (size_t idx = 0; idx < files.size(); ++idx) { std::string member = dao::split_path(files.at(idx)).back(); char list_char = '|'; if (idx == files.size() - 1) { list_char = '`'; } for (size_t i = 0; i < indent_level; ++i) { console.output << hue::color::none << " "; } console.output << hue::color::none << list_char << "-- " << hue::color::green << member << std::endl; } for (size_t idx = 0; idx < dirs.size(); ++idx) { std::string member = dao::split_path(dirs.at(idx)).back(); char list_char = '+'; if (idx == dirs.size() - 1) { list_char = '`'; } for (size_t i = 0; i < indent_level; ++i) { console.output << hue::color::none << " "; } console.output << hue::color::none << list_char << "-- " << hue::color::magenta << member << std::endl; print_members(dirs.at(idx), indent_level); } indent_level -= 1; } [/cpp] If you're using clangcc, just run [code]g++ -o vls vls.cpp -ldao -lhue[/code] (it also works perfectly fine with clang++) Here's a screenshot of the above program, run on my build system's primary module directory [img]http://i.imgur.com/zCpnC.png[/img]
Sorry, you need to Log In to post a reply to this thread.