Giter VIP home page Giter VIP logo

amble's Introduction

Amble: A platformer game being made as a hobby.
Copyright (C) 2015, 2016 Frozelar
Email: [email protected]
Amble is licensed under the terms of the GNU General Public License v3.0.  A copy of the license is provided in License.txt.

Coded (by me) with:
- C++ (using Microsoft Visual Studio: https://www.visualstudio.com/)
- Simple DirectMedia Layer Library 2.0 (SDL): https://www.libsdl.org/
- Lua: https://www.lua.org/ (using Notepad++: https://notepad-plus-plus.org/)

Graphics drawn (by me) using:
- Paint.NET: http://www.getpaint.net/

Sound effects made (by me) using:
- BFXR: http://www.bfxr.net/

Music credits:
- Title screen: Crystal Warrior by Jadsound (I think I got it from http://www.audiomicro.com, but I can't find the specific link anymore!)
- Level 1: Bolb by Eimann (http://www.newgrounds.com/audio/listen/593830)

Other credits:
- Some of the very early code was derived from examples shown in LazyFoo's SDL tutorials: http://lazyfoo.net/tutorials/SDL/
- Amble uses the font AvariaSans-Regular, which is licensed under the terms of the OFL.  A copy of the OFL is included in OFL.txt.
- Several SDL DLLs (Windows) or frameworks (Mac OS X) are distributed with the application under the terms of the LGPL.

Other info:
[To be included later]

amble's People

Contributors

alexleroyross avatar

Watchers

James Cloos avatar  avatar

amble's Issues

Game Lags Horribly -- Needs to be Rewritten?

So the update that was released several days ago appeared to fix the lagging issue only to a small extent. It would appear that the lagging (which is still very much apparent) is caused by various parts of the engine just generally being written badly. There is, nonetheless, one aspect of the engine which is likely responsible for a large majority of the lagging:


There is a 'for' loop for everything. For example, just in the C++ code, there is one for applying AI, one for moving the level, one for rendering, etc., which all loop through every single entity in the level. On top of that, there are SEVERAL loops in LuaBridge alone, which communicate the status of things to and from luacode.lua. Then, in luacode, there are even more loops to apply other various properties to everything! I would imagine that all of these loops are extremely inefficient. The better way to go about doing this would (probably) be to have ONE loop in C++ to do everything that needs to be done with all things, and MAYBE one loop in luacode.lua if necessary, though I would imagine I could probably even get around doing that.


Again, I know there are more things that are probably causing the problem, though I would imagine this is the most significant issue. Now, I am again not sure if I am going to go ahead and actually address this issue, or whether I will simply call this game as a whole a learning experience and move on. Rewriting the C++ code would perhaps not be too bad, even though it would probably take awhile. The code relating to Lua, on the other hand, is so messy and unnecessarily long that I would legitimately probably be better off just getting rid of all of it and starting over, which would take another eon to do. Like, I could probably have a large part of an engine for a new game already written by the time I would finish with all of this.

I dunno, man. I'm not calling this project dead yet, but I do feel like it may be in my best interests to just move on. This project has been on life support for a while anyways. Plus, I seriously have learned an immeasurable amount of invaluable experience, from teaching myself the best ways to write code through trial-and-error to being taught the best programming practices by seasoned programmers. I have no doubt my next game (which may even be called Amble 2.0 or something since I like the idea I have going with this game) will be infinitely better than this one.

Move Frame Cycling to Lua

If custom frames and states are to be allowed, then it would probably be easiest to move frame handling and cycling from c++ to lua.

Significant Problem with the Game Engine

Apparently the game lags horribly when levels are any larger than roughly 80x80 or so units, which is actually extremely small. I am pretty certain that this issue stems from the things[] vector having an index for each level unit, regardless of whether it is empty or actually contains something. All of the loops, in turn, have to check every single index, which I would imagine is causing the lag. Plus, it would not take long before the things[] vector would be a ridiculously huge size in general (a level that is just 100x100 units would have 10,000 indices!).


The way I see it, there are two potential paths that could be taken:

  1. Rewrite a large portion of the game engine so that the things[] vector only contains indices for things, and not for empty level units. This would take quite a long time to do since I would need to completely redesign the level reading/writing system, most of LuaBridge, and a lot of the code that handles things in general, both in C++ as well as in Lua.
  2. Simply call this project a failure and use the knowledge and experience that I've gained from working on it to design a bigger and much better game. I'm aware that the engine for this game has many other flaws than just this one in particular as well.

I will update this issue with a comment as soon as I have made up my mind as to what I will do.

Enhance dashing system

Need to make all things be able to dash. Also need to allow this value to be modified from Luacode.

Make a .cfg File

Need to make the game write to/read from a config file so that settings can be saved.

Fix Linker Errors

There are a bunch of linker errors that were somehow never noticed until now. Need to change around the order of file includes to address this.

Fix random breakpoints

  • At least one occurs in labHandleEnvironment() (line 705?)
  • Also one in gxRender() (specifically line 263)
  • Need to check for others

Decide how Directions will Work

Each thing has tgDirection. It is sometimes updated, though not every time it should be. It is also currently never used. Need to decide to either:

  • Get rid of tgDirection entirely and just determine direction by tgVerticals and tgSpeed
  • Optimize its usage by updating it each time it needs to be and adding specific directions for diagonals

Use Userdata with Lua

Code could be made significantly better if userdata was used instead of the awkward current system.

C++ Enums Need Tweaking

Enums need to be able to work with Lua tables more optimally.

Possible Solutions (in order of estimated effectiveness):

  • Use maps instead of enums
  • Somehow make enum and table values correspond & interact
  • Remove enums entirely

Projectiles (and possibly particles) are bugged

The projectile engine will sometimes confuse which projectile is which for some reason. Because the particle engine runs in a similar fashion, it may have the same issue, though I have not yet done any testing to see if that is actually the case.

Show current buttons in menu

Currently, the button that is mapped to a function in the button mapping menu is not displayed. Not a big issue, but should consider adding this feature at some point.

Check Code

I've been adding, removing, and changing a LOT of things lately but haven't reviewed any of it afterwards. Would probably be best to look over all code and make sure everything is working properly and that there are not any mistakes that may not have explicitly yielded an error.

Use Smart Pointers

Need to look into using smart pointers instead of regular ones, such as with things[]. May simplify some of the code.

Use Lists Instead of Vectors?

I've read that lists are more efficient than vectors since they do not use arrays behind-the-scenes, but I have not actually looked into this yet.

Add smaller font

Should add another smaller font to be used for places where there is more than just a few words.

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.