![]() |
|
Experiment - Printable Version +- NaaLaa (https://www.naalaa.com/forum) +-- Forum: NaaLaa (https://www.naalaa.com/forum/forum-1.html) +--- Forum: NaaLaa 7 Code (https://www.naalaa.com/forum/forum-4.html) +--- Thread: Experiment (/thread-295.html) |
Experiment - johnno56 - 07-10-2025 I have been testing AI just to see how "clever" it is in creating games. This is my first attempt at an AI created Space Invaders. Notes: Even though I specified Naalaa as the base code, there were several "generalised" commands produced, that needed to be changed to N7. The game is FAR from complete... When using AI, you have to be specific in what you need, not just "create space invaders". The more info you give to the AI the better the results. This attempt has multiple rows of animated invaders; A scoring system (plus hiscore - no saving); Level system (speed increases after each level). No sound (sound files included); No shields; No Super Invader. This is bare-bones. Over all, it took maybe an hour or so to complete the game. In this instance, AI, has done fine job. Learning to be specific with AI was interesting... I might try some other types of "simple" 2D games... But, I do not think I will rely on AI to create 'all' my games... After all, I would like to eventually learn something... lol Let me know what you think about AI and its usefulness in regards to N7?
invaders.zip (Size: 142.98 KB / Downloads: 7)
RE: Experiment - 1micha.elok - 07-10-2025 In my opinion, AI is a great tool to help us develop ideas and move things forward. But like you said, we can’t rely on AI alone to build a complete game. Human creativity and judgment are still essential to refine, reshape, and bring everything together into something truly great. The effort you put into showcasing both the AI and your own creativity in just one hour .... it’s super impressive !
RE: Experiment - johnno56 - 07-10-2025 "own creativity"? I hardly think so... All I did was to replace a few commands that N7 could recognise. The logic, layout and functions were "created" by the AI. At the moment, I find AI an interesting concept, worthy of research. Based on what I have seen, when Basic was the 'new kid on the block', up to now when AI can create the programs for us... Yes. I agree. That is super impressive... but I have concerns about this new 'tool'.... Moo Ha Ha Ha.... RE: Experiment - Marcus - 07-10-2025 Okay, I saw this post and had to take a 10 minute break from work to test it. I am really impressed by this! I certainly see that it can be of help for new beginners. Even more experienced coders could start off with some ai generated code and turn it into something better. I quickly made it more n7ish by getting rid of the separate arrays for all pieces of data for the invaders. Please do more experiments like this! Code: set window "Space Invaders", 320, 240, false, 3RE: Experiment - kevin - 07-10-2025 This is indeed impressive. I must admit that I have never knowingly used AI except when doing google searches - perhaps I need to check it out too..... RE: Experiment - Marcus - 07-10-2025 (07-10-2025, 03:32 PM)kevin Wrote: This is indeed impressive. I must admit that I have never knowingly used AI except when doing google searches - perhaps I need to check it out too..... I don't mind using AI for music and graphics, because having to create those things myself can really make me give up on game projects. On the other hand, when I'm happy with a game like RW3 I might replace all textures with handmade stuff. I enjoy coding too much to let an AI do it for me. But I'm still impressed and want to see more of it! RE: Experiment - johnno56 - 07-10-2025 Marcus, I see what you mean by "ineffective" and then incorporating the collision detection with the 'bullet'... cool... I really need to understand arrays / tables better. I have been using arrays since Moses was a boy and might, just might, be a little set in my ways... lol The "array[].field" thing confuses me to no end. When to use an array or a table? Is there a difference? If there is a difference, how do they differ? Hmm... "More experiments" you say? Funny that you should ask. I have attempted several games (using several languages - N7, RCBasic and QB64) such as Dino Runner, Asteroids, Breakout, Mario, Checkers with varying degrees of failure... lol The failure stems from my lack of being clear enough with articulating the necessary requirements for each game. Hence, the need for keeping the games "simple"... lol It took several attempts to get "invaders" to where it is today. I suppose it will be just a matter of time... I will revisit Dino... I have my doubts... lol Before I forget, thank you for the game mods...
RE: Experiment - Marcus - 07-10-2025 (07-10-2025, 08:12 PM)johnno56 Wrote: I really need to understand arrays / tables better. I have been using arrays since Moses was a boy and might, just might, be a little set in my ways... lol The "array[].field" thing confuses me to no end. When to use an array or a table? Is there a difference? If there is a difference, how do they differ? Maybe the word "associative array" is better than "table"? You can simply use strings as "indexes" (keys) in arrays. And array.x is just a prettier way of writing array["x"]. I use string keys when you'd use "structs" or "records" in other languages. In the space invader game the inv array is a two dimensional array where the inner arrays use the string keys x, y and alive. You could also have used numerical indexes for the inner arrays: inv[i][0] instead of inv[i].x, inv[i][1] instead of inv[i].y ... |