Creating and Saving objects in C++ [closed] - c++

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I'm trying to create a game using C++ / SDL / OpenGL and Box2D and I was wondering if I can create objects and save them to use later.
To be more precise, I want to create a map this way :
When I click somewhere in the window, it creates an object of my choice (a wall, a ground, etc..) and it will save it into a file that I can use to display the map.
It would save me much time as I will not have to set the x and y positions, length, rendering and all this shit manually and open debugger each time, then re-adjusting, etc..
So, can I do this and if so, how can I do it ?

This question is insanely vague.
Long answer: YES, you can turn your game into a map editor, there is no "built-in" way to do that. You will have to write all editor/serialization logic yourself. You should use a game engine like Unity or Unreal if you want to achieve this kind of features/Behaviour out of the box.
Short anwser: WHY BOTHER doing so, knowing awesome map editors like "Tiled" exists exactly for this purpose, and lots of binding to read maps exists in numerous languages on github.

Related

How to change the mouse cursor to something else in c++? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
How can I change the mouse cursor to something else in c++, Windows? I mean, change the pointer to another system default, for example, the hand icon.
I don't know what code I can provide you, since I don't really have anything for the mouse. The only thing I have for the mouse, that isn't in use, is to hide it. If this helps tell you what I use or anything like that, here:
SDL_ShowCursor (SDL_DISABLE);
My c++ version isn't the newest, so that is something to note.
And hiding the mouse pointer and having a picture follow it isn't something I can do since it uses way too many resources and is slow.
Use SDL_SetCursor If you want a system cursor, you can pass the return value of SDL_CreateSystemCursor to that function. See the documentation:
https://wiki.libsdl.org/SDL_SetCursor
https://wiki.libsdl.org/SDL_CreateSystemCursor
https://web.archive.org/web/20210211163214/https://wiki.libsdl.org/SDL_CreateSystemCursor
The documentation is currently somewhat lacking. The last link refers to the archived documentation, which contains the list of possible values for SDL_CreateSystemCursor
Example:
SDL_Cursor* cursor;
cursor = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_HAND);
SDL_SetCursor(cursor);

How to make a form in c++ from scratch without winforms? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I want to make desktop application with cpp and make a completely new form and I don't want to use winforms or any external addons just cpp.
When presenting output to screen you almost always have to call some kind of system call at some point. So the next closest thing to winforms is probably the winapi, but you could try some kind of graphical library for example sdl2 or sfml which encapsulates these calls with their own api. But you wouldn't have all these nice native windows buttons and tabviews and scrollbars and textboxes and ... only some basic shapes, images and pixel buffers

how ro interact with a program's ui using another program to preform a brute force attack? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
first of all this isn't for illegal purposes. rather for educational resons.
I made a program that basically ask for a username and a password and store them, and i can insert them later in a text box ui to "login". (Im using windows)
now i have a second program that is suppose to perform a brute force attack by trying a bunch of combinations of letters and numbers untill it cracks the password...
now my question is: is it possible (on windows) to interact with the ui of a program using another program ? and how ?
thanks !
it possible (on windows) to interact with the ui of a program using another program ? and how ?
Yes, this is possible. The technology to use is called UI Automation. It will work with any application that uses a UI implemented using standard windowing systems (classic Win32, Windows Forms, WPF, WinUI).
It may not work for custom UI frameworks. If UI Automation doesn't work, nothing else will, unless there is a custom automation interface.

Implement video editor [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I want to implement a "simple" video editor and since I'm new to the topic, I'm not sure how to start.
The editor should have the following features / components
A timeline for multiple recordings
A video player that plays the edited video in real-time (it should render all added effects and assets)
Assets that can be placed on the timeline such as text elements, arrows and so on
I'd like to start with the video player and then build the other components around it.
Which frameworks would you recommend?
For the player, I'm not sure if DirectShow is the right choice or MediaFoundation would be better. Are there other libraries to consider? FFmpeg?
My recommendation given your interests is to start with Blender
http://www.blender.org
It's written in a combination of C, C++, and Python, has a substantial user community, and has the advantage of open source code so you can see how a real large project looks.
You might end up just contributing to it, or you might lift bits of it to bootstrap your own project, etc. But if you don't know about, it's worthwhile to look at if only to help you refine what you want to work on.

What is the best or most efficient way to develop a GUI in C++? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I know that there are WYSIWYG editors available for GUI development, but are those the best way?
I know that in HTML if you use a WYSIWYG editor like Dreamweaver, what it produces will work but it will produce bad code that causes the program to not be as efficient as it could be.
Is it the same deal with C++ and other compiled languages?
Edit: I'll be developing for Windows 7. I probably wont be needing anything fancy like progress bars, just basic things like buttons, tick boxes, and a place to display output. It will just be running CMD commands based on what the user has selected before running it and displaying CMDs output in the program.
I guess the question I specifically wanted answered is whether it is best to "hand code" the GUI like you would in HTML, or if WYSIWYG editors are the way to go.