Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 22 Aug 2011
Offline Last Active May 06 2013 12:34 AM

#5050918 first game project EVER

Posted by bollµ on 07 April 2013 - 12:42 PM

indeed xD

#5044267 Eight, Nine, Ten...

Posted by bollµ on 18 March 2013 - 11:01 AM

an explanation for the more noobish of us? what's wrong with that definition? >_<;

#5041925 Handling Music option [on/off]

Posted by bollµ on 11 March 2013 - 11:30 AM

AFAIK, you just set the output volume to zero, and disable any sound processing,

#5040811 God Rays + Alpha ( is it possible )?

Posted by bollµ on 08 March 2013 - 08:00 AM

nice link. Also, they neglected to mention that they also added a lens flare effect 


Aren't 5 passes kind of expensive? I've found ping-ponging between FBO's to have a MAJOR impact on performance.


wouldn't a simple radial blur act as a cheap approximation to the 2nd pass + 3rd pass combined? I'm not really sure why it's implemented in two separate passes,

#5040808 first game project EVER

Posted by bollµ on 08 March 2013 - 07:52 AM

shall I leave a link? :)






I had to stop development since the code became so very convoluted I had no idea what the hell was going on.


Still, did learn a hell lot :D

#5039081 General purpose void* addon

Posted by bollµ on 04 March 2013 - 11:14 AM

Hi all!


I've been using Angelscript for some time now, and I've been frustrated with CScriptAny's lack of flexibility, and the fact that you NEED to know the type of the pointer that you have while you instantiate CScriptAny. Hence, I've been writing a small utility that mimics most (if not all) the features of C's void pointers, while adhering to Angelscript. I'd be honored if this helps anyone smile.png


Basically, it behaves similarly to CScriptAny, except for the fact that it does not need the type of the pointer that you pass it. of course, having the type information is not a problem. So, it acts as a general purpose wrapper around all void pointers in C++ code that does not need type information to instantiate it. It can then be passed to angelScript from where data can be accessed from the voidPtr, similar to how CScriptAny lets one access it's contents in the script side of things. If the voidPtr has been instantiated with type information, it behaves like CScriptAny, allowing conversion between int, float, double as well as betwen base class / derived class relationships. BUT without type information, this cannot be done. Hence, caution needs to be exercised while using this without type information(just like normal void pointers), since such conversion cannot be done automatically.



it's in a Visual Studio 2012 project. On executing the project, it shows off the features of the addon, (accessing primitives, object types and handle types from the script side  when the voidPtr class is created in the C++ side without type information). the main() function is present in voidPtr_Addon_Real/voidPtr_Addon_Real.cpp. I don't really have experience with Linux or Mac, so I'm sorry that I wasn't able to make it platform-agnostic. 


The two files that contain the addon are voidPtr.h and voidPtr.cpp.

The path is voidPtr_Addon_Real/voidPtr.h. The cpp is also in the same folder.

The script file is in script/voidPtr.as

The exe is in Release/voidPtr_addon_Real.exe

forgive the horrendous project name ;)



I've tried to keep it minimal. It does use templates for some ease of use, though it can be rewritten to not use them.

Also, I have a feeling I've missed one or two things while programming this (things like overflows for very large numbers) so do tell me if there's anything wrong with the code.


Here's the Google Drive linkhttps://docs.google.com/folder/d/0B_CmqmRQ2-AzS1plUWVSVXpNWDA/edit?usp=sharing


TL;DR - addon for angelScript that allows void pointer use without requiring type information. acts as a generic void pointer wrapper.


Thanks all!


#5036297 how to sync transition and animation

Posted by bollµ on 25 February 2013 - 05:46 AM

I personally have a set of classes whose only job is to provide different interpolation types (Easing Equations) these are the popular ones and are easy to implement. I then have another class to which you can pass these interpolators which are "chained" together in the right order.


So, for example, I might have 

1)opacity-> 0 to 255 in 2.5 seconds using the linear interpolatr AND size-> 0 to 1 in 2.5 seconds using the out cubic interpolator

2)(the 2nd step starts after the first one) rotate the effect from 0 degrees to 180 degrees in 1 second using the sine interpolator

3) size from 1->0 in 0.5 seconds using the in quadratic interpolator



and so on. I use angelscript(a scripting language) to control these transitions. you could use lua to do the same. 

Hope this gives you a fair idea on how to implement something similar :)



#5036271 What's everyone doing with Angelscript!

Posted by bollµ on 25 February 2013 - 12:56 AM

Hi all!


Being pretty new to programming (and Angelscript in general), I'm wondering for what purposes everyone's using Angelscript :)


I've been using it for around 3-4 months now for my 2d game engine.


What about you guys?

#5035306 How to handle states in a fighting game?

Posted by bollµ on 22 February 2013 - 12:47 AM

Well, that does make sense :D


And yes, you're right. I'd considered each ability to be a state and then went on adding new states to it. I refactored it afterwards by storing the data in XML (what buffs, what frames etc) in quite a similar fashion as you described :)



#5034010 Doing a turn based rpg battle system

Posted by bollµ on 18 February 2013 - 09:46 PM

In warcraft 3, most of the buffs actually "did" nothing. They just triggered animation effects on the target they were attached to. In general, the buff would have all sorts of properties to change the look of the character they were affecting, but had no gameplay effect at all.


The actual damage dealing / stunning / whatever was controlled by scripts that would fire periodically and look for that buff. If that buff was present, they would influence the character in some way or another.


There were some exceptions to this norm, but, in general, it was the abilities and the scripts that did all the hard work. Buffs were just for show.


As for items, I'm not sure how other games did it, but bastion(by supergiant games) stores all it's data in an XML file (you can see it too), including enemies, items and upgrades. anyway, the item and upgrade tags usually look something like this:


<item name = "damageBuff" target = "DAMAGE" type = "ADD" value = "15 /> <- adds 15 damage


<item name = "damagMultiplier" target = "DAMAGE" type = "MULTIPLY" value = "1.8 /> <- multiplies current damage by 1.8


<item name= "healthUpgrade target = "HP" type = "ADD" value = "50" /> <- adds 50 bonus 



the awesome thing is, if you can just add and multiply variables, you can subtract and divide them too! this system is crazy flexible and I'm using something similar to it. 

Hope this helps!

#4951727 Need Help : How to make buttons in SDL_opengl?

Posted by bollµ on 22 June 2012 - 07:14 AM

I'm pretty sure you're confusing some stuff up :)

1) SDL's default mode of rendering works by "blitting". Thus, you can use operations such as SDL_BlitSurface to render onto the screen.
2) OpenGL, DirectX, etc are all rendering API's that let you interface with the graphics card. They have their own rendering models. So you'll have to use functions provided by openGL. Using blitSurface, newSurface, and most other SDL related rendering functions *will not work* with openGL. this is why you're not able to see anything being rendered on the screen.
3) as for making buttons in SDL_openGL, you can either a) use a library such as GLUT(http://www.opengl.org/resources/libraries/glut/) or b) roll your own menu system. I'd suggest using GLUT if you're a beginner. (being quite new to this myself, it's helped me save loads of trouble :P)

some useful links: http://nehe.gamedev.net/ (outdated in some areas, but is still pretty solid)

hope this helps!
PS- I'm really sorry if I've messed up the terminology. I'm quite new to programming >.>;

#4945235 Your first game idea - What happened to it?

Posted by bollµ on 01 June 2012 - 01:40 AM

What was the idea:

The Idea was to create a RPG / hack n slash game with a fully customisable weapon system as well as "tons of enemies and combos"

How far did you get with it:

Created a bunch of enemies, created ~10 different weapons, and wrote an extensible XML based language to edit and create levels ,weapons, and even create new varieties of enemies. It was a kludgy mess since I'd just begun game programming at that time. Still, the (programmer) art was cute and the game was definitely playable.

How did that game idea evolve as it transitioned into reality or fell short of being completed.

the original ideas were still there, but I scaled down the system since I didn't have the programming skill to actually create a complete weapon modification system. Rather, It was changed to facilitate dual weapons and weapon upgrades.

What lessons did you learn on the way.

1)Making a game is hard 2) A physics engine does not magically solve all your problems 3) SDL is slow, so go with openGL aaaaand 4) C++ is slightly overrated as to "reducing complexity"

What would the game be, if you revisited the original idea now and built the game with your current ability/knowledge.:

The game would probably be the same. except with smoother animation and

a fully customisable weapon system. The XML thing would probably have been toned down, since the system I'd built was overkill.

#4928677 Box2D Help

Posted by bollµ on 05 April 2012 - 11:03 PM

Why not read the box2d documentation? It's got everything you need :)

http://www.iforce2d.net/b2dtut/ - this link may help you. It has in-depth explanation about pretty much everything you need related to box2d.


#4928466 {IMHO} RPG elements

Posted by bollµ on 05 April 2012 - 07:28 AM

I like lore more than story.

Story forces me to watch boring half an hour long cutscenes (go play soul eater).. But in most games, you have to search for lore OR you're allowed to read lore whenever you want. The 3 games whose story I found most compelling were Warcraft 3, Bastion and Limbo. Bastion because of the interesting narrator story progression. Warcraft because it made you care about the characters and the world (Azeroth). As for Limbo... it was a really wonderful and creepy experience.

One game whose story I did not understand was Braid. I'm not even sure if there is a story to it at all. Almost all other games have walked the fine line between a winding plot and sheer boredom, most notably Assasin's Creed IMO.

Lore allows one to read more about a game's universe without you having to bother about the storyline :)

As for tweaking, like to be able to tweak after the first two or three missions because that's when you figure out how you want to play the game. Bioshock did this very well, as did games such as Bastion. I don't like menus that popup before you start the game and force you to tweak, as Servant of the Lord stated.

So, yeah. Tweaking > Lore > Story for me, though others may disagree :)

#4928079 how to force global variable which define in a static library to initialize?

Posted by bollµ on 03 April 2012 - 08:35 PM

why not define it as a static in the header and then initialise in the source file using namespace::variable = value syntax?