Search found 12 matches

by Ostego160
Thu Jan 11, 2018 7:26 pm
Forum: General
Topic: Whats a good resource for writing "good" lua code?
Replies: 6
Views: 719

Re: Whats a good resource for writing "good" lua code?

In my basic understanding, I break what we do down into two categories: proficiency in the language and design patterns. These two things are frequently mutually exclusive as a design pattern can be applied in many languages. On that note: I find there is plenty of information on language proficienc...
by Ostego160
Wed Jan 10, 2018 7:15 pm
Forum: Support and Development
Topic: Enemies, obstacle's, power ups, life's and health bar (help)
Replies: 11
Views: 933

Re: Enemies and obstacle's

Hello! Are you using a collision detection library, and if so which one? That would help me give you some pseudo code. But here is the concept: Store the enemies in a table, iterate through the table for player/enemy collision. Upon collision apply resolution (dx,dy) and reduce the health of the pla...
by Ostego160
Wed Jan 10, 2018 3:34 am
Forum: Support and Development
Topic: Creating an isometric platformer
Replies: 5
Views: 813

Re: Creating an isometric platformer

MY GOAL : Create a pseudo-3D environment with an isometric perspective and allow jumping onto platforms with different heights I like this idea. I've accomplished it before by doing it this way: Each object has a "z" which is 0 when grounded as well as a "height" (I see you have started on this). T...
by Ostego160
Mon Jan 08, 2018 9:36 pm
Forum: Support and Development
Topic: Simple question
Replies: 3
Views: 189

Re: Simple question

You tie the input command to a boolean variable. function love.load() switchOn = false end function love.update(dt) if love.keyboard.isDown('space') then switchOn = true end if switchOn then doSomething() end end When the spacebar is pressed, switchOn becomes true and stays true even if released.
by Ostego160
Mon Jan 08, 2018 8:19 pm
Forum: Support and Development
Topic: [solved] How to exlude collision detection with a certain shape in HC (hardon collider)
Replies: 2
Views: 170

Re: How to exlude collision detection with a certain shape in HC (hardon collider)

HC is such a lovely library, there's a couple ways to do it. Here's how I do it: I have an ignore variable stored on each object in the world; each object in a table. Here we iterate through enemies. for i=1,#enemies do local candidates = collider:neighbors(enemies[i].mask) --Mask is a reference to ...
by Ostego160
Mon Jan 08, 2018 12:54 am
Forum: Support and Development
Topic: Help: Isometric map drawing incorrectly
Replies: 0
Views: 146

Help: Isometric map drawing incorrectly

Greetings! I am making an isometric grid composed of nodes(intersections) and tiles. I want the tiles to update when the nodes are adjusted. There are no errors however, one of the isometric tile coordinates is wrong (I believe its the 4th coordinate) and its causing the tiles to be drawn wrong. Her...
by Ostego160
Sun Jan 07, 2018 5:54 pm
Forum: Libraries and Tools
Topic: Spectra - Color Manager for LOVE2D
Replies: 3
Views: 474

Re: Spectra - Color Manager for LOVE2D

Very useful and cool lib! I have a question, how do you actually use the gradient function? How do you draw it exactly? Like use it as the background color? Thanks! The gradient is used for more individual object drawing like tiles or world objects. I iterate through each object/tile and apply a se...
by Ostego160
Fri Jan 05, 2018 6:15 pm
Forum: Libraries and Tools
Topic: Spectra - Color Manager for LOVE2D
Replies: 3
Views: 474

Spectra - Color Manager for LOVE2D

Spectra Color Manager Greetings! I made a github repo for a color tool I made and use in my projects to be primarily used with the setColor() function. I originally made it to create simple tiled lighting effects but I also use it to store colors by name (e.g. All enemies should be 'red, while alli...
by Ostego160
Thu Dec 28, 2017 6:02 am
Forum: Support and Development
Topic: 2d arrays of arbitrary size
Replies: 6
Views: 374

Re: 2d arrays of arbitrary size

Hi! This is how I do it, but I don't know if it's the best way or does what your asking. This would be if your are wanting something of a grid: grid = {} gridWidth = 32 gridHeight = 32 worldWidth = 64 worldHeight = 64 for col=1, worldWidth do grid[col] = {} for row=1, worldHeight do grid[col][row] =...
by Ostego160
Tue Dec 12, 2017 2:50 pm
Forum: General
Topic: Why faking 3D nowadays?
Replies: 14
Views: 1647

Re: Why faking 3D nowadays?

Greetings! I LOVE 2.5D (layered sprites). However, I am an extreme amateur at programming and my only projects include fake 3D. In addition to my signature, I have made a series of color, shape, and physics libraries designed around 2.5D that can me seen here: Isometric Physics Model Isometric Color...