Ask him about it and why exactly can't you use default arguments.
[QUOTE=Isaac96;48751680]Looks like a really cool game but i cant stand the low res "realistic" textures and conflicting fonts.[/QUOTE]
Please tell me more about this. What about realistic textures and conflicting fonts? I appreciate it.
Anybody have any tips for using C++ constructor initializer lists? I understand the benefit and purpose to using them over just assigning variables in the constructor, but I'm trying to just make my constructors not look like a mess.
[QUOTE=proboardslol;48747550]1. It's easier to browse with an interface designed for the mobile. Text is too small for mobile devices. Sure it works exactly as it does on desktop but you have to do a lot of zooming in
2. There are a lot of ways to attack the problem. You can use the rss feed, you can use DOM methods to scrape the website for posts (surprisingly easy, though tedious), you can use benbb's ruby API or you can develop your own API. Most of these options are quite simple and thus it makes it a good exercise in mobile/app/web development for beginners.
However, implementing a login system for facepunch is beyond me. That'd be hard[/QUOTE]
It's really not hard, my app just uses HTTP requests to log in and store cookies just like your browser, then parses responses for the necessary information and inflates native elements as needed. I'll put the app on GitHub when I get home tonight, the app is functional, just lacking good post parsing and right now I'm too busy with school and my enterprise app to justify working on it. If someone can implement avatars, quotes and maybe images, it'd be done.
-snipe-
I also need to add a workaround so loading stuff doesn't fail when CloudFire does their browser checking, but that's pretty simple.
[QUOTE=Profanwolf;48752255]Once you get into the constructor body, everything in the object will already have been default initialized, you need them to get to the stage where the actual initilization occurs, before the body itself.[/QUOTE]
I know that, I meant what is a nicer way to format the lists, I guess. Most people seem to do it like this:
[code]
MyClass::MyClass() :
m_var(5),
m_var2(10),
_var3(5555) {
// constructor body
}
[/code]
Is there a cleaner way of doing it?
[QUOTE=Duskling;48752277]I know that, I meant what is a nicer way to format the lists, I guess. Most people seem to do it like this:
[code]
MyClass::MyClass() :
m_var(5),
m_var2(10),
_var3(5555) {
// constructor body
}
[/code]
Is there a cleaner way of doing it?[/QUOTE]
I tend to indent like this:
[code]
MyClass::MyClass() :
m_var(5),
m_var2(10),
_var3(5555)
{
// constructor body
}
[/code]
You can also put variables that belong together on the same line if you don't want them to take up so much vertical space, for instance.
That's really the only difference from how you do it (the indentation for each item).
[QUOTE=Fourier;48751997]Please tell me more about this. What about realistic textures and conflicting fonts? I appreciate it.[/QUOTE]
the wall texture is blurry as hell
and so are some of the UI elements, and the font rendering doesn't look very good either
gotta make shit crisp as fuck dude
besides that the game just isn't very visually appealing. it looks unfinished, and you don't have any kind of nice color scheme going. Having the camera clip outside the level into the skybox itself looks really, really unprofessional, and I have no idea why you'd put that in the screenshots on the page.
And the logo just looks like a smiley from one of those old virusy smiley packs that you used to see ads for on newgrounds in 2006. It doesn't look appealing or interesting, it looks more like something I'd scroll past because it looks like a quick cash-grab
basically i'm sure the game is fine but it needs a visual overhaul led by somebody with a good sense of aesthetics. an art director, perhaps
I have been writing a small command line program to read and write serial data to an Arduino. Although you can use the Ardunio IDE's built in serial monitor I wanted to add some more features (sending data to other programs, writing data to a file, read/write delays, timeouts, etc.).
[IMG]http://i.imgur.com/jcNYqQE.png[/IMG]
[media]https://youtu.be/wk_SJ3vf498[/media]
I'm working on a RPG. Nothing fancy, not even gonna use graphics :v: But i was wondering.
At the moment, i'm just reading everything (skills, races and whatnot) from disk into memory. Would this be a good idea? Even with large amounts of them? Or would it be better to look up and read from the file every time it's needed.
On sorta the same note. Say a player equips a helmet. Store a id? Or just an object with everything?
[QUOTE=Arxae;48755080]I'm working on a RPG. Nothing fancy, not even gonna use graphics :v: But i was wondering.
At the moment, i'm just reading everything (skills, races and whatnot) from disk into memory. Would this be a good idea? Even with large amounts of them? Or would it be better to look up and read from the file every time it's needed.
On sorta the same note. Say a player equips a helmet. Store a id? Or just an object with everything?[/QUOTE]
You mean you're loading EVERYTHING into the program at once? I imagine that must require quite a bit of data structures. Where are you storing these? an array?
I personally would keep everything in its own relevant file, then when the game starts, load more permanent things like inventory or skills into some permanent data structure so that you don't have to re-open a file every time you check your inventory. But with things like levels, I'd load a big area into memory but leave the entire globe as a file. It really depends on how big of a game you've got; lots of levels, huge expansive world? Do what I said. Small, zork-like text adventure? Whatever just have it all in memory, it's tiny
[QUOTE=Arxae;48755080]At the moment, i'm just reading everything (skills, races and whatnot) from disk into memory. Would this be a good idea? Even with large amounts of them? Or would it be better to look up and read from the file every time it's needed.[/QUOTE]
How large are we talking about? Kilobytes? Megabytes? ... Gigabytes?
[QUOTE=Fourier;48750376]So I and my team have released Jenkem:
[IMG]https://lh3.googleusercontent.com/ImkVIet-v_M1Hv_EWDs-WnytEaWjfP2wpuVk7WkT2yCg1hVA9jBbiYHNkEJuvjY2yp0=w300-rw[/IMG]
[url]https://play.google.com/store/apps/details?id=com.CenturexInc.Jenkem&hl=en[/url]
I hope you like it, it's addictive as fuck.[/QUOTE]
Isn't Jenkem where you let human feces and urine ferment under the sun in a sealed bottle and then inhale it and get REALLY high?
[QUOTE=geel9;48755328]Isn't Jenkem where you let human feces and urine ferment under the sun in a sealed bottle and then inhale it and get REALLY high?[/QUOTE]
:nope:
Also, why is a fixed time step bad?
[QUOTE=false prophet;48755772]:nope:
Also, why is a fixed time step bad?[/QUOTE]
Means physics aren't time dependent but frame dependent, i.e the reason space invaders speeds up at the end.
[QUOTE=DoctorSalt;48755790]Means physics aren't time dependent but frame dependent, i.e the reason space invaders speeds up at the end.[/QUOTE]
You got it backwards!
[QUOTE=Rocket;48755175]Memory is nothing these days. If you end up using up too much memory with your game data (which would probably be very, very difficult), it'll just get paged to disk anyways.[/QUOTE]
Unless you turn the page file off, then things just start crashing.
Anyone looking for a spritesheet generator? There are some free ones out there, but they're, err, fairly bad. I haven't found a free one that outputs an optimized spritesheet (i.e. minimizing wasted space) and supports easily configurable output templates. So, I decided to write one: [url]https://github.com/agopshi/spritesheet-tool[/url]
Basically, you run it like this:
[code]node spritesheet -n Example -t templates/cpp/template.h -t templates/cpp/template.cpp example/*.png[/code]
And it spits out a well packed spritesheet in addition to the templates:
[cpp]
#ifndef SPRITESHEET_EXAMPLE_H
#define SPRITESHEET_EXAMPLE_H
namespace Graphics
{
namespace SpriteSheets
{
struct Sprite
{
const char* FileName;
uint16_t X;
uint16_t Y;
uint16_t W;
uint16_t H;
};
namespace Example
{
enum {
WIDTH = 404,
HEIGHT = 380
};
extern const char* FILE_NAME;
extern const Sprite SPRITES[9];
}
}
}
#endif
[/cpp]
[cpp]
#include "template.h"
namespace Graphics
{
namespace SpriteSheets
{
namespace Example
{
const char* FILE_NAME = "output.png";
const Sprite SPRITES[9] = {
{
"example/foo.png",
202,
171,
101,
121
},
/* ... */
};
}
}
}
[/cpp]
The templates are dynamic, so you could write one for C#, Java, XML, JSON, whatever you want.
Anyone have a bunch of differently sized icons that they wanna test this with? I don't have any free icons to post an example of.
[editline]25th September 2015[/editline]
Also, if you hate JavaScript, be sure to take a look at the source. It'll make you tear your eyes out :v:
[img]http://i.imgur.com/ipjgPVX.gif[/img]
been working on the player, i've added some simple idle animations when left still
[img]http://i.imgur.com/rGePksp.gif[/img]
i've also added a charge attack, which does more damage the longer you charge, still need to make special effects for it though
that white flash while charging took me like two hours trying to learn opengl shaders
Haven't touched Unlimited Golf except to resubmit it for Windows Phone Certification. I still need to actually test the XAP file on a Windows Phone too or at least an emulator. Been busy with school and whatnot and have been having a blast with my recent class projects. We've been using Java with Processing graphics library. Did a unit on randomization and then physics and vectors and remade Asteroids in it. Past two days I had some free time and wanted to try to make a parkour character controller in Unity. I had accomplished something similar in GMOD just using tons of raycasts and booleans, this one is coming along decent. Now its way more box colliders and booleans ha. Been a lot of fun to work on as well.
[b]Sweet sexy sax sounds warning! Sweet sexy sax sounds warning! Sweet sexy sax sounds warning! [/b]
[vid]http://webm.host/20bae/vid.webm[/vid]
I wall jumped at the end but somehow managed to screw up the grab which was very disappointing. Still need to implement rolling, fix grabbing, maybe actual vaulting. Right now you can just do a swift crouch jump over most waist height obstacles which is actually kinda fun.
[QUOTE=MadPro119;48756307]Haven't touched Unlimited Golf except to resubmit it for Windows Phone Certification. I still need to actually test the XAP file on a Windows Phone too or at least an emulator. Been busy with school and whatnot and have been having a blast with my recent class projects. We've been using Java with Processing graphics library. Did a unit on randomization and then physics and vectors and remade Asteroids in it. Past two days I had some free time and wanted to try to make a parkour character controller in Unity. I had accomplished something similar in GMOD just using tons of raycasts and booleans, this one is coming along decent. Now its way more box colliders and booleans ha. Been a lot of fun to work on as well.
[b]Sweet sexy sax sounds warning! Sweet sexy sax sounds warning! Sweet sexy sax sounds warning! [/b]
[vid]http://webm.host/20bae/vid.webm[/vid]
I wall jumped at the end but somehow managed to screw up the grab which was very disappointing. Still need to implement rolling, fix grabbing, maybe actual vaulting. Right now you can just do a swift crouch jump over most waist height obstacles which is actually kinda fun.[/QUOTE]
Ooooh, what's the song?
[QUOTE=Duskling;48756367]Ooooh, what's the song?[/QUOTE]
Cabin Sessions by GRiZ. The album came out this month and the whole thing is great.
[QUOTE=No_0ne;48756297][img]http://i.imgur.com/ipjgPVX.gif[/img]
been working on the player, i've added some simple idle animations when left still
[img]http://i.imgur.com/rGePksp.gif[/img]
i've also added a charge attack, which does more damage the longer you charge, still need to make special effects for it though
that white flash while charging took me like two hours trying to learn opengl shaders[/QUOTE]
Is this on GitHub or something? What is this written in again? I've loved every single progress update.
Some backstory to this: I've never been happy with the turret code I wrote years ago so over the past week I've been trying to write something better and faster. Unfortunately every clever idea I was able to come up with was markedly slower (and more complex) than my original code. My last attempt I was so sure it would work miles better, but it was actually more than twice as slow.
I refuse to believe that I'm smart enough to have accidentally stumbled upon the most efficient and bestest turret code a year ago, but damn I just can't beat it no matter what tricks I try. Lesson learned: If you can use the built in Quaternions functions to do your rotations, just do it. Transform.Rotate a shit. In order for Transform.Rotate to work, it needs to do a bunch of conversions to and from Euler, which is much slower compared to using Quaternions directly.
So whatever, I give up trying to write more efficient turret code than the code I wrote over a year ago. I'm just going to use my old code again.
However, the way I check if something is on the turret traverse limits is something I can port over to my old code and will apply to targeting later on. I was also able to port over the code that makes the turret smartly point towards targets that pass behind it.
[vid]https://dl.dropboxusercontent.com/u/15133164/UnityGeneral/Unity%202015-09-24%2022-54-29-50.webm[/vid]
[QUOTE=mutated;48756788]Is this on GitHub or something? What is this written in again? I've loved every single progress update.[/QUOTE]
it's C++ with SFML. it's not on github, it probably wont be unless i'm unable to continue working on it for whatever reason.
it's held together with duct tape and prayer anyways
[QUOTE=Tamschi;48751167]Please don't.
If you just program a little carefully a dynamic one gives you both better performance and undoes any framerate locks imposed by that part of the program.
The only issue I'd consider a fixed one advantageous for is if you want to use lockstep networking, but the standards are too fuzzy to guarantee determinism across different machines afaik so that would only work reliably with all-fixed-point numbers.[/QUOTE]
Since this seems more controversial than I though, I'll go into (a little) more detail regarding where the methods differ for the end user:
- framerate dips:
The most noticeable issue are when the device a game runs on can (temporarily) not keep up with the target framerate.
fixed time step: The game slows down, messing up the timing of player actions.
dynamic time step: Some visual detail is lost, but the flow continues unhindered to a point. (A time step should be capped to something like 1/10th of a second so hangs can't cause glitches or lock the player into an input state [I]if[/I] they happen.)
- minimal system requirements:
If the system consistently can only provide a framerate below the one the game is developed for, it can degrade the experience.
fixed time step: Requires some additional configuration and can't use all available resources without time slowing down or speeding up. (worst case: the game can run consistently slower if programmed badly)
dynamic time step: The game will run at the intended speed and use the available resources to reach the highest framerate possible at any time.
- more powerful systems:
fixed time step: The game can't easily be rendered 1.5 times as often, especially when 1 frame = 1 update. If updates happen more often there's still granularity that causes stutters with v-sync without an exact framerate match. It's possible for the player to configure it manually or to somewhat reliably detect any necessary options, if most of the code would work with a dynamic time step.
dynamic time step: If a computer can render a game 1.5 times as often as normally that's fully automatic.
There are a few exceptions of course. In fighting games you can't use a dynamic timestep because the accuracy of user input and animations are extremely important. These games are usually balanced around that aspect.
If your game is traditionally animated, then the art provides a framerate that can't be deviated from because no correct output exists for the time in-between.
However, in those cases you can simply take a dynamically timed framework and input a constant time step centrally, which will then lead to correct results there with the characteristics of a normal fixed time step program.
In any case you need to cap your game so it doesn't run faster than the results can be displayed on screen, or you'll waste a lot of electricity.
This too is easier with a dynamic system since for example Windows seems to reduce the refresh rate of windows that aren't in focus which can happen at any time.
(If the game is completely hidden/minimised you can detect that through window messages and enter power saving mode. You can do the same if you temporarily lose your graphics context (which [I]can[/I] happen e.g. if the driver crashes).)
If your game algorithm is stable enough you could go down to one update every ten seconds while the user isn't looking at it.
A player may also prefer a lower fixed framerate over one that's possibly not constant, which they can still easily choose with good efficiency if the timestep is internally dynamic.
The one instance where it's reasonable to use a fixed timestep for performance is if you have a lot of complex animation but no blending (which is common in Japanese games locked to 30fps I think).
In that case you can cache and/or load all final animation frames from disk and play them back with very little processing. However, this for the most part only applies to 3D (since 2D animation is [I]much[/I] cheaper) and even then somewhat modern computers should easily handle a good amount of characters (especially considering you can thread this without much difficulty).
A "fixed timestep program" is a little bit less work to type out too (due to shorter formulas when done improperly), but hopefully that's not relevant for anyone here.
As an aside: The possibly most egregious example of fixed timestep I've seen so far is in [I]Alice: Madness Returns[/I].
Certain parts of the game engine assume [I]~5fps with no interpolation[/I] and will always stutter due to that. The most noticeable is probably the cursor in rhythm minigames, but most menus also seem to suffer from (something) like this.
I decided I don't know how to variable time step correctly, so instead I went with fixed.
[vid]http://anotherprophecy.com/webm/timesteps.webm[/vid]
I uh.. got bored with the animation half way through...
It's easy. All you have to do is multiply your frame-dependent movements by your delta time (and raise all your values by 100x or so).
Sorry, you need to Log In to post a reply to this thread.