Code Monkey home page Code Monkey logo

seesharpsnake's Introduction

Hi there

I'm Michal, I live in Slovakia, and I work remotely at the .NET Runtime team at Microsoft.

In my spare time I work on C#-related side projects that I find fun but don't particularly overlap with my day job. I maintain the bflat compiler - a C# compiler with Go-like tooling to build small and selfconained apps by default. You might also know me from my greatest hits such as "Let's make C# run on Windows 3.11!", "How about a snake game in C# running on DOS?". I also write articles such as the one on how I built a fully self-contained game in C# in 8 kilobytes.

You can follow me on Twitter to see what I'm up to: https://twitter.com/MStrehovsky

If you would like, leave me a tip in my tip jar at https://paypal.me/MichalStrehovsky

seesharpsnake's People

Contributors

antonlapounov avatar kant2002 avatar michalstrehovsky avatar yowl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

seesharpsnake's Issues

Launching a game

Hi Michal, I am trying to find your contact to send you a proposal for a C++ game kit. If you are interested I can contact you by email. Cheers!

Version that runs on PSX, PS2, and PS3?

I was wondering if a version can be made where one can generate an iso (and also an disc) or something that can be playable on the normal Playstation (ePSXe), Playstation 2, or even Playstation 3?

Platform linker not found

Running this command:

dotnet publish -r win-x64 -c Release /p:Mode=CoreRT

Produces this result:

error : Platform linker not found. To fix this problem, download and install
Visual Studio 2017 from http://visualstudio.com. Make sure to install the
Desktop Development for C++ workload.

Is Visual Studio really required to make these examples work? Is it possible
whatever its looking for is in C:\Windows\Microsoft.NET? I dont mind a 153 MB
download of DotNet, but asking for a 80 GB install [1] to build "hello world" is
a little much.

  1. https://blogs.msdn.microsoft.com/techtalks/mvp/installation-size-of-different-visual-studio-2017-workloads

Arduino?

Amazing. Did you ever try to execute C# on Arduino? I think it's possible to do that.

UPX for a final kick?

Hey, awesome article! I wanted to give a whirl to unleash upx --best zerosnake.exe on the 8k version, but I got

upx: zerosnake.exe: CantPackException: filealign < 0x200 is not yet supported

I don't have all the .NET / Windows development environment set up, but it looks like I would try to increase /filealign:16 in the last command to hopefully fix this. Even if it increases the size, UPX may go farther.

I guess it's kind of a cheat, but it would be interesting to see how much farther it's possible to go.

Couldn't compile with CoreRT

Getting following error. Am I missing something?

dotnet publish -r win-x64 -c Release /p:Mode=CoreRT
MSBuild version 17.4.0+18d5aef85 for .NET
  Determining projects to restore...
  Restored C:\test\SeeSharpSnake.csproj (in 287 ms).
  SeeSharpSnake -> C:\test\SeeSharpSnake\bin\Release\netcoreapp3.1\win-x64\SeeSharpSnake.dll
  Generating compatible native code. To optimize for size or speed, visit https://aka.ms/OptimizeCoreRT
C:\Program Files\dotnet\sdk\7.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(112,5): err
or NETSDK1152: Found multiple publish output files with the same relative path: C:\test\SeeSharpS
nake\obj\Release\netcoreapp3.1\win-x64\apphost.exe, bin\Release\netcoreapp3.1\win-x64\native\SeeSharpSnake.exe. [C:\test\SeeSharpSnake\SeeSharpSnake.csproj]

WindowSize not supported on "linux" (WSL2)

bart@myLaptopWithWsl2:~/SeeSharpSnake$ dotnet run -r linux-x64
Unhandled exception. System.PlatformNotSupportedException: Operation is not supported on this platform.
   at System.ConsolePal.SetWindowSize(Int32 width, Int32 height)
   at System.Console.SetWindowSize(Int32 width, Int32 height)
   at Game.Main() in /home/bart/SeeSharpSnake/Game/Game.cs:line 91

I guess the only solution would be getting #if fy ?

dotnet examples arent self contained

First go here:

https://dotnet.microsoft.com/download/dotnet-core/3.1

Download SDK Windows Binary x64, then extract. Then run:

dotnet new console -o sunday

Then take one of your example commands:

dotnet publish -r win-x64 -c Release /p:Mode=CoreRT sunday

this creates:

$ fd exe sunday -x wc -c
169984 sunday\bin\Release\netcoreapp3.1\win-x64\publish\sunday.exe
169984 sunday\bin\Release\netcoreapp3.1\win-x64\sunday.exe
169984 sunday\obj\Release\netcoreapp3.1\win-x64\sunday.exe

I dont know why it makes 3 of the same thing, but whatever. So if you try to run
one of them, you get:

A fatal error occurred. The required library hostfxr.dll could not be found.

So how is that self contained?

Wont Work

When i am running the game i get this error: โ”‚ Unhandled exception. System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension. (Parameter 'top')
Actual value was 20.
at System.ConsolePal.SetCursorPosition(Int32 left, Int32 top)
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at FrameBuffer.Render()
at Game.Run(FrameBuffer& fb)
at Game.Main()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.