Skip to main content

Posts

Showing posts with the label C#

[update]Add web service

    Added REST API on Unity game, and created a Spring server to collect data and present it on a simple web page.          This version of web service is not on Azure yet. I was also testing JUnit and MSTest. Finally I complied to install IDE for Spring.... I have a very small hard disk, and already have Android Studio, Anaconda3 for Python, Visual Studio community, VS code, Unity, MySQL, OBS, Inkscape, Medi Bang Paint, Gimp, etc. Just unwilling to add another editor. I'm also supposed to install Decker....      Anyway, I installed Eclipse with STS support. And found it was difficult to test Unity functions related to position mappings, and nothing related to server needed testing. I tested time conversion and it would be much faster to create a main[]. The function I like in Duration is on Oracle Java 9..... not the public version, which Maven/Spring/Linux server uses, Java 8. Math makes things simple. I'm just lazy... 

[Update] Add UI to end a game

    I found without a proper UI, sectional conclusion would never be possible. It might be something like endless life. Vampires live forever and inevitably lose the sense of meaning. Similar stories were also depicted in Japanese comics. Some monsters do harm to others because of boring.       UI animation and Start/End game control were added in this version.     Also borrowed some pictures to match presentation with intention. "A reader with a cup of mike tea" hardly can relate to "a worker on station", although I like reading with coffee or milk tea aside. 

Unity simulation shell

    Simulation shell built from Unity. Players can plan how many stations(milk tea) wanted and the number of workers(reader). When a worker is attached to a station, the sales increase and also the pressure. When detached the worker from the station, the pressure decreases.       Now is only the shell. Game logic is illogical. But the following steps are game recording at server-side and simple report. Better game logic also depends on accumulated effect. Then return back to game design. Project development is a looping circle. Further development needs other parts and accumulation of usage. Actually, the original idea of this simulation game is for training. Games explain experience sometimes better than lecture or communication. But the investment costs more, of course.       Here are some notes deserve recording.  point tracking  UI elements depends on event queue. Game content depends more on overall scanning. Event object will auto...

Unity (mouse & clone)

Squeezed out some time to move forward a little.  No. I'm not creating a game, but a simulator, trying to solve currently encountered problem.  How could you tell someone the time management is harmful, if the culture of environment is "the superior knows the all"? I knew this is far-fetched. And hopefully I soon need not to worry about it, but giving this out as a gift.  Useful function: public void OnMouseUp()     {         if (!bMouseDown) return;         //keep it simple. just return if irrelevant         bMouseDown = false;         if (id != 0)         {             origin = transform.position;             return;         }         //if the genuin, make clone.          Vector3 pos = Input.mousePosition;         po...

Unity 2D game connects to Bookmk REST

Yeah~~~!! I collect the last piece of my puzzle!!  I used to say I like C and Java, but just don't know what to do with it. Python is my new collection, I'm looking for good data to try its scientific libraries. For Java, I got Spring server. Finally I got C on Unity! Games got talent on dumping garbage (just kidding). It's a great playground! 

VC# and chart/image viewer

    Walk through code related to charts, browser and image viewer.       It's a good thing to know how others deal various object in different way, though everything is simple on textbook. But, still, some doubts raised since the outcome is not ideal. For example, how could I create a modern browser if the version VC visual design provided is not supported by most website.....? I have to break into main loop and find out where objects are initialized, instead of waiting for system dispatched event, right? or find some way to breach the main flow...? Probably this is viable solution, but a little ugly.....    Most functionality could be done by VC UI, even the author mildly expressed that coding is almost neglectable.... As what I mentioned on last post, this is a book for VC, not for C#..... I will still complete it. At least there are examples showing me how functionality are performed. And hopefully this could be break into raw functions wit...

VC with MSSQL

    Walk through of VC with MSSQL. Current progress is 60%. The topic I may spend more time could be charts related.     Gradually, I got some feeling that, generally, people like system design. As a gamer, I like unlimited imagination. I may pursuit everything but common and regular. But for many people, they love things familiar. I'm no stranger to database manipulation and data expression. But people like system design, plus fast. Customization always takes time, and not acquainted, maybe not convenient....     Stepping into different world is always interesting.     2 code sections are included on this page. I thought meaningful, but still boring. I should find sometime to design interesting exercises, and also practice on LINQ.     But maybe I'm in a hurry. Azure pop into my mind rather often.When working on MSSQL exercise, I tried to find remote MSSQL host, free. Remote connection is more practical than local database...

VC menu exercise

    A VC exercise on menu and dialog box for loading/saving.     Actually... I'm not looking for formal guides to use visual studio... Sure thing is I need to know the detailed difference between C++ and C#. I also programming in Java, and once in Objective-C, memory address manipulation is special to C++, and also dangerous, so newer languages prevent memory issues and cover them with system background works.     Saying that knowing C++ well is also accountable for C#, but I still can't say confidently that I'm also good at C#. Things are almost the same that my IT career is almost entirely bind with internet, remote service, virtual machine simulator, cloud development, patching services, etc. before they gained modern names. But I can't say I knew Azure, AWS, SaaS, PaaS, REST api, cloud, git, etc.     I need to prove it with my codes. I don't complaint. At least, nowadays, it's possible. And studying is kind of my recreations. ...