Jump to content

  • Log In with Google      Sign In   
  • Create Account


Waterlimon

Member Since 28 May 2011
Online Last Active Today, 06:03 AM

Posts I've Made

In Topic: inheritage with classes

29 September 2014 - 08:14 AM

If I understood correctly, you have the following procedures:

-Show character

-Show all the tiles

 

But you need:

-Show all the tiles and the character

 

To handle depth sorting.

 

A flexible solution would be to add a new depth sorting layer between the two classes you have and the actual rendering. So each class issues 'render requests' for tiles/character that includes the depth information (as in depthSortingRenderer.addSurface(x,y,depth, etc...) ), and then at the very end you sort them by depth and render them to screen in order.

 

Another approach would be to write up a new procedure that can render both tiles and characters in one go, but I couldnt decide where the logical place for that would be. Inheriting from both character and tile renderer is not it (its neither a tile renderer nor a character!). Inheriting from the tile renderer doesnt really keep it as a tile renderer anymore. Maybe you could modify the tile renderer so it renders a single layer at a time (tileRenderer.showLayer(N)) which would allow you to throw the character rendering in the right spot? Or anything like that (like .showAllTilesBetweenDepths(mindepth,maxdepth), or .renderAllTilesButCallThisCallbackJustBeforeRenderingThisDepth(callback lambda func,depth) so you can draw the character in the callback)

 

Dont really program much at all so not very good at code structuring issues :P


In Topic: Making a shot harder to pull off.

29 September 2014 - 07:06 AM

Do something funny like making the players weapon jam every time he is about to get a heartshot in a situation where you dont deem it acceptable.

 

Or change the game design on a larger scale to not make it such a problem.

 

Or add some random element to make it not successful most of the time (your arm is shaking and the gun is shaking all by itself and the bullet is shaking while flying because turbulence and the enemy is shaking while trying to avoid being hit and the heart is rapidly shifting position because adrenaline).


In Topic: inheritage with classes

29 September 2014 - 05:32 AM

Please give a more thorough description of the situation and what are you exactly trying to achieve.

 

Currently I feel you are just trying to work around some arbitrary restrictions that you have accidentally placed on yourself by taking the one route that somehow happens to avoid them, when in the long term it would probably be better to go and rethink class A and class B, maybe splitting some functionality, merging other functionality or just exposing their internals a bit more so you can access them without inheritance.

 

But I dont know because Im not sure what you are trying to do.


In Topic: ROBLOX/Other Games Programming(Lua)

29 September 2014 - 04:54 AM

Used to play roblox, now just use their forums as a tool of procrastination.

 

 

 


I actually came here to ask for some useful sites or tips to get me started. Yes I want to use Lua for more games, not just ROBLOX. I do have a semi good understanding of Lua, I just need some extra assistance. 

 

Ive seen many people go for the Lua based game engine LÖVE.

 

It seems to be limited to 2D, but has all the things a game engine should have (hardware accelerated sprite rendering with shaders, physics, threading, networking, bunch of utilities...)

It also seems possible to use LuaJIT (not sure if its enabled by default) so I guess it will also be faster than roblox for the Lua-side code.

 

So you could use that.

 

 

You should also learn at least the basics of some other language (probably C#, C++ or Java) simply because they are so popular and if you understand them, you will gain a better understanding of how any programming language (including Lua) works in general. For example you could just read through some C++ online tutorial to the point where you know what pointers are and make some silly console application.

 

Another thing that might be useful is to check the official Lua documentation. Especially the reference manual, since it seems to offer a good explanation of the workings of Lua (since as a dynamic scripting language there is some magic going on to map the Lua script to how the computer works at a low level).

 

And of course, keep googling and reading about things you want to do in whatever game you are working on, be it the general structure of your code, some GUI design issue or a difficult decision of how to implement jumping.

 

You still might find that you want to keep scripting in roblox because you get free hosting and a lot more publicity for your stuff than if you make an independent game (unless you are serious about it and are able to gather a community of your own around it).


In Topic: Common game localizations

23 September 2014 - 06:50 AM

I found the 'Would you like to etcetc' to sound a bit unnatural. I would expect something like 'Quit the game?' instead of 'Would you like to quit the game?'.

 

And yeah it would be better if most words had some context given (there could be the same word multiple times for different contexts too)


PARTNERS