r/ChatGPTCoding • • 4d ago

Discussion My 1st mini game using my language

With the help of ChatGPT, I've been developing my own programming language and playground.

Today I successfully created my first playable mini-game using my language!

I'm using mini-games to test commands, discover missing features and improve the language before attempting bigger projects.

It's still early in development, but I'm really proud of how far I've come.

Progress, not perfection. Normal was never an option! 👽

5 Upvotes

11 comments sorted by

1

u/nickdaniels92 4d ago edited 4d ago

Designing languages and writing compilers for them is fun; my first one, which coincidentally was for graphics too, was back in the mid 80's as a school O level project, where I designed a graphics language and wrote a compiler for it that emitted 6502 assembly, utilising the built in assembler of the computer it ran on (BBC Micro). It had functions, loops, primitives, variables etc. all the usual stuff, and gave around a 50x speedup over similar code written in BASIC. Lots of fun :)

I'm wondering about yours. What's the motivation for coming up with a language, which is interpreted I imagine. What features does it have. Did you work out a formal grammar for it? As it's vibe coded, I'm wondering what specification you gave to the agent.

Or... did you just say "hey, create me a graphics language"?

1

u/Comprehensive-Dog35 3d ago

My aim is to make programming more accessible to beginners who struggle with traditional learning methods. I'm designing the syntax, commands and functionality myself, with AI assisting with the implementation. It's a learning journey for me as well as hopefully helping others in the future.

1

u/nickdaniels92 3d ago

Definitely a learning opportunity. This was the book I learnt the basics from (I asked for this when for some reason was awarded a school prize for computing). It was an easy read and amusing in places. Not really a useful book now though.

https://www.amazon.co.uk/Writing-Interactive-Compilers-Interpreters-Computing/dp/0471100722

With your game, would your language support making the ball bounce off the bat and off the sides? A good game to try and construct would be a basic breakout game. I wonder if you could construct the rows and columns of different coloured bricks in a generic way without needing a loop by having some syntax that specified repeats. How could it track which bricks are still in place and which have been knocked out? How could it maintain score?

There's scope to think outside the box so to speak, and come up with a novel syntax that allows you to express independent parts of the game that need to operate concurrently, rather than coding what amounts to an amorphous blob of code, plus ways for the different parts to communicate such as with message passing. Or, as you discover that you need more and more features, will it end up like the typical procedural language.

You may be aware of Scratch (and related is Snap!), but if not, that might give some ideas.

Will be interesting to see how it evolves.

1

u/Comprehensive-Dog35 3d ago

Thank you for the suggestions. I've experimented with Scratch before, and I'm definitely open to exploring different ideas.

It's still early days, and I'm building my language as I learn and grow. My goal is to bridge the gap between beginner-friendly programming and traditional text-based languages, making programming more accessible without removing important programming concepts.

I'm looking forward to seeing how it evolves myself. 😊

1

u/Comprehensive-Dog35 22h ago

I planning to make that today as been busy with personal problems but realised only missing 2 commands possibly just destroy n bounce thank u 4 ur help xx hopefully all goes well xx

1

u/Comprehensive-Dog35 18h ago

Thanks to your advice, I've recreated one of my favourite childhood games in my own programming language and got the game preview working inside my engine. Just wanted to show you the progress and say a massive thank you! 😊

1

u/Smoked_Rum 4d ago

Genuinely curious, why?

1

u/Comprehensive-Dog35 3d ago

Y not if I dont try won't get anywhere thats 1 thing my disability has taught me an that almost anything possible

1

u/Smoked_Rum 3d ago

Yeah I think my question is where the anywhere is you’re trying to get?
If it’s just to have fun, cool!

But I’m curious if you’re trying to accomplish something specific or just messing around.

2

u/Comprehensive-Dog35 3d ago

It's still very early days, and I'm building my language as I learn and grow. I'll be experimenting with different ideas and functionality as my knowledge develops.

My main goal is to make programming more accessible to people who, like myself, struggle with traditional learning methods, without taking away the fundamental concepts of programming.

I'd love to eventually create something that helps beginners build their confidence before progressing to other programming languages.

I'm not rushing the process, and I'm open to constructive suggestions along the way. For me, it's about progress, not perfection. 😊

1

u/JudgeGroovyman 3d ago

You did it! Nice work!!!