I think that it is an error to believe that the only thing preventing a fully comercial-like release is a little bit of money, when in fact it is a LOT. I only can talk about the cost of hiring an above average programmer like myself, which in the country in which I live can get paid between 24000 to 40000 USD per year; but if you want to pay the bill of people with much more technical skills, someone like MK or other well know people around here whose abilities are way beyond programming, I suspect that the figure could easily be doubled. Maybe 80000 USD doesn’t sound like much in developed countries, but consider that, for example, in Canada a senior programmer (of casual games, not the big stuff) earned 4 times what I earned until 2010, at least that’s what my ex-employer used to say. If you add up the costs of hiring an artist and a sound technician, you can easily see that even a few months of work can be completely out of reach for this little community; and even then, you are leaving out fundamental positions like the game designer and the game producer, functions that may or may not be assumed by the other members of the team, but whose costs have to be accounted for in either case.
Now, here is the catch for me: I’ve spent months developing my engine without earning any money out of it (losing money in fact, since I don’t usually work during those months), and out of the pure pleasure that I get from doing it. But personally, I can do so because I don’t respond to anyone else, I don’t have to respect any time constraint and I don’t have to implement the requirements of anybody else (except KR1553’s lately, but that’s another story), and I enjoy writing generic code, which hypothetically could be used to program as many different kind of games as my abilities allow. I usually spend hours going through the code making changes to gain a little bit of performance here and there, refactoring code to make it more elegant, or just implementing some cool paradigm that i just happened to learn lately; all those activities are luxuries way out of most budgets. Add to it that I’m not really interested in programming any specific game; so, when you change those conditions, the picture is immediately different and if I “have to” program a specific game’s logic, the “out of the pure pleasure” mindset is put away and either I get paid as a professional programmer or I don’t take the now-real-job.
Different people would be able to tell their own take on the matter, their personal motivations for doing homebrew, and most likely the majority of them will have little to do with money.
PS: working in a whole middle-casual-sized game, even for 5 or 6 months, is very exhausting… and boring, so it is just normal that coders lose interest in completing it. For example: I’m not a game designer, so I don’t find engaging to design 90+ levels for a platformer game; for me it is enough to know, for sure, that a number of mechanics can be implemented after testing them all in two or three levels. So, different coders want to put their abilities to the test through different challenges, but after they’ve succeded once, what is the motivation to do it again and again?
Sigh… Facebook is buying Oculus Rift.
http://www.engadget.com/2014/03/25/facebook-oculus-vr-2-billion/
Yeah from a consumer perspective I prefer Sony’s solution too, I just can’t handle PC gaming anymore, tried it once and I ended up spending more time trying to get the games running at a smooth framerate without losing visual fidelity than playing them. I know I know, console gaming is far off from the perfect visual/smooth experience, but since you can’t tweak anything I just completely forget about that and just enjoy myself playing. But from a developer perspective I don’t see Sony allowing Indie access to their VR SDKs anytime soon, so I will eventually double dip if Morpheous catchs on, for now just want to make sure the Rift is a justified purchase.
I really envy you KR115E haha.
I’ve got the idea that it should be possible to create a strong sense of “decoupling” by using Kinect and Oculus Rift by reproducing your movements using the tracking capabilities of Kinect but not to place your “virtual head” over your “virtual body”, but instead to letting you see it from a 3rd point of view. There are already experiments using VR which make you feel you’re out of your body by feeding a stereoscopic video of yourself by moving a dual camera around, but I imagine that if you are given a task like a puzzle to solve by using in conjunction the visual and physical sensations, since you stop worrying about the simulation and have to concentrate in the task at hand, it could retrospectively create the illusion of some kind of onmipresence, just like when after you do any task you have the experience of having been conscious of all the sensitive stimulus (vision, hearing, etc.) regarding of not being paying attention to all of them at the same time.
I know that Kinect 1 has a lot of lag and may not work at all for what I envisioned, but I think that something like Move won’t suffice either, so I have to settle for Kinect 1 until the 2 is available for PC.
Solved:
http://www.planetvb.com/modules/newbb/viewtopic.php?topic_id=5252&post_id=27088#forumpost27088
Greg Stevens schrieb:
here is main and the incorrect function call which looks like __vbvectors_end+0x3f0311 since it went beyond the end of the linking area. I still don’t understand how it calculated a mirrored address correctly though.
That part led me to the solution of a problem related that I had which crashed the game when running on the VB. I was getting the same references in my assembler code (__vbvectors_end+0xXXXXXXX ), but after compiling gccvb 4 with the patches blitter provided in the following thread, the linker now outputs the right addresses for the relative jumps.
http://www.planetvb.com/modules/newbb/viewtopic.php?topic_id=5328&post_id=26112#forumpost26112
Using Rboy’s debugger I’ve made some sense of the memory status, and how the stack relates to the .bss section.
I have reduced the RAM footprint to 15612 bytes, but still it crashes on the real hardware.
The RAM dump doesn’t show anything strange.
- This reply was modified 10 years, 10 months ago by jorgeche.
Attachments:
Tauwasser wrote:
However, hardware reading should be on after reset. Maybe you forgot to enable interrupts at all? See the sei and cli commands.
cYa,
Tauwasser
Didn’t work, I’m using:
HW_REGS[SCR] &= ~(S_HWDIS | S_INTDIS);
HW_REGS[SCR] |= S_HW;
doesn’t S_INTDIS disables the interrupt?
BTW, I was reading the official development manual, and in page 4-4-10 it says:
“An interrupt will not be generated if a 1 is stored in bits 3-1”
The problem is that:
bit 1 = SGN, always 1 for standard controller according to the manual
bit 2 = A button
bit 3 = B button
so it will never trigger the interruption according to this, and even if it worked, I couldn’t use it to catch presses of A and B buttons, and the interrupt only triggers when bits 15-4 changes to 1, so a “keyUp” event wouldn’t work at all.
It looks like I will have to keep the old method, which on it’s own has it’s advantages since I don’t have to worry for other game’s logic being processed at the time of the button’s press.
Jorgeche
I’ve been able to trigger the call for vpu_hnd by setting the following:
VIP_REGS[INTENB]= RFBEND | LFBEND;
Still not sure if it makes sense to do rendering (mainly setting up WORLDS and affine tables), but at least it works.
Thanks KR155E, that works… but barely, if I do minuscule changes to the code it works, but as soon as I change more than a line of code it gets stuck at 25% with the WRITE ERROR message. Do you have experience using the Dev mode?
Glad to know that is the right behavior.
BTW: when using Dev mode in the loader do you need to pad the ROM first? It’s a lot faster, but think I only got it to work once or twice, so I’m not sure what is the right work flow to speed up testing since flashing with the padded ROM takes a lot more time, but right now it is the only way I can get the skeleton to work on the VB.
The problem was using the cable that came with FlashBoy, it still works with PC machines but not with my Macbook, indeed it never worked with it, that’s why I thought that the cart was broken since up until now I didn’t have a PC to try it again. But after reading bigmak’s suggestion I tried a spare cable that I have and it worked fine with both machines, it even works with VirtuaBox which is of great help too.
BTW: since I’m here, does it works for you when the cart is fully inserted in the VB? I must to remove it first from the VB before the loader recognizes it, is that the normal behavior?
Ha!, now I’m a little embarrassed :P.
Thanks a lot!.
Didn’t ever test it on hardware, it’s certainly buggy and as I said, only a conceptual pitch, it was never intended to be a fully game, so no justification to debug it, having it working in Reality Boy was enough.
Jorge
blitter wrote:
Was about to ask why you’re using M.K.’s patches instead of my gccvb4 package with additional fixes, but then I went to the thread where I linked to them and… the links are dead. Oops. 😛So… I took your changes and integrated them into my gccvb4 build package. Also modified the make script so that the GNU packages are downloaded with curl. Keeps the attachment size down and saves folks from having it all in one lump, in case they just want the patches.
I can build this successfully on my Mac OS X setup, but couldn’t get it to build in Cygwin or MinGW. I’ve been able to in the past, so it’s possible my Windows environment is busted, but maybe somebody else will have better luck.
Didn’t know about your fixes, and I’m not really sure what I did back then to fix those errors, I’m not really versed in assembly code, so I suppose that I studied the compiler’s files until I got with the problem and the solution for variadic calls and recursion. Indeed if you can check the part for variadic calls it would be great, it’s not really working by itself, apart from the fixes to the compiler’s files (which I honestly don’t remember what for was each line), I have to insert the following assembly code after my variadic calls:
// variadic function prototype
void Container_propagateEvent(Container this, int (*event)(Container this, va_list args), …);
// variadic call
Container_propagateEvent((Container)this->stage, Container_onKeyPressed, pressedKey));
// fix sp’s displacement
asm(“addi 20, sp, sp”);
I was able to compile GCCVB 4.2 after almost a week of try and error, but it’s possible, I’m using the latest version of Cygwin (haven’t ever used MinGC), and GCC 4.7.3. Oh, and Windows XP :P.
Jorge
Thanks, but I’m not really participating in the competition, just wanted to share the demo and maybe contribute with an idea for a game.
Jorge
Hi, long time since I’ve came to this site and post in the forums.
Jorgeche’s VbJaEngine – he made a Mario entry in one of the coding competitions using it. I think this was built to help people code on the VB.
It’s poorly documented. The programmer’s guide doesn’t explain much. And it’s much harder for beginners to use. In my opinion, basing a game on a giant engine isn’t such a great idea. Writing your own code gives you much less restrictions on the design of the game.
Just found you’re reference to my engine, indeed it’s not that well documented and is not beginner friendly at all, it implements some high programming concepts (OOP, variadic functions, memory management, etc.) which are not really for the hobbyist but for real programmers and to do so I had to came up with some custom idioms for it, and even more, it requires that you are already familiar with game programming and it’s core concepts (time based update, frame based update, state machines, sprite animation techniques, etc). It’s nothing revolutionary either, most of it’s architecture is based on my experience with successful engines like Playground, Unity 3D, Cocos 2D, and the custom game engine that I contributed to develop while I was working at Blue Lizard Games but shrunk down to fit in the VB. But even then I can be proud of a few sparks of good design in it, like the animation system (that I wrote before doing any gaming at all), which’s concept is something you will find in the official docs of one of the best seller video consoles of all time.
Now, I will try not to sound too harsh but your recommendation
of “just do it yourself” is not a very good one, having by now a few years of professional experience in the game industry (and even more in programming in general) you don’t just reinvent the wheel to be proud of yourself, it has to be meaningful ie: you want to learn the device’s architecture to the bones. But if you intend to really produce something that you want to release even as a free demo or whatever, you better start off with what already has been done, I myself (and no one who does programming) don’t go out to make a iOS game and rewrite all from scratch, I use some of the already available tools: Cocos 2D, Box2D, Corona, etc, usually written by someone who knows a little more than oneself. And my engine just tries to provide similar features to those of the mentioned engines, and by the time of it’s development there were none which did that on the VB.
It’s correct that an engine imposes you some restrictions to the way you design your games, but it’s a trade off, you will come with a very mediocre simulation racing game if you want to get that from the UDK for example but you may get it ready a lot faster than you will if you write from shaders to physics to ai to rendering to…. But if you what to do a FPS or a TPS you have a very good start with it, and even then it will impose you restrictions on what you can and cannot do.
That’s really the problem with the whole VB scene, and I’m not trying to make a promotional campaign for my engine now, there is already a lot of source code around here to begin with, the problem is that all video gamers believe that they are able to create their own game and believe that they are multifacetic enough to design it, program it, produce the assets for it, do the sound, do testing and at the end will come with the best and more content loaded game of the VB’s catalog, instead of trying to achieve something as a team or be more real and use this device as a medium to learn game programming. If you have the time for doing it all by yourself I say go for it, that would be a great achievement, but if you have to work or study like most of the people, you will have to get a little more real. Proof of this is that there is not a single homebrew game to this day which is content complete and is as complex as the officially published games. If you check my Mario demo it’s just a very short level, which took a long time to produce even with Krisse’s aid in the assets department. Or other project while more polished that mines, are not new ideas so no design effort there.
To resume, if you want to learn a little, do it yourself; if you really want to learn or achieve something to share, grab the tools that are already available, learn them even if they are hard and get enough people to make it happen, no way around it no matter what you’re opinion on the subject might be. Oh, and documentation will get you only so far, go check Playground’s documentation, Cocos2d’s, even Unity 3d’s which is really good by the way and it won’t allow you to build anything by just reading it, you will have sooner or later to go deep into the code, and if it’s written clearly enough with good coding standards and meaningful comments, that will teach you more than any documentation about how to use a library of any kind, and as a matter of fact I think that my engines is written that way.
jorgeche
Hi guys, DanB I have a generic solution for this kind of stuff in my engine, you just need to grab the following classes:
MemoryPool: which does exactly the same as DogP says, that is to allocate static arrays of memory, but it’s generic so you can just ask it to allocate/deallocate space for your data no matter what kind of.
VirtualList: it’s a generic list like that in stl (with some limitations) and uses void* pointers to hold any kind of data.
I wrote to David T. a while ago asking about malloc/free and he told me that to activate it in the compiler it would be mandatory to reserve 32KB from the 64KB of work RAM for the heap, so it’s completely impractical.
BTW, I have newer versions of those classes which I have not released yet, if any one is interested in them just PM me :-).
jorgeche
Almost fixed it, the correct __save_r6_r9 looks like this:
__save_r6_r9:
addi -20,sp,sp
mov r31, r1
mov r10, r31
st.w r6,0[sp]
st.w r7,4[sp]
st.w r8,8[sp]
st.w r9,12[sp]
st.w r10,16[sp]
jmp [r1]
To make the compiler generate the “mov lp, r10” intruction was necessary to edit the file v810.md and change the following line:
“jal __save_r6_r9”
to
“mov r31,r10\;jal __save_r6_r9”
This way the return address is properly saved and retrieved.
One last problem, depending on the number of arguments passed to the function, the compiler moves up the stack pointer, but after returning from the variadic function it doesn’t move down the stack pointer by the same amount:
07002aaa <_level_onkeypressed>:
7002aaa: 63 a4 d0 ff addi -48, sp, sp
7002aae: e3 df 2c 00 st.w lp, 44[sp]
7002ab2: 27 01 mov r7, r9
.
.
.
/* variadic function call next */
7002ade: ff af 2c e5 jal 700100a <_container_propagateevent>
/* notice that the stack should be moved down by 48, not 28 */
7002ae6: 63 a4 1c 00 addi 28, sp, sp
7002aea: 00 a8 0e 94 jr 700bef8 <__return_r31>
The quick solution is to place the instruction:
asm(“addi 20, sp, sp”);
inmediately after the variadic function call but it’s a burden to remember to do so everytime. I’m not sure if I’m capable to track this bug since it appears to go way beyond the variadic function problem into more generic compiler parsing code.
PD: attached are the fixed files which go in gcc-2.95.2\gcc\config\v810
PD2: the v810.md appears to be very sensible to modification, if the one attached gives you problems when compiling, you will have to edit it manually using a *NIX editor (don´t edit with Windows applications).
jorgeche
I’ve partially fixed it, the save stack frame code looks like this:
__save_r6_r9:
mov r31, r1
mov r10, r31
st.w r6,0[sp]
st.w r7,4[sp]
st.w r8,8[sp]
st.w r9,12[sp]
jmp [r1]
and the return code is:
__return_r31:
ld.w 16[sp],r31
addi 20,sp,sp
jmp [r31]
now the problem seems to be that some registers are pushed into the stack, but the stack is not being displaced the necessary amount of bytes, which the return function is assuming to have been displaced (addi 20,sp,sp). Second, return_31 is trying to retrieve the return address from 16[sp], but it was not saved in save_r6_r9.
So I modified the save_r6_r9 to look like this:
__save_r6_r9:
addi -20,sp,sp /* added line */
mov r31, r1
mov r10, r31
st.w r6,0[sp]
st.w r7,4[sp]
st.w r8,8[sp]
st.w r9,12[sp]
st.w r10,16[sp] /* added line */
jmp [r1]
After testing it, everything seems to work fine, except for one last problem:
Every time that there is a jal instruction, the lp register gets the return address, but when entering the variadic function called, there is a new jal instruction to jump to save_r6_r9, and so, the value of lp is lost.
In other normal functions, the compiler always places the following instruction after a jal cal:
mov lp, r10
so the return address is saved in r10 which is then pushed into the stack.
The problem is that the compiler does not place that instruction as the first instruction of a variadic function:
07000ff6 <_container_propagateevent>:
/* here should go the mov lp, r10 instruction */
7000ff6: 00 ac 6e b0 jal 700c064 <__save_r6_r9>
/* now return address (lp value) is lost */
I haven’t figured out where and how the compiler decides to place or not that instruction, so I’m hacking the code right now using the following:
asm(“movhi 1792, r0, r10”);
asm(“movea 11350, r10, r10”);
/* then call my variadic function */
Container_propagateEvent((Container)this->stage, Container_onKeyPressed, pressedKey);
obviously burning the return address into r10 doesn’t make any sense, it’s just there to test that the save_r6_s9 fix really works, so the question is: anyone knows how can I get the current execution address? is there any way to access the PC (Program counter register)?, since I can’t find it’s name for asm nomenclature.
jorgeche
- This reply was modified 15 years, 4 months ago by jorgeche.