• Advertisement

Search the Community

Showing results for tags 'Visual Studio'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Categories

  • Audio
    • Music and Sound FX
  • Business
    • Business and Law
    • Career Development
    • Production and Management
  • Game Design
    • Game Design and Theory
    • Writing for Games
    • UX for Games
  • Industry
    • Interviews
    • Event Coverage
  • Programming
    • Artificial Intelligence
    • General and Gameplay Programming
    • Graphics and GPU Programming
    • Engines and Middleware
    • Math and Physics
    • Networking and Multiplayer
  • Visual Arts
  • Archive

Categories

  • News

Categories

  • Audio
  • Visual Arts
  • Programming
  • Writing

Categories

  • GameDev Unboxed

Categories

  • Game Dev Loadout

Categories

  • Game Developers Conference
    • GDC 2017
  • Power-Up Digital Games Conference
    • PDGC I: Words of Wisdom
    • PDGC II: The Devs Strike Back
    • PDGC III: Syntax Error

Forums

  • Audio
    • Music and Sound FX
  • Business
    • Games Career Development
    • Production and Management
    • Games Business and Law
  • Game Design
    • Game Design and Theory
    • Writing for Games
  • Programming
    • Artificial Intelligence
    • Engines and Middleware
    • General and Gameplay Programming
    • Graphics and GPU Programming
    • Math and Physics
    • Networking and Multiplayer
  • Visual Arts
    • 2D and 3D Art
    • Critique and Feedback
  • Topical
    • Virtual and Augmented Reality
    • News
  • Community
    • GameDev Challenges
    • For Beginners
    • GDNet+ Member Forum
    • GDNet Lounge
    • GDNet Comments, Suggestions, and Ideas
    • Coding Horrors
    • Your Announcements
    • Hobby Project Classifieds
    • Indie Showcase
    • Article Writing
  • Affiliates
    • NeHe Productions
    • AngelCode
  • Workshops
    • C# Workshop
    • CPP Workshop
    • Freehand Drawing Workshop
    • Hands-On Interactive Game Development
    • SICP Workshop
    • XNA 4.0 Workshop
  • Archive
    • Topical
    • Affiliates
    • Contests
    • Technical

Calendars

  • Community Calendar
  • Games Industry Events
  • Game Jams

Blogs

There are no results to display.

There are no results to display.

Marker Groups

  • Members

Developers

Developers


Group


About Me


Website


Industry Role


Twitter


Github


Twitch


Steam

Found 40 results

  1. Currently, our framework only supports loading binary shader code. The way we do it in Visual Studio is through custom build tool per shader file. Now we also want to support shader recompilation when a user presses some key. This is tricky since now we don't have access to the source files. So I was thinking, if there is some way to export all the commands from the custom build tool to a text file, then we can just load that text file and execute all commands inside and then just do the regular shader loading as we do it right now. Example custom build tool command for a shader which has vertex, pixel, and geometry shader stages: fxc %(Identity) /E VSMain /T vs_5_0 $(HLSLCompileFlags) /Fo %(Identity)\..\Binary\%(Filename).vert.bin fxc %(Identity) /E PSMain /T ps_5_0 $(HLSLCompileFlags) /Fo %(Identity)\..\Binary\%(Filename).frag.bin fxc %(Identity) /E GSMain /T gs_5_0 $(HLSLCompileFlags) /Fo %(Identity)\..\Binary\%(Filename).geom.bin So here is the process- - Run custom build rules for the shader files - In post-build event of the project, collect all these custom build tool commands and dump them to a text file - Now if user wants to recompile, just load this text file and execute all commands inside How would I get access to these custom build tool commands in the post-build event?
  2. I'm not sure if this is the right place for this question, but I'll give it shot Using Visual Studio Code, I have the task.json set up to launch a batch file that is set up like follow: @echo off call "Z:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86 set INC_PROJECT_PATH="Z:\Asus\Documenti\VS Code\Projects\Packman Clone 1" set INC_SDL_PATH="Z:\Dependencies\SDL2-2.0.5\SLD2" set SOURCE1_PATH="Z:\Asus\Documenti\VS Code\Projects\Packman Clone 1\source\*.cpp" set SOURCE2_PATH="Z:\Asus\Documenti\VS Code\Projects\Packman Clone 1\Engine\*.cpp" set LIB_SDL_PATH="Z:\Dependencies\SDL2-2.0.5\lib\x86" set OUTPUT_PATH="Z:\Asus\Documenti\VS Code\Projects\Packman Clone 1\Debug\Pacman.exe" cl /std:c++latest /W4 /ZI ^ /I %INC_SDL_PATH% /I %INC_PROJECT_PATH% ^ /EHsc %SOURCE1_PATH% %SOURCE2_PATH% ^ /link /SUBSYSTEM:CONSOLE ^ /LIBPATH:%LIB_SDL_PATH% SDL2main.lib SDL2.lib ^ /out:%OUTPUT_PATH% I'm not totally sure about what it's doing and I'm piecing it togeter as I go (trial and error + google), so if I got it right, the *.cpp at the end of those paths, it means that every time I build it will build all the .cpp that it finds in those 2 paths. And that doesn't sounds good, so I was wondering, there is a way to tell it to re-compile only the files that have changed?
  3. SFML is portable on windows Linux and Mac. So a game created on Windows to be ported to Mac must be compiled on that computer using portable C++ code? Another problem/question that is more specific: I am writing a game using Windows C++ and SFML. Using a resource for the image seems to be possible, but I will have to alter the code when porting because this 'belongs to' Window's Visual Studio C++? The other option is to keep the images in a folder that would be viewable and loadable. This I think would run on Linux and Macintosh. It just doesn't seem to be to professional. Any advice? Thank you, Josheir
  4. Hi guys, so I have about 200 files isolated in their own folder [physics code] in my Visual Studio project that I never touch. They might as well be a separate library, I just keep em as source files in case I need to look at them or step through them, but I will never actually edit them, so there's no need to ever build them. However, when I need to rebuild the entire solution because I changed the other files, all of these 200 files get rebuilt too and it takes a really long time. If I click on their properties -> exclude from build, then rebuild, it's no good because then all the previous built objects get deleted automatically, so the build will fail. So how do I make the built versions of the 200+ files in the physics directory stay where they are so I never have to rebuild them, but do a normal rebuild for everything else? Any easy answers to this? The simpler the better, as I am a noob at Visual Studio settings. Thanks.
  5. I am writing a level editor using Visual C++ and the win32 API. I have the game engine going working fine with Direct3D 11 (its not an off-the-shelf engine, its custom) The plan for the editor is to have something like this: The blue bit is going to be a standard win32 menu bar, the yellow bit will be a standard win32 status bar, the red bit will contain things like a list of objects to insert into the level (its contents will change depending on what the user is doing) and the purple bit will be a window that will be rendered into by the rendering code. I know how to do Direct3D11 rendering into a window that is the parent window and is the only thing the app is drawing (the engine runs a loop that lets the windows message loop run and process its messages before running the engine code and doing rendering) but I can't find anything out there on how you do Direct3D graphics (11 or otherwise) into a child window and how you handle things like resizing and painting and things. Its definitely possible since so many level editors and things do it but I dont know how they pull it off. (and Google isn't showing anything useful either) Are there any examples out there of how you can create a win32 custom control/child window, set up a IDirect3D11Device to draw onto that window and then have that window play nice with all the other windows (the main parent window and the other child windows) whilst still triggering a once-per-frame render call to allow me to draw my stuff in there.
  6. Hey guys...I found a great channel on youtube. I was always a Unity guy and got pretty good in it. But finally I ended up with doing stuff on my own without a specific engine. I love the freedom of it I found monogame and I found this guy...he is a professional programmer in AAA games studio and shows really cool stuff for 2d MMORPG and server-client stuff!! Defenitly check it out...! https://www.youtube.com/channel/UCThwyD-sY4PwFm7EM89shhQ Have fun
  7. This article discusses how to debug native Android applications using Microsoft Visual Studio Code, which can be useful for game developers implementing background services, prototyping, or other native processes on the Android platform. Of course, Android Studio and Visual Studio 2017/2015 also offer Android debugging capabilities, but they're more restrictive with the configuration environment and only allow debugging of applications packaged in an APK - so we are unable to debug any native processes we might be using to prototype, develop services, or other native processes on Android. Speaking of APKs, note that VSCode also supports debugging APKs via the Android extension. Prerequisites The following components are required to enable debugging: Visual Studio Code with the C/C++ extension installed. GNU Debugger (GDB) from the Android NDK. OS Path Windows <NDK_ROOT>\prebuilt\windows-x86_64\bin Linux <NDK_ROOT>\prebuilt\linux-x86_64\bin macOS <NDK_ROOT>\prebuilt\darwin-x86_64\bin A build of the target project with debugging enabled. This can be achieved by passing NDK_DEBUG=1 on the ndk-build command line, or by adding it to the project's Application.mk file. Enabling NDK_DEBUG also causes ndk-build to copy the correct version of gdbserver to the project's output directory. This will need to be copied to the target device to enable the debugger connection. Also, if the project's Application.mk file specifies the APP_OPTIM setting, it must be set to debug to disable compiler optimizations. While debugging optimized code it possible, it will be a more limited and difficult debugging experience. Optimization can be disabled by passing APP_OPTIM=debug on the ndk-build command line, or by modifying it in the project's Application.mk file. If the project does not specify the APP_OPTIM setting, setting NDK_DEBUG as described above will automatically disable optimizations. Debugging Setup Before debugging the first time, open the project workspace in VSCode and perform the following steps: Open the Debug menu and click Add Configuration... Choose C/C++ (gdb) Launch as the configuration type. If this option is not available the C/C++ extension is not installed and none of this is going to work. Configure the debugger settings for the project. The required attributes are described below. Attribute Description name The name of the debugging task. This is the name that will be displayed in the UI. type Should be set to cppdebug. request Should be set to launch. program The program to debug. This should point to the local version of the executable with debug symbols (the non-stripped version), which is normally in obj/local/armeabi-v7a under the project's build directory (or obj/local/arm64-v8a for 64 bit builds). cwd Doesn't really have any effect, but is required. Can just be set to ${workspaceFolder}. MIMode Should be set to gdb. miDebuggerPath The path to the gdb executable. This should point to the directory in the Android NDK as indicated above. miDebuggerServerAddress The target address to connect to. Since the device is connected via USB, this should be set to localhost:<port>, where <port> is the TCP port chosen for the debugger connection. This same port must be used when starting gdbserver on the device. additionalSOLibSearchPath Any additional local paths to search for debug symbols. The directory specified for the program attribute will automatically be searched first. This should point to the directories of the non-stripped versions of any additional shared libraries to be debugged (if they are not in the same directory as the main executable). Separate multiple paths with a colon. setupCommands An array of additional gdb commands to be executed during setup of the debugger. This needs to be used to execute the set solib-absolute-prefix command to set the local path to the stripped version of all binaries being debugged. preLaunchTask A task to execute before starting the debugger. See the section below about defining tasks in VSCode. The other attributes created for the default configuration can be deleted. Example launch.json file { "version": "0.2.0", "configurations": [ { "name": "Remote GDB", "type": "cppdbg", "request": "launch", "preLaunchTask": "Forward debug port", "cwd": "${workspaceRoot}", "program": "${workspaceRoot}/app/Intermediate/android/myapp/local/armeabi-v7a/myapp", "additionalSOLibSearchPath": "${workspaceRoot}/app/Intermediate/android/mylib/local/armeabi-v7a", "miDebuggerServerAddress": "localhost:5039", "setupCommands": [ { "text": "set solib-absolute-prefix ${workspaceRoot}/app/path/android", "ignoreFailures": false } ], "windows": { "miDebuggerPath": "C:/Tools/android-ndk-r13b/prebuilt/windows-x86_64/bin/gdb.exe", "MIMode": "gdb" } } ] } Refer to the C/C++ debugging documentation for additional information. In particular, the logging attribute can be used to enable additional logging output, which can be useful for troubleshooting if the debugger is not working as expected. Preparing to Debug With the debugger configuration set, there are some additional steps required to debug the project: Copy the target binaries to the target device. Copy gdbserver to the target device. Starting the Debugger With all preparations complete, it's time to start debugging. Use the same port number in these steps as was used in the debugger configuration above. Execute gdbserver on the target device (execute permissions may need to be enabled). The server can be run in two modes: execute or attach. Execute mode will load the target executable and then wait for a client to attach. When the client attaches it will begin execution of the program. This mode is necessary to debug an application's initialization. Attach mode will attach to an already running process. It will not interrupt the process. Mode Command Run mode gdbserver :<port> <exe> Attach mode gdbserver :<port> --attach <pid> Forward the debugger port from the device with ADB: adb forward tcp:<port> tcp:<port> Start the debugger in VSCode. Enable the Debug panel by clicking the bug icon on the left side of the VSCode window. Select the debug configuration from the list at the top of the panel. Click the go button to launch the debugger. Once the debugger starts to connect, the VSCode debug console will display messages from the debugger and allow manual debugger commands to be executed if necessary (the program must be stopped to execute debug commands). The debug panels will display debugging information (variable watches, callstacks, breakpoints, etc.), and a debugger toolbar will provide access to common debug commands. Mouse cursor based display of variables is also supported. Tasks VSCode also supports the definition of tasks, which can be used to execute any command line process, typcially as part of building and/or testing code. These tasks can also be used to support debugging. For instance, a task could be defined to forward the debugger port. This could then be incorporated in the debugger configuration using the preLaunchTask attribute to ensure the port is forwarded before attempting to connect the debugger. Tasks can be configured by selecting Configure Tasks... from the Tasks menu. See the VSCode documentation for more information about task configuration. Example tasks.json file { "version": "2.0.0", "tasks": [ { "label": "Forward debug port", "type": "shell", "command": "adb", "args": [ "forward", "tcp:5039", "tcp:5039" ], "presentation": { "reveal": "never" }, "problemMatcher": [] } ] }
  8. Im trying to wrap my head around Entity Component Systems and was implementing my own based on others examples. I have a very basic stripped down version working without systems but as ive started to implement the systems im getting a linker error complaining about unresolved externals. 1>InputSystem.obj : error LNK2019: unresolved external symbol "public: class VelocityComponent * __thiscall Entity::getComponent<class VelocityComponent>(void)const " (??$getComponent@VVelocityComponent@@@Entity@@QBEPAVVelocityComponent@@XZ) referenced in function "public: virtual void __thiscall InputSystem::update(float)" (?update@InputSystem@@UAEXM@Z) As i understand its complaining that in InputSystem::update() it cannot find the implementation of Entity::getComponent<T>(). InputSystem inherits from system which includes Entity.h. If i move the implementation of getComponent<T>() from Entity.cpp into Entity.h then everything compiles fine. I thought when including a .h the associated .cpp is compiled along with it into an object file then the linker grabs all that to generate the final executable. Please help me to understand why this is failing.
  9. Ludum Dare 40

    Since Ludum Dare 35 I'm regularly participating in every one of them and this one wasn't exception. My release thoughts are positive - this time I've again worked with one friend (with whom we've worked also in the past on Ludum Dare), and I enjoyed it a lot. As this is not a post mortem yet, I will not go into details what went right or wrong - meanwhile I'll just show the results and put out few notes... Yes, that's one of the screenshots from the game (without UI). I'm using this one as a "cover" screenshot - so it should also be included here. Anyways this was my another experience with Unity and maybe one of the last Ludum Dare experiences with it. While I do like it, if I can think about suitable game for my own game engine for the theme next time, it's possible that I won't use Unity next time. Ludum Dare Each 4 months or so, this large game jam happens. It's a sort of competition, well... there are no prizes, and I honestly do it just for fun (and to force myself to do some "real" game development from time to time). It takes 48 or 72 hours to create your game (depending on whether you go for compo or jam category), and there are just few basic rules (which you can read on site - https://ldjam.com/). Then for few weeks you play and rate other games, and the more you play, the more people will play and rate your game. While ratings aren't in my opinion that important, you get some feedback through comments. Actually I was wrong about no prizes - you have your game and feedback of other people who participate in Ludum Dare as a prize. Unity... I've used Unity for quite long time - and I have 2 things to complain about this time, majority of all used shaders in Air Pressure (yes, that is the game's name) are actually custom - and I might bump into some of them in post mortem. Unity and custom shaders combination is actually quite a pain, especially compared to my own engine (while it isn't as generic as Unity is - actually my engine is far less complex, and maybe due to that shader editing and workflow is actually a lot more pleasant ... although these are my own subjective feelings, impacted by knowing whole internal structure of my own engine in detail). Second thing is particularly annoying, related to Visual Studio. Unity extension for Visual Studio is broken (although I believe that recent patch that was released during the Ludum Dare fixed it - yet there was no time for update during the work), each time a C# file is created, the project gets broken (Intellisense works weird, Visual Studio reports errors everywhere, etc.), the only work around was to delete the project files (solution and vcxproj) and re-open Visual Studio from Unity (which re-created solution and vcxproj file). Unity! On the other hand, it was good for the task - we finished it using Unity, and it was fun. Apart from Visual Studio struggles, we didn't hit any other problem (and it crashed on us just once - during whole 72 hours for jam - once for both of us). So I'm actually quite looking forward to using it next time for some project. Anyways, I did enjoy it this time a lot, time to get back into work (not really game development related). Oh, and before I forget, here they are - first gameplay video and link to the game on Ludum Dare site: https://ldjam.com/events/ludum-dare/40/air-pressure PS: And yes I've been actually tweeting progress during the jam, which ended up in a feeling, that I've probably surpassed number of Tweets generated by Donald Trump in past 3 days.
  10. Hi, Does anyone have suggestions on multi-gpu (cross adapter) debugging in vs2015 for dx12? It seems this is not supported (error codes returned when gpu debugging inside VS) in vs2015. Any idea if this is supported in vs2017? Thanks
  11. Hello, So I'm making Galaga in Visual Basic for a class project, I'm stuck to Visual Basic (sigh) and so far I have my ship moving back and forth and shooting and when it shoots and the laser hits a PictureBox the PictureBox explodes, but now I'm to the point were I need invaders/enemies to fly in and line up in there positions. I'm completely stuck on how to make 5 or so ships fly in a set path and then go to a line. If anyone has any advice on how to make them fly in a set path that would be great. Thanks.
  12. GlPortal is a free and open source first person 3D teleportation based puzzle game and platformer. But we have already integrated a physics engine and are planning for some physics based puzzles. We want to improve our Visual Studio support. Check out this project: https://github.com/kungfooman/glportal-vs You can chat with us on gitter https://gitter.im/GlPortal/glPortal
  13. Surely, VB.net and C# (in Visual Studio express and other editions) Bitmaps were creatable from its GDI+ methods.(ex. Dim b as bitmap = new bitmap(image)) But not supported programming-based procedural generated bitmaps, only bitmaps from bitmap-files or its (related) objects or classes supported. Now, this article describes about algorithm-based generated bitmaps in VB.net/C# using both built-in GDI+ methods and external Windows APIs. so-called "binary" bitmaps created from the Createbitmap API. But its usage was not simple, pretty difficult. Then I show up samples in source codes below. 1.form(an app-window) initialization (on this app, form.size fixed in 1600*900) Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.Load bmp = New Bitmap(1601, 865, Imaging.PixelFormat.Format32bppRgb) 'screen resolutions in 1600*864 Sm = "Scene 1" : At = 1 : g = Me.CreateGraphics: BmphDC = g.GetHdc : MainhDC = CreateCompatibleDC(BmphDC) Me.Top = 0 : Me.Left = 0 : SetTextColor(MainhDC, &H32A77400) : SetBkColor(MainhDC, 0) : SetBkMode(MainhDC, 1) Dim f As New Font(New FontFamily("Times New Roman"), 14, FontStyle.Regular, GraphicsUnit.Pixel, 1, False) : SelectObject(MainhDC, f.ToHfont) End Sub mixed .net objects/methods and windows APIs up. those codes were working correctly as it is... Then cleanups. Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) DeleteDC(MainhDC) : g.ReleaseHdc(BmphDC) : End End Sub 2.binding binary values to bitmap Public Function LenB(ByVal stTarget As String) As Integer Return System.Text.Encoding.GetEncoding(932).GetByteCount(stTarget) End Function Private Sub RefreshScenes() ' Create a new bitmap and Lock the bitmap's bits. Dim rect As New Rectangle(0, 0, bmp.Width, bmp.Height) Dim bmpData As System.Drawing.Imaging.BitmapData = bmp.LockBits(rect, Drawing.Imaging.ImageLockMode.WriteOnly, bmp.PixelFormat) Dim ptr As IntPtr = bmpData.Scan0 ' Get the address of the first line. ' Declare an array to hold the bytes of the bitmap.This code is specific to a bitmap with 32 bits per pixels. Dim bytes As Integer = Math.Abs(bmpData.Stride) * bmp.Height ':Dim rgbValues(bytes - 1) As Byte ' Copy the RGB values back to the bitmap System.Runtime.InteropServices.Marshal.Copy(rgbValues, 0, ptr, bytes) bmp.UnlockBits(bmpData) ' Unlock the bits. bmpHandle = bmp.GetHbitmap : SelectObject(MainhDC, bmpHandle) 'TextOut(MainhDC, 637, 10, "A Single Textout Line called like this", 19) For Iu As Integer = 0 To 9 If Not DispMsgShown(Iu) = "" Then Dim RenCache As Integer = LenB(DispMsgShown(Iu)) TextOut(MainhDC, 27, 21 + (Iu * 22), DispMsgShown(Iu), RenCache) End If Next Iu : BitBlt(BmphDC, 0, 0, 1601, 865, MainhDC, 0, 0, SRCCOPY) : DeleteObject(bmpHandle) End Sub 3.texts to be used in overlays Private Sub StrLoader() Select Case At Case 1 DispMsgShown(0) = "textout sample..." DispMsgShown(1) = "at the same time using bitblt and textout..." DispMsgShown(2) = "likely this way to code." DispMsgShown(3) = " " DispMsgShown(4) = "coffee-drinking is relaxing us" DispMsgShown(5) = "" DispMsgShown(6) = "" DispMsgShown(7) = "yoga included the same affects " DispMsgShown(8) = "" Case 2 DispMsgShown(0) = "A" DispMsgShown(1) = "B" DispMsgShown(2) = "C" DispMsgShown(3) = "D" DispMsgShown(4) = "E" DispMsgShown(5) = "F" DispMsgShown(6) = "G" DispMsgShown(7) = "H" DispMsgShown(8) = "I" DispMsgShown(9) = "JKLMNOPQRSTUVWXYZ...thanks!" End Select End Sub 4. Procedual generation samples using above and a timer component Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Cur += 1 : Randomize() Dim RRInt As Integer = Int(Math.Sqrt(Cur * 410)), Sr As New System.Random Dim X2, Y2 As Integer, Iu As Integer Select Case Sm Case "Scene 1" Select Case At Case 1 For Iu2 As Integer = 0 To 13 For Iu = 0 To Math.Sqrt(Cur * 173) + 37 retry: X2 = -Int(RRInt * 1.5) + Sr.Next(RRInt * 3) : Y2 = -RRInt + Sr.Next(RRInt * 2) If Y2 < 0 And Y2 ^ 3 + X2 ^ 2 < RRInt * 40 Then GoTo Retry Pset1(800 + X2, 510 + Y2, Math.Min(255, Sr.Next(RRInt)), Math.Min(255, Sr.Next(RRInt)), Math.Min(255, Sr.Next(RRInt))) Next Iu Next Iu2 Math.DivRem((Cur - 1) * 5, 460, SecCur) For Iu2 As Integer = 0 To 4 'If Cur < 460 Then For Iu = 0 To Math.Sqrt(SecCur) + 14 Pset3(1140 + SecCur + Iu2, 10 + Iu, 40, 60, 70, , , Math.Sqrt(SecCur * 7) + Iu * 2) Pset3(1140 + SecCur + Iu2, 44 + Iu, 40, 60, 70, , Math.Sqrt(SecCur * 7) + Iu * 2) Pset3(1140 - SecCur - Iu2, 74 - Iu, 40, 60, 70, Math.Sqrt(SecCur * 7) + Iu * 2) Pset3(1140 - SecCur - Iu2, 40 - Iu, 40, 60, 70, , Math.Sqrt(SecCur * 4) + Iu, Math.Sqrt(SecCur * 4) + Iu) Next Iu ':End If Next Iu2 Case 2 Dim SecCur As Integer If Cur < 2100 Then For Iu2 As Integer = 0 To 780 'Pset1(1600 - Cur, 120 + Int(Math.Sqrt(Cur)), 60, 240, 140) Pset1(1600 - Cur * 2 + Iu2 * 4, 120 + Int(Math.Sqrt(Cur * 3)) + Iu2, 60 - Int(Math.Sqrt(Iu2)), 240 - Int(Math.Sqrt(Iu2)) * 3, 140 + Int(Math.Sqrt(Iu2)) * 2) Pset1(1600 - Cur * 2 - 1 + Iu2 * 4, 120 + Int(Math.Sqrt(Cur * 3)) + Iu2, 60 - Int(Math.Sqrt(Iu2)), 240 - Int(Math.Sqrt(Iu2)) * 3, 140 + Int(Math.Sqrt(Iu2)) * 2) Next Iu2 Else SecCur = Cur - 2100 For Iu2 As Integer = 0 To 780 'Pset1(1600 - Cur, 120 + Int(Math.Sqrt(Cur)), 60, 240, 140) Pset1(1600 - SecCur * 2 + Iu2 * 4, 120 + Int(Math.Sqrt(SecCur * 3)) + Iu2, 160, 240 - Int(Math.Sqrt(Iu2)), 160 + Int(Math.Sqrt(Iu2))) Pset1(1600 - SecCur * 2 - 1 + Iu2 * 4, 120 + Int(Math.Sqrt(SecCur * 3)) + Iu2, 160, 240 - Int(Math.Sqrt(Iu2)), 160 + Int(Math.Sqrt(Iu2))) Next Iu2 End If End Select End Select : StrLoader():RefreshScenes() End Sub If you hope to add more scenes, one solution is increasing "case" statement . Surely In a large project, external package files required I think. 5.Header declarations within Windows APIs and module-common values Private Declare Function ReleaseDC Lib "user32.dll" (ByVal hwnd As IntPtr, ByVal hdc As IntPtr) As Long Private Declare Function SelectObject Lib "gdi32.dll" (ByVal hdc As IntPtr, ByVal hObject As IntPtr) As IntPtr Private Declare Function DeleteObject Lib "gdi32.dll" (ByVal hObject As IntPtr) As Boolean Private Declare Function CreateCompatibleDC Lib "gdi32.dll" (ByVal hdc As IntPtr) As IntPtr Private Declare Function GetWindowDC Lib "user32.dll" (ByVal hWnd As IntPtr) As IntPtr Private Declare Function GetDC Lib "user32.dll" (ByVal hwnd As IntPtr) As IntPtr Private Declare Function DeleteDC Lib "gdi32.dll" (ByVal hDC As IntPtr) As Boolean Private Declare Function SetTextColor Lib "gdi32.dll" (ByVal hDC As IntPtr, ByVal crColor As Integer) As Boolean Private Declare Function SetBkColor Lib "gdi32.dll" (ByVal hDC As IntPtr, ByVal crColor As Integer) As Boolean Private Declare Auto Function BitBlt Lib "gdi32.dll" (ByVal hdcDest As IntPtr, ByVal nXDest As Integer, ByVal nYDest As Integer, ByVal nWidth As Integer, _ ByVal nHeight As Integer, ByVal hdcSrc As IntPtr, ByVal nXSrc As Integer, ByVal nYSrc As Integer, ByVal dwRop As System.Int32) As Boolean Private Declare Function TextOut Lib "gdi32" Alias "TextOutA" (ByVal hdc As IntPtr, ByVal x As Integer, ByVal y As Integer, ByVal lpString As String, ByVal nCount As Integer) As Boolean Private Declare Function SetBkMode Lib "gdi32" (ByVal hdc As IntPtr, ByVal iBkMode As Integer) As Boolean Private Const SRCCOPY As Integer = &HCC0020 Private Sm As String, At As Integer, Cur As Integer, Bm As Bitmap, rgbValues(5539459) As Byte Private g As Graphics, Iu As Integer, SecCur As Integer, bmp As Bitmap, bmpHandle As IntPtr Private MainhDC, BmphDC As IntPtr, DispMsgShown(9) As String Private Stride_Value As Integer = 6404 'stride values related in bitmap's X-width 6.methods in pixel painting (compatible only this application) Private Sub Pset1(ByVal XPos As Integer, ByVal YPos As Integer, ByVal RedValue As Byte, ByVal GreenValue As Byte, ByVal BlueValue As Byte) If YPos > 864 Then YPos = 864 If YPos < 0 Then YPos = 0 If XPos > 1600 Then XPos = 1600 If XPos < 0 Then XPos = 0 Dim AddressOfBinaryIndex As Integer = XPos * 4 + YPos * 6404 rgbValues(AddressOfBinaryIndex) = Math.Max(rgbValues(AddressOfBinaryIndex), BlueValue) rgbValues(AddressOfBinaryIndex + 1) = Math.Max(rgbValues(AddressOfBinaryIndex + 1), GreenValue) rgbValues(AddressOfBinaryIndex + 2) = Math.Max(rgbValues(AddressOfBinaryIndex + 2), RedValue) End Sub Private Sub Pset3(ByVal XPos As Integer, ByVal YPos As Integer, ByVal RedValue As Byte, ByVal GreenValue As Byte, ByVal BlueValue As Byte, Optional ByVal AdditionalRedValue As Byte = 0, Optional ByVal AdditionalGreenValue As Byte = 0, Optional ByVal AdditionalBlueValue As Byte = 0) If YPos > 864 Then YPos = 864 If YPos < 0 Then YPos = 0 If XPos > 1600 Then XPos = 1600 If XPos < 0 Then XPos = 0 RedValue = Math.Min(255, AdditionalRedValue + RedValue) : GreenValue = Math.Min(255, AdditionalGreenValue + GreenValue) : BlueValue = Math.Min(255, AdditionalBlueValue + BlueValue) Dim AddressOfBinaryIndex As Integer = XPos * 4 + YPos * 6404 : rgbValues(AddressOfBinaryIndex) = Math.Min(255, BlueValue) rgbValues(AddressOfBinaryIndex + 1) = Math.Min(255, GreenValue) : rgbValues(AddressOfBinaryIndex + 2) = Math.Min(255, RedValue) End Sub Private Sub Pset2(ByVal XPos As Integer, ByVal YPos As Integer, ByVal RedValue As Byte, ByVal GreenValue As Byte, ByVal BlueValue As Byte, Optional ByVal AdditionalRedValue As Byte = 0, Optional ByVal AdditionalGreenValue As Byte = 0, Optional ByVal AdditionalBlueValue As Byte = 0) If YPos > 864 Then YPos = 864 If YPos < 0 Then YPos = 0 If XPos > 1600 Then XPos = 1600 If XPos < 0 Then XPos = 0 RedValue = Math.Min(255, AdditionalRedValue + RedValue) : GreenValue = Math.Min(255, AdditionalGreenValue + GreenValue) : BlueValue = Math.Min(255, AdditionalBlueValue + BlueValue) Dim AddressOfBinaryIndex As Integer = XPos * 4 + YPos * 6404 rgbValues(AddressOfBinaryIndex) = Math.Max(rgbValues(AddressOfBinaryIndex), BlueValue) rgbValues(AddressOfBinaryIndex + 1) = Math.Max(rgbValues(AddressOfBinaryIndex + 1), GreenValue) rgbValues(AddressOfBinaryIndex + 2) = Math.Max(rgbValues(AddressOfBinaryIndex + 2), RedValue) End Sub 7.Buttons on form to proceed scenes Private Sub ResetScreen() Dim Iu As Integer : For Iu = 0 To rgbValues.Length - 1 Step 4 rgbValues(Iu) = 0 : rgbValues(Iu + 1) = 0 : rgbValues(Iu + 2) = 0 Next End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If At = 1 Then ResetScreen() : At = 2 : Cur = 0 End If If At = 2 Then MsgBox("sample application finished. thanks for downloading!") End If End Sub A VB2010 sample solution will be attached later. I'd like readers to download it! Of course it also enables binding DirectX interop APIs and above bitmaps in additional coding with slimdx or sharpdx, If you require GPU optimization. thanks for long reading AMStudiosSample1.zip
  14. Hi all, I have written a nice(ish) looking game of solitaire in Windows Forms, using VB.NET and Visual Studio 2015. It allows the player to play the game, and if their score is in the top 10, it saves the username and score o a leaderboard (saved in a text file so it is non-volatile). My next goal is to let the user know if the hand they are dealt is playable, but I'm not sure on the most efficient way of achieving this. I'm working on time complexity over space complexity! It's a simple game to code, but not an easy one to find the solution. Do you know of any algorithms that may achieve this goal that I would be able to look at?
  15. I have to learn DirectX for a course I am studying. This book https://www.amazon.co.uk/Introduction-3D-Game-Programming-Directx/dp/1936420228 I felt would be great for me to learn from. The trouble is the examples which are all offered here http://www.d3dcoder.net/d3d11.htm . They do not work for me. This is a known issue as there is a link on the examples page saying how to fix it. I'm having difficulty with doing this though. This is the page with the solution http://www.d3dcoder.net/Data/Book4/d3d11Win10.htm. The reason why this problem is happening, the book was released before Windows 10 was released. Now when the examples are run they need slight fixes in order for them to even work. I just can't get these examples working at all. Would anyone be able to help me get the examples working please. I am running Windows 10 also just to make this clear, so this is why the examples are experiencing the not so desired behaviour. I just wish they would work straight away but there seems to be issues with the examples from this book mainly because of it trying to run from a Windows 10 OS. On top of this, if anyone has any suggestions with how I can learn DirectX 11 i would be most grateful. Thanks very much. I really would like to get them examples working to though from the book I mentioned. Look forward to reading any replies this thread receives. GameDevCoder. PS - If anyone has noticed. I asked this about 1 year ago also but this was when I was dabbling in it. Now I am actually needing to produce some stuff with DirectX so I have to get my head round this now. I felt at the time that I sort of understood what was being written to me in response to my thread back then. I had always been a little unsure though of being absolutely sure of what was happening with these troublesome examples. So I am really just trying to get to the bottom of this now. If anyone can help me work these examples out so I can see them working then hopefully I can learn DirectX 11 from them. *SOLUTION* - I was able to get the examples running thanks to the gamedev.net community. Great work guys. I'm so please now that I can learn from this book now I have the examples running. https://www.gamedev.net/forums/topic/693437-i-need-to-learn-directx-the-examples-for-introduction-to-3d-programming-with-directx-11-by-frank-d-luna-does-not-work-can-anyone-help-me/?do=findComment&comment=5363013
  16. I wanted to get some advice on what everyone thinks of this debugger, I've been getting some strange results from testing my code and I wanted to see if anyone else had an issues. For instance, I added three "ClearRenderTargetView" calls and three "Draw full screen quad" calls and my reported fps became a fifth of what it usually was. Thank you.
  17. Creating a custom window UI on windows10

    So im about to jump into UI development tutorials and class. Now I'm interested on creating a very simple text editor. I've already got a design. you can see it here: https://www.pinterest.com/pin/489062840776586727/ I'm just wondering if this exact UI design is achievable in windows? what specific language do I need to use? or this is not possible and it will just follow the standard windows 10 header and border design?
  18. Hello all, I set up Visual Studio 2017 for OpenGL and ran this and this codes successfully. I get these linker errors when compiling the following code: #include <iostream> using namespace std; #include "vgl.h" #include "LoadShaders.h" enum VAO_IDs { Triangles, NumVAOs }; enum Buffer_IDs { ArrayBuffer, NumBuffers }; enum Attrib_IDs { vPosition = 0 }; GLuint VAOs[NumVAOs]; GLuint Buffers[NumBuffers]; const GLuint NumVertices = 6; //-------------------------------------------------------------------- // // init // void init(void) { static const GLfloat vertices[NumVertices][2] = { { -0.90, -0.90 }, // Triangle 1 { 0.85, -0.90 }, { -0.90, 0.85 }, { 0.90, -0.85 }, // Triangle 2 { 0.90, 0.90 }, { -0.85, 0.90 } }; glCreateBuffers(NumBuffers, Buffers); glNamedBufferStorage(Buffers[ArrayBuffer], sizeof(vertices), vertices, 0); ShaderInfo shaders[] = { { GL_VERTEX_SHADER, "triangles.vert" }, { GL_FRAGMENT_SHADER, "triangles.frag" }, { GL_NONE, NULL } }; GLuint program = LoadShaders(shaders); glUseProgram(program); glGenVertexArrays(NumVAOs, VAOs); glBindVertexArray(VAOs[Triangles]); glBindBuffer(GL_ARRAY_BUFFER, Buffers[ArrayBuffer]); glVertexAttribPointer(vPosition, 2, GL_FLOAT, GL_FALSE, 0, BUFFER_OFFSET(0)); glEnableVertexAttribArray(vPosition); } //-------------------------------------------------------------------- // // display // void display(void) { static const float black[] = { 0.0f, 0.0f, 0.0f, 0.0f }; glClearBufferfv(GL_COLOR, 0, black); glBindVertexArray(VAOs[Triangles]); glDrawArrays(GL_TRIANGLES, 0, NumVertices); } //-------------------------------------------------------------------- // // main // int main(int argc, char** argv) { glfwInit(); GLFWwindow* window = glfwCreateWindow(640, 480, "Triangles", NULL, NULL); glfwMakeContextCurrent(window); gl3wInit(); init(); while (!glfwWindowShouldClose(window)) { display(); glfwSwapBuffers(window); glfwPollEvents(); } glfwDestroyWindow(window); glfwTerminate(); } Is there any way to solve this issue?
  19. I'm trying to render the characters of a bitmap texture that i generated with stb_truetype.h. Currently i have the texcoords and the longitude of each character, my DirectXTexture2D is 512x512 normilized from -1 to 1. So, i send to render the character "C", creating my triangulation starting from coords (0,0) -> (X0,Y0). Then i get my X1 adding X0 + longitude. NOTE: I transformed my longitude to screen space coordinates dividing out of 512 (texture width size) before. This is my bitmap texture: This is my vertex buffer: float sizeX = static_cast<float>(tempInfo.longitude) / 512; float sizeY = 0.0625f; //32/512 (32->height of font) spritePtr[0].Pos = XMFLOAT3(0.0f + sizeX, 0.0f + sizeY, 1.0f); spritePtr[1].Pos = XMFLOAT3(0.0f + sizeX, 0.0f, 1.0f); spritePtr[2].Pos = XMFLOAT3(0.0f, 0.0f, 1.0f); spritePtr[3].Pos = XMFLOAT3(0.0f, 0.0f, 1.0f); spritePtr[4].Pos = XMFLOAT3(0.0f, 0.0f + sizeY, 1.0f); spritePtr[5].Pos = XMFLOAT3(0.0f + sizeX, 0.0f + sizeY, 1.0f); spritePtr[0].Tex = XMFLOAT2(tempInfo.Tex_u1, tempInfo.Tex_v0); spritePtr[1].Tex = XMFLOAT2(tempInfo.Tex_u1, tempInfo.Tex_v1); spritePtr[2].Tex = XMFLOAT2(tempInfo.Tex_u0, tempInfo.Tex_v1); spritePtr[3].Tex = XMFLOAT2(tempInfo.Tex_u0, tempInfo.Tex_v1); spritePtr[4].Tex = XMFLOAT2(tempInfo.Tex_u0, tempInfo.Tex_v0); spritePtr[5].Tex = XMFLOAT2(tempInfo.Tex_u1, tempInfo.Tex_v0); NOTE: spritePtr is the pointer to my dynamic buffer that i map and unmap. And this is my result: I don't understand why it is too small compared to my bitmap and if i expand the triangulation i get a pixelated character.
  20. SFML How are Symbols Loaded?

    I am getting the message : <information not available, no symbols loaded for sfml-graphics-d-2.dll> when hovering over the sf::Text object name for Visual C++ using Visual Studio (SFML). I am wondering how do I load the symbols so I can view the text object's text for example? Thank you, Josheir
  21. How do i open an image to use it as Texture2D information without D3DX11CreateShaderResourceViewFromFile? And how it works for different formats like (JPG, PNG, BMP, DDS, etc.)? I have an (512 x 512) image with font letters, also i have the position and texcoord of every letter. The main idea is that i want to obtain the image pixel info, use the position and texcoords to create a new texture with one letter and render it. Or am I wrong in something?
  22. using tmxparser (and failing)

    Hi everyone! I've managed to build zlib, tinyxml2 and tmxparser with cmake-gui & visual studio 2017, but when I try building the example program for tmxparser (https://github.com/sainteos/tmxparser/tree/master/test) I'm getting numerous unresolved externals for errors, and in the warnings they all state the library machine type 'x64' conflicts with target machine type 'x86'. (some of the unresolved symbols include __imp__UnhandledExceptionFilter@4, __imp__getCurrentProcess@0, __imp__HeapAlloc@12 and the file referenced in the error log is MSVCRTD.lib along with varying object files) Thing is, when I go back to the cmake configuration listings for all 3 of those libraries, i can't find anything to suggest i've explicitly configured anything as a 64bit build, and when I open the solutions cmake generated for each of the libraries, all of them (including the test project) have x86 as the current target.. what gives? Thanks in advance!
  23. I want to render true type fonts in DirectX11, right now in one program im using stb_truetype.h to get the position and texcoords from every character i want. And in other one, i have DirectX11 with a texture that i can fill it with some information, in this case the .ttf info. But how do i need to open the .tff to tell the texture something like: "Hey, these are the coordinates you need, copy that pixels and fill yourself"?
  24. Hey Community, I have a question about C# and Unity. For my options menu I wrote a script with C#, that worked fine for a while. My problem is to let unity write a .Json file into the LocalLow folder. At first everything went fine and there occurred no errors, but now the file is only generated completely empty. I didn't change anything in the script and Visual Studio doesn't show any errors to me, so I have no clue what is wrong. As I'm only a beginner, I hope anyone of you guys can find what I messed up and give me some advices. Code for the GameSettings using System.Collections; using System.Collections.Generic; using UnityEngine; public class GameSettings { //all variables assigned to their class. public bool fullscreen; public float musicvolume; public float audiovolume; public int difficulty; public bool subtitles; public int Language; public int vsync; public int texturequality; public int resolution; public float gamma; public int antialiasing; public bool autosave; } Code for the SettingManager using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using System.IO; public class SettingManager : MonoBehaviour { //all variables assigned to their class. public Slider musicvolumeslider; public Toggle fullscreenToggle; public Slider audiovolumeSlider; public Dropdown difficultyDropdown; public Toggle subtitlesToggle; public Dropdown languageDropdown; public Dropdown vsyncDropdown; public Dropdown texturequalityDropdown; public Slider gammaSlider; public Dropdown antialiasingDropdown; public Toggle autosaveToggle; public Dropdown resolutionDropdown; public Button closeButton; public AudioSource musicSource; public Resolution[] resolutions; public GameSettings gameSettings; void OnEnable() { DontDestroyOnLoad(gameObject); musicvolumeslider.onValueChanged.AddListener(delegate { OnMusicVolumeChange(); }); fullscreenToggle.onValueChanged.AddListener(delegate { OnFullscreenToggle(); }); audiovolumeSlider.onValueChanged.AddListener(delegate { OnAudioVolumeChange(); }); difficultyDropdown.onValueChanged.AddListener(delegate { OnDifficultyChange(); }); subtitlesToggle.onValueChanged.AddListener(delegate { OnSubtitlesChange(); }); languageDropdown.onValueChanged.AddListener(delegate { OnLanguageChange(); }); vsyncDropdown.onValueChanged.AddListener(delegate { OnVSyncChange(); }); texturequalityDropdown.onValueChanged.AddListener(delegate { OnTextureQualityChange(); }); gammaSlider.onValueChanged.AddListener(delegate { OnGammaChange(); }); autosaveToggle.onValueChanged.AddListener(delegate { OnAutosaveToggle(); }); antialiasingDropdown.onValueChanged.AddListener(delegate { OnAAChange(); }); resolutionDropdown.onValueChanged.AddListener(delegate { OnResolutionChange(); }); closeButton.onClick.AddListener(delegate { OnCloseButtonClick(); }); musicSource = GameObject.FindGameObjectWithTag("music").GetComponent<AudioSource>(); gameSettings = new GameSettings(); resolutions = Screen.resolutions; foreach (Resolution resolution in resolutions) { resolutionDropdown.options.Add(new Dropdown.OptionData(resolution.ToString())); } LoadSettings(); } public void OnMusicVolumeChange() { musicSource.volume = gameSettings.musicvolume = musicvolumeslider.value; } public void OnResolutionChange() { Screen.SetResolution(resolutions[resolutionDropdown.value].width, resolutions[resolutionDropdown.value].height, Screen.fullScreen); gameSettings.resolution = resolutionDropdown.value; } public void OnFullscreenToggle() { gameSettings.fullscreen = Screen.fullScreen = fullscreenToggle.isOn; } public void OnAudioVolumeChange() { AudioListener.volume = gameSettings.audiovolume = audiovolumeSlider.value; } public void OnDifficultyChange() { //Not Implemented Yet } public void OnSubtitlesChange() { //Not Implemented Yet } public void OnLanguageChange() { if (languageDropdown.value == 0) LocalizationService.Instance.Localization = "English"; if (languageDropdown.value == 1) LocalizationService.Instance.Localization = "German"; if (languageDropdown.value == 2) LocalizationService.Instance.Localization = "French"; if (languageDropdown.value == 3) LocalizationService.Instance.Localization = "Russian"; if (languageDropdown.value == 4) LocalizationService.Instance.Localization = "Italian"; if (languageDropdown.value == 5) LocalizationService.Instance.Localization = "Chinese"; } public void OnVSyncChange() { QualitySettings.vSyncCount = gameSettings.vsync = vsyncDropdown.value; } public void OnTextureQualityChange() { QualitySettings.masterTextureLimit = gameSettings.texturequality = texturequalityDropdown.value; } public void OnGammaChange() { //Not Implemented Yet } public void OnAAChange() { QualitySettings.antiAliasing = (int)Mathf.Pow(2, antialiasingDropdown.value); gameSettings.antialiasing = antialiasingDropdown.value; } public void OnAutosaveToggle() { //Not Implemented Yet } public void OnCloseButtonClick() { SaveSettings(); } public void SaveSettings() { string jsonData = JsonUtility.ToJson(gameSettings, true); File.WriteAllText(Application.persistentDataPath + "/gamesettings.json", jsonData); } public void LoadSettings() { gameSettings = JsonUtility.FromJson<GameSettings>(File.ReadAllText(Application.persistentDataPath + "/gamesettings.json")); audiovolumeSlider.value = gameSettings.audiovolume; antialiasingDropdown.value = gameSettings.antialiasing; gammaSlider.value = gameSettings.gamma; texturequalityDropdown.value = gameSettings.texturequality; vsyncDropdown.value = gameSettings.vsync; languageDropdown.value = gameSettings.Language; subtitlesToggle.isOn = gameSettings.subtitles; Screen.fullScreen = gameSettings.fullscreen; difficultyDropdown.value = gameSettings.difficulty; resolutionDropdown.value = gameSettings.resolution; autosaveToggle.isOn = gameSettings.autosave; musicvolumeslider.value = gameSettings.musicvolume; resolutionDropdown.RefreshShownValue(); } } Hoping for fast help, SanguineTunic
  25. I need some help to understand what I'm doing wrong here x_x Here's my step: 1) create a new C++ project with starting content, drop a door in the scene. 2)Add a C++ component to the door called OpenDoor 3)add a variable in the .h and initialize it in the .cpp (code below) When I compile this, the editor crash and any future attempt to open the project won't succede. What mistake did I made? Furthermore, if said mistake is made, is the project lost forever or there is a way to restore it? x_x Cause if wathever silly mistake I've made, if it's all it takes to corrupt and lose an entire project, then I'm done with Unreal Editor... x_x OpenDoor.h: // Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "Components/ActorComponent.h" #include "OpenDoor.generated.h" UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) ) class BUILDINGESCAPE_API UOpenDoor : public UActorComponent { GENERATED_BODY() public: // Sets default values for this component's properties UOpenDoor(); protected: // Called when the game starts virtual void BeginPlay() override; public: // Called every frame virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override; private: float DoorYaw; }; OpenDoor.cpp: // Fill out your copyright notice in the Description page of Project Settings. #include "OpenDoor.h" #include "GameFramework/Actor.h" // Sets default values for this component's properties UOpenDoor::UOpenDoor() :DoorYaw{GetOwner()->GetActorRotation().Yaw} { // Set this component to be initialized when the game starts, and to be ticked every frame. You can turn these features // off to improve performance if you don't need them. PrimaryComponentTick.bCanEverTick = true; // ... } // Called when the game starts void UOpenDoor::BeginPlay() { Super::BeginPlay(); // ... } // Called every frame void UOpenDoor::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) { Super::TickComponent(DeltaTime, TickType, ThisTickFunction); // ... }
  • Advertisement