Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Unfinished Project - Lion Game - I'm Tapping Out

A topic by NeuronBureau created Jan 27, 2022 Views: 108 Replies: 2
Viewing posts 1 to 3
(+1)

The engine I was using for this Jam was DragonRuby. I want to say 2.8, but the last note in the change log is for 2.23. 

date: Sun Jul 18 01:10:10 CDT 2021
git: 0e042de93974dbd2824062e88609f3a209d69d11


The idea was simple. The game jam’s theme is nature. The Player Character is a Lion that must destroy the robots. So create the player character, then create the enemies. This seems simple.I figured I should know enough about DragonRuby to start on a game.

The game plan was: make a class for the player, and make a class for the enemies. I learned about classes and objects either a week or like an hour before the MFGJ 2022 started. I made a developer account and joined. I spent the first weekend of the jam basically looking up Ruby references in order to know how to go about writing the code, then having to sort things out in isolation because there’s syntax for normal Ruby and syntax for DragonRuby (for example, multi-line comments), and having to figure out which one I need. Which, of course, was very educational for me, and I will take some of those programming lessons into the future.

Then I spent this/last weekend actually typing it out to see if it could work. Of course, being DragonRuby, I hit a major snag: referencing instance variables from within objects to be used in rectangles. If you want characters to mover around, you’ll need coordinates. If you want collision boxes, say, because walls exist in your game, you’ll need “rectangle.” The DragonRuby documentation acts like it makes no big deal about how you reference it – either 4 referenceable elements in an array, or something that has a “x, y, w, and h” variables. The issue is that if you want to reference instance variables in Ruby, you have to specifically make them referenceable, and there are very important things you have to do in the syntax to be ALLOWED to change them, but the DragonRuby documentation insists that all you have to do is call upon rect to do it.

I type stuff in… error. Okay, I didn’t realize that classes aren’t supposed to be defined inside methods. Huh, I didn’t see any tutorial mention this. So I delete the line starting the function and delete the line ending it. Error. I delete the reference to the function I just deleted. Error. Apparently I didn’t reference or initialize my instance variables correctly? So I commented out the instance method that referenced them. The executable didn’t care. It didn’t make sense. I typed in the exact same thing the documentation did in the example. I fixed a spelling mistake. Things work. I then typed out what I thought I was supposed to in order to progress the project. Error.

I decided to reload DragonRuby, since sometimes that changes things. First, run as administrator. Error. Reload the .rb file and reload the executable.

Black screen. Nothing on it. No next, no numbers. No matter how many times I reloaded it, it wouldn’t come up with anything. DragonRuby basically stopped working.

And that is when I stopped on Saturday. I am tapping out. Apparently I knew less than I thought I did about DragonRuby. I could reload it, somehow, but I am more concerned with my mental health, and I also got sick over the weekend. So I am tapping out. I’ll look into my options, which most likely involve looking into another game engine. Yes, I am aware they are all frustrating, including the “easy” ones.

 

My advice:

  • Make a devlog on this forum next time.
  • Write your GDD in something that makes taking smaller notes easier and more fluid than Microsoft Word. Preferably Google Docs.
  • Preferably, you should write down as much as you can about the design of your game before the Jam starts, because you will have a bunch to write, and without the planning, you’ll have to figure things out on the fly, which can make the process more frustrating.
  • Try to understand your engine as much as possible. Fighting with your engine to do basic stuff will choke out your drive to continue or finish, especially since you will no longer be capable of being able to reassure yourself that the project is finishable.

 

I’m glad I took the challenge of My First Game Jam 2022 January, because I needed a rubber-hitting-the-road moment, and what better Jam then making my first game?

Anyway, I leave my DragonRuby Code here. You are all free to use it in any project, for any reason. It isn’t as if DragonRuby is going to make it useful to me. 

-
#My First Game Jam 2022
# A lion must avoid trees and destory robots by damaging them.
# Lion Character
# Tree object
# Robots: Some move, some don't. Some attack back. Some attack AND Move.
  #                    Moves:      Attacks/Retaliates:
  #Towers/Generators:  No          No
  #Spider Drones:      Yes         No
  #Standing Sentries:  No          Yes
  #Treaded Sentinels:  Yes         Yes
#Game Design Document?
def tick args
  default args
  #obstacles -> not a function any more
  #def stacle
end
def default args
  args.outputs.labels  << [640, 500, 'Hello World!', 5, 1]
  args.outputs.labels  << [640, 460, 'Go to docs/docs.html and read it!', 5, 1]
  args.outputs.labels  << [640, 420, 'Join the Discord! http://discord.dragonruby.org', 5, 1]
  args.outputs.sprites << [576, 280, 128, 101, 'dragonruby.png']
end
#-----------
# Define Objects
# Things that can be hit including trees
# Apparently, because nobody said so, you don't put class definitions inside a method/function.
class Obstacle
  attr_rect
  attr_accessor :x, :y, :w, :h
  # Add doesmove, does attack, isdestructible
  def initialize x, y, w, h
    @x = x
    @y = y
    @w = w
    @h = h
    #@hitpoints = 99
  end
  def serialize
    { x: @x, y: @y, w: @w, h: @h }
  end
  def inspect
    "#{serialize}"
  end
  def to_s
    "#{serialize}"
  end
  #def appear x, y, w, h
  #  args.outputs.solids << [x, y, w, h, 0, 0, 255]
  #end
end
#----------
#def stacle
 #a = Obstacle.new 50, 50, 100, 100
#end

Submitted

Man, sorry you had to drop it :( your game seemed fun, I hope to see more of you in the future! Good luck with your next projects, don't give up!

Submitted(+1)

I'm sorry you had such a tough time, I wanted to say I had my own learning struggles too and as long as you improved you're game jam was a  success even if you don't have a shiny game to show for it. Like Momonica said don't give up most of us have only touched the surface of game dev.