+ 1

Should I make an SVG game?

I was thinking recently, since I have no knowledge of JavaScript, what could I achieve to make by only using SVG? And after a little thinking, I have already figured out many different cool ways I could make a game, like, I could make an escape room game, or even a boss battle game, I think by using the animate element cleverly this would be possible, should I try this? It would be a nice project to add in my collection, something cool to have in my profile I believe

26th Jul 2020, 5:25 PM
Karak10
Karak10 - avatar
8 Réponses
+ 2
It's possible but not practical. SVG was not made for programming games. You might hack out some mini games but the fact remains that SVG is just an image format. Remember, always use the right tools for the job. JavaScript, to be clear.
28th Jul 2020, 2:06 PM
Ore
Ore - avatar
+ 2
Mirielle you can use begin="" attribute, I made a test of the game, you can check this: https://code.sololearn.com/WgSpmu7j0qGZ/?ref=app
27th Jul 2020, 12:51 AM
Karak10
Karak10 - avatar
+ 1
28th Jul 2020, 9:05 AM
Karak10
Karak10 - avatar
+ 1
Mirielle his games proves that you are wrong. SVG animate elements can accept a .begin as value. i'm not blaming you for providing inaccurate answer. just hope you learned something from the asker.
7th Aug 2020, 11:39 PM
Gordon
Gordon - avatar
0
Mirielle no I don't, a game as simple as an escape room could easily be made with only SVG, I can explain the mechanics I'm gonna use if you want.
26th Jul 2020, 5:46 PM
Karak10
Karak10 - avatar
0
For the escape room, its actually pretty easy, an inventory bar is at the bottom, and lets say an item is somewhere on the screen, when I click that item it teleports outside the viewport, using clacmode="discrete" and a copy of that item teleports on the inventory bar, with different id, lets say the item is a key, when I press on that copy of the key on the inventory the square its in changes color so its visible that you have picked it, and the door that can be opened with the key teleports outside the viewport, while another copy of that door teleports at the exact same place the door was, but this door can be clicked, and when you click it the room changes, thats the basic system of the game.
26th Jul 2020, 6:00 PM
Karak10
Karak10 - avatar
0
Navneet Kaur💫 Do not post a link wall linking to irrelevant questions. The asker of this question is asking about using SVG to code games. Your link wall are linking to using Java to code games.
7th Aug 2020, 11:35 PM
Gordon
Gordon - avatar