Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411278 Posts in 69323 Topics- by 58380 Members - Latest Member: bob1029

March 28, 2024, 01:20:35 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)The grumpy old programmer room
Pages: 1 ... 190 191 [192] 193 194 ... 295
Print
Author Topic: The grumpy old programmer room  (Read 733282 times)
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #3820 on: December 29, 2012, 04:35:30 AM »

i think i might have gotten sharpdevelop mixed up with resharper

I'll have to give sharpdevelop a try
Logged

d
Level 0
***


View Profile
« Reply #3821 on: December 30, 2012, 02:32:53 PM »

yeah such a thing, preferably in a same sort of accordeon/tree thingie like the solution explorer. but helas in vs2010 there is no \view-> Class View

..



For life.
Logged
Muz
Level 10
*****


View Profile
« Reply #3822 on: December 30, 2012, 08:39:20 PM »

Sometimes I wonder why I bother with learning optimizations. It's usually unnoticeable except on the 15% of hardware that gets phased out in 2 years anyway. And when it is optimized, it's rarely the bottleneck.

But when it's just so much easier to get a fire alarm than put out a fire when it happens, you tend to get the fire alarm anyway, just to feel good. Even though you never expect to use it. And it kinda looks cool, even though nobody else sees it.

Not really a grumpy programmer thing, but there's no 'ambivalent programmer' thread.
Logged
Schrompf
Level 9
****

C++ professional, game dev sparetime


View Profile WWW
« Reply #3823 on: December 31, 2012, 05:40:28 AM »

If I may be your aide: start profiling, then optimize. Stop wasting your time Gentleman
Logged

Snake World, multiplayer worm eats stuff and grows DevLog
Sergi
Level 1
*



View Profile WWW
« Reply #3824 on: December 31, 2012, 06:29:41 AM »

Not really a grumpy programmer thing, but there's no 'ambivalent programmer' thread.

Maybe no one cared enough to create it?  Wink
Logged

Gord
Level 0
**



View Profile WWW
« Reply #3825 on: December 31, 2012, 09:40:23 AM »

I don't know how many of you use Game Maker, or Game Maker Studio, but I was feeling especially grumpy today, and wrote a long GM rant in the suggestion section of the GM Forums.
(Cross posted from: http://gmc.yoyogames.com/index.php?showtopic=565589)

Let me warn you; this post contains much rant, however, it adequately sums up my growing distaste for GM:S. Also, don’t expect coherence between paragraphs.


Yoyo, why can’t I have more than one project open at a time? It is so absolutely frustrating trying to switch between multiple projects, even more so with the horrendously slow and terrifyingly unusable file selection amalgamation you’ve got.
Just, let me open more than one instance of GM:S, please.

edit: (applies only to steam version)
Apparently, running a debug version of the game is worth an Achievement, as too is adding a room. Seriously? I've never in my life heard of an IDE giving achievements, let alone for the most mundane and trivial actions.

The new theme (gmHTML?) is.. interesting, to say the least. (And don’t you dare try and say ‘but you can change the theme!’ because that functionality is near useless and only aids in making GM look even more abhorrent.)
I’ve been using GM since version 5.1, and as the new versions came, the UI got better, and better, and more useable (My favorite being GM7/GM8). When GM8.1 came out, the improvements to the room editor were a nice touch, and overall, I only had a few gripes with it.
Maybe it was just the change of scenery, but with GM:S, I can’t help but feel something happened, something very, very terrible; I started to notice things. To be more precise, I started to notice, more things. This new, dark theme is so, lackluster.
Now, I can propose YoyoGames’ thinking behind it; Unity, Photoshop, and multiple other high end programs have taken on the dark theme as a sort of, badge of quality, and Yoyo felt they needed to emulate it. Well, it failed. Why, you ask? Because the combination of the layout, the icons, the god awful start/file selection make it look entirely juvenile. And no, I don’t mean, “This software can be used by juveniles!” I mean, “This software was designed by juveniles!”

Look, if you’re going to redesign your UI for whatever reason, please, just hire someone who knows what they’re doing. I mean that most sincerely too, it’s really a shame how far visually GM has degraded. So, as a condolence, I’m offering my own UI and product design services to you Yoyo, for free. Please, please do something about this, my eyes will thank you.

I’ve always had gripes with the way GM handles the windows for objects, sounds, sprites, etc, because it always seemed so, cumbersome. Let me explain,
What we have: the ability to open 1 code editor/sprite viewer/sprite editor/script editor at a time.
What I want: the ability to open multiple code editors/sprite viewers/sprite editors/script editors at a time.
Switching between the windows, or having to close the currently open code window just to edit one pixel on a sprite can get excruciatingly annoying after a while. Trying to copy some RGB color values from a sprite becomes physically tiring, as I have to navigate to the first level of windows and back just for 3 numbers. Let me switch between code windows with a tab (at the very least) or something, I shouldn’t need to close the window, find the object window, open the code window, and repeat, just to copy a line of text. And seeing as I spend 90% of my time in GM coding, it’s become one of the most frustrating things.

This is more, ‘out there’ as they say, but please, add another event to objects, “Global”. What do I mean by this? I mean, let me put all of my create, step, alarm, draw code, in the same code block, why? Because It’s good practice, and nearly every advanced language gives you the option of using and defining classes and functions inside a single script. If you’re aware of OOP coding, you’ll understand, if you’re not, here’s a pseudocode example:

Code:
define object Player {
x = 0;
y = 0;
hp = 1;
name = NULL;
sprite_index = NULL;
sprite_subimage = 0;

function func1(arg0) {
name = arg0;
}
function func2(arg0) {
hp = arg0;
}
function func3(arg0,arg1) {
sprite_index = arg0;
sprite_subimage = arg1;
}

}

define image Sprite {
width = 0;
height = 0;
origin_x = 0;
origin_y = 0;
source = NULL;
frames = 0;
sprite_speed = 30;

function loadImage(arg0,arg1) {
source = arg0;
frames = arg1;
}
}

event Create {

ob_character = new Player {args(
x => 32,
y => 32,
)};

sp_character = new Sprite;
sp_character.loadImage(“img/player.gif”,12);

ob_character.func1(“Dart”).func2(100).func3(sp_donkey,0).setSpriteSpeed(15).setSpriteOrigin(16,16);

}

event Step {

ob_character.x = (ob_character.x + 1) mod room_width;

}

event Draw {

ob_character.draw();
}

This allows me to keep all of my data in the most important place it should be; accessibly in front of me. On the topic of pseudocode, the current implementation of instance_create(x,y,obj) is such a pain to use. Let me set some initial variables when I call the script without having use “with (object)” or a = instance_create, because they both require I rewrite all the variables out, even if they’re unchanged from the inherited event.


The “Advanced” setting, should be exactly that, advanced. Timelines and fonts; seriously? How about a deeper view, with more emphasis on the IDE. I don’t use Drag n’ Drop, and I thought choosing “Advanced” would acknowledge that, but alas; it did not, and is no more advanced than a stick to a twig.

Suggestion: Allow the customization of the view, or, give us the option to enable a real advanced setting, for those who spend more time coding, with a much larger emphasis on an IDE. This is probably my most important point, I want to be using a professional program, heck, I just want to feel like I’m using a professional program; but GM:S cannot even deliver on that. Focus more on what GM:S should be, an Integrated Development Environment. I know I’m just one of those “smelly, basement-dwelling programmer things” but at least give me some dignity.

3D Graphics. I know GM is primarily a 2D development environment, but you added 3D support, so don’t cop out on it, there are only 3 things I want, just 3. 1, Shaders. 2, 3D Room Editor (with defined objects having a simple 3D bounding box). 3, Access to vertices of models, or even better, support for .obj and animated bones/models.


I know this may all sound fairly, negative, and while that was my initial intention, I want to make it clear; GM has always had a lot of potential, even more so now, but it’s buried beneath a layer of terrible usability, lackluster design, and frustrating quirks.

If anyone from YoyoGames is reading this, please, do yourself and your customers a favor, and hire a professional software designer (As I said before, I’d be willing to do it for free). Usability and functionality are far more important and valuable than any theme, or any petty update. If professionals can’t properly use your program, then you’ve done them a disservice by taking their money.
Logged

Code_Assassin
Level 5
*****


freedom


View Profile
« Reply #3826 on: January 01, 2013, 03:48:47 PM »

abdshjasdbhj I can't friking understand how to code portals in Game Maker... ajkhdssadh might take at least another 3 hours ; A ;
Logged
ink.inc
Guest
« Reply #3827 on: January 01, 2013, 03:53:23 PM »

when the player comes into contact with a portal, just change its x and y coordinates to the desired location


//portal code)
if (place_meeting(x,y,oPlayer)==true)
   {
   oPlayer.x=1000
   oPlayer.y=1000
   }
Logged
Code_Assassin
Level 5
*****


freedom


View Profile
« Reply #3828 on: January 01, 2013, 05:19:52 PM »

that's an easier way to do it. The way I wanted my portals to be were like this:

Two portals both correspond with each other. If I go through Portal # 1 it Will Bring Me To Portal #2 if I go through Portal #2 It Will bring me to Portal #1.

:\ That's what I can't get my head around.
Logged
ink.inc
Guest
« Reply #3829 on: January 01, 2013, 06:15:58 PM »

dum its just the same thing but twice

//code for player

if place_meeting(x,y,oPortal1)==true
{
x=oPortal2.x
y=oPortal2.y
}
else if place_meeting(x,y,oPortal2)==true
{
x=oPortal1.x
y=oPortal1.y
}

then you'll want to implement a check that prevents the player from moving through a portal if they just came through it so that they don't constantly warp back and forth between the two
Logged
Code_Assassin
Level 5
*****


freedom


View Profile
« Reply #3830 on: January 01, 2013, 08:43:27 PM »

Code:
with(obj_portal)
{
    if(ACTIVATED = false)
    {

            if(PORTAL_ID = obj_portal.PORTAL_ID && PORTAL_NUM = 1)
            {
             
                portalTwoX = obj_portal.x;
                  portalTwoY = obj_portal.y; 
                obj_player.x = portalTwoX;
                obj_player.y = portalTwoY;
                  ACTIVATED = true
                alarm[0] = 60
            }
            if(PORTAL_ID= obj_portal.PORTAL_ID  && PORTAL_NUM = 2)
            {
                  ACTIVATED = true
                  //obj_player.y = obj_portal.portalOneY;
                  //obj_player.x = obj_portal.portalOneX;
                  portalOneY = obj_portal.x;
                  portalOneX= obj_portal.y;
                  obj_player.x = portalOneX;
                obj_player.y = portalOneY;
                alarm[0] = 60
            }
        }
}
@JohnSandoval I don't want to create two objects - just one.

portalOneX and portalOneY are both set to x and y in the objects creation event.
So the first portal teleports the player to the 2nd portal under the PORTAL_ID of 1 Then has a cool down rate of 2 seconds(for both portals). When I try to go in the second portal it just tp's me back to portal #2.

I'm not too familiar with GML. But what I'm trying to do is loop through all the instances of the portal in the room then using something like "this.obj_portal" to the instance I am currently looping through. Not even sure if that makes sense. I'm probably doing it wrong though. Help is appreciated   Shrug
Logged
d
Level 0
***


View Profile
« Reply #3831 on: January 02, 2013, 12:22:06 PM »

I love it when I leave myself comments like this:

Code:
// TODO these are actually slightly wrong, we need to incorporate the angle to get a proper distance
// or do we?
Logged
ThemsAllTook
Administrator
Level 10
******



View Profile WWW
« Reply #3832 on: January 02, 2013, 01:01:33 PM »

I love it when I leave myself comments like this:

Code:
// TODO these are actually slightly wrong, we need to incorporate the angle to get a proper distance
// or do we?

Hah, happens to me all the time. I often overestimate my future self's ability to remember what I was thinking when I wrote something.
Logged

powly
Level 4
****



View Profile WWW
« Reply #3833 on: January 02, 2013, 03:54:21 PM »

"Nah, it's so obvious, how could I forget?"
Logged
Code_Assassin
Level 5
*****


freedom


View Profile
« Reply #3834 on: January 02, 2013, 04:37:29 PM »

Code:
PORTAL_ID = 1

with(obj_portal_exit)
{
if(other.PORTAL_ID = PORTAL_ID)
{
   other.portalTwoX = portalOneX;
    other.portalTwoY = portalOneY;
    }
}

So I got the teleporting to work it's just when I try to add other entrance portals I get errors. An entrance portal must have an exit portal and you group the two together via creation code(when your placing objects in the room).

So I this error get's thrown to me:


___________________________________________
FATAL ERROR in
action number 1
of Create Event
for object obj_portal:

Code:
############################################################################################
VMError!! Occurred - Push :: Execution Error - Variable Get -6.PORTAL_ID(100038, 0)
 at gml_Object_obj_portal_Create_0 (line 9) - if(other.PORTAL_ID = PORTAL_ID)
############################################################################################

and I have no idea what to do. I thought I already had created a PORTAL ID variable :/

Logged
QuadrupleA
Level 2
**



View Profile WWW
« Reply #3835 on: January 02, 2013, 06:17:38 PM »

Working on really big new pieces of a program can be a drag; been designing/architecting a flexible editor system for my engine that can load game objects & components from files, and do live tweaks of any exposed properties. It's gonna be a massive timesaver once it's built I think, but it's been a week of somewhat tedious planning and UI design without any actual code written. Definitely harder to keep pushing forward when you don't get the nice signs of progress you get when you're writing code.

Anyway I think I've simplified and streamlined it as much as I can, so time to finally get to the good part...
Logged

Weapon Hacker - roguelite metroidvania;
Battleship Solitaire - mindless podcast companion
RalenHlaalo
Level 0
***



View Profile WWW
« Reply #3836 on: January 03, 2013, 05:19:41 AM »

Working on really big new pieces of a program can be a drag; been designing/architecting a flexible editor system for my engine that can load game objects & components from files, and do live tweaks of any exposed properties. It's gonna be a massive timesaver once it's built I think, but it's been a week of somewhat tedious planning and UI design without any actual code written. Definitely harder to keep pushing forward when you don't get the nice signs of progress you get when you're writing code.

Anyway I think I've simplified and streamlined it as much as I can, so time to finally get to the good part...

I'm about to commence work on what's basically the same thing. I've been putting it off for ages as it's such a dauntingly big task.

In my engine, all game objects can be constructed with an XML node. Up to this point I've been writing the XML files by hand (very time consuming), but now that the runtime half of the engine is nearly done there's no delaying it any longer.

Here is a sample of the XML code that my editor must be capable of producing:

Code:
<?xml version="1.0" encoding="utf-8"?>
<MAPFILE>
   <customSettings>
      <bgColour><Colour r="0.075" g="0.05" b="0.02" a="1.0"/></bgColour>
   </customSettings>
   <settings>
      <boundary>
         <Range>
            <pos><Vec2f x="0.0" y="0.0"/></pos>
            <size><Vec2f x="5.0" y="5.0"/></size>
         </Range>
      </boundary>
      <numSegments><Vec2i x="4" y="4"/></numSegments>
      <segmentSize><Vec2f x="0.3" y="0.3"/></segmentSize>
      <segmentsDir>data/xml/0</segmentsDir>
   </settings>
   <using>
      <file>data/xml/player.xml</file>
      <file>data/xml/soil.xml</file>
   </using>
   <assets>
      <asset id="990"><Texture path="data/textures/img01.png"/></asset>
      <asset id="99"><Player addToWorld="true" proto="10"><Item solid="true"><Entity name="player" x="0.0" y="0.0" z="8"/></Item></Player></asset>
   </assets>
</MAPFILE>

And each map is broken into segments -- in this case {00, 01, 02, 03, 10, 11, 12, 13, ... 33}. The file 21.xml, for example, is as follows:

Code:
<?xml version="1.0" encoding="utf-8"?>
<ASSETFILE>
   <assets>
      <asset id="708">
         <CSprite addToWorld="true">
            <Item solid="false">
               <Entity type="image" name="img10" x="0.7" y="0.4" z="3" rot="0.0">
                  <shape>
                     <Polygon>
                        <Vec2f x="0.0" y="0.0"/>
                        <Vec2f x="0.1" y="0.0"/>
                        <Vec2f x="0.1" y="0.1"/>
                        <Vec2f x="0.0" y="0.1"/>
                     </Polygon>
                  </shape>
                  <scale>
                     <Vec2f x="1.0" y="1.0"/>
                  </scale>
                  <fillColour><Colour r="1.0" g="1.0" b="1.0" a="1.0"/></fillColour>
                  <lineColour><Colour r="1.0" g="1.0" b="1.0" a="1.0"/></lineColour>
                  <lineWidth>0</lineWidth>
                  <children/>
               </Entity>
            </Item>
            <Sprite>
               <Entity/>
               <EntityAnimations>
                  <texture ptr="990"/>
                  <textureSection>
                     <Range>
                        <pos><Vec2f x="0" y="0"/></pos>
                        <size><Vec2f x="32" y="32"/></size>
                     </Range>
                  </textureSection>
                  <onScreenSize>
                     <Vec2f x="0.1" y="0.1"/>
                  </onScreenSize>
               </EntityAnimations>
               <EntityTransformations/>
            </Sprite>
         </CSprite>
      </asset>
   </assets>
</ASSETFILE>

Btw, the classes CSprite, Item, and Player are not part of the engine; they are custom classes that the engine/editor have no knowledge of.

I think I've figured out roughly how I'm going to do it, and I'm expecting to have something that works within a couple of weeks if all goes well.

 Crazy
Logged

RalenHlaalo
Level 0
***



View Profile WWW
« Reply #3837 on: January 03, 2013, 11:20:47 AM »

I set out the other day to create a simple, light-weight MapLoader class, which basically acts as a resource manager, loading assets into and out of memory as the player navigates a large, seamless world. Fast-forward to now and I've created a horrific mess  Concerned  (.hpp .cpp).

I think it leaks memory too...  but otherwise it seems to work, albeit rather precariously.
Logged

QuadrupleA
Level 2
**



View Profile WWW
« Reply #3838 on: January 03, 2013, 11:47:04 AM »

Here is a sample of the XML code that my editor must be capable of producing

Cool - looks like a similar concept. I like the idea of Vec2i and Vec2f classes - I've been using a float Vector2 class for everything, but it's awkward to use it for grid array indices and the like (floats break down and lose integer granularity around 1,000,000 or so, and require typecasts to use as integers). Vector2i would be a nice naming convention for an integer one.

Here's my format for game object "prefabs", if you're curious - each prefab for an object type lives in its own .json file, and the filename becomes the prefab name. Then at runtime I can instantiate an object from the prefab via:
Code:
GameObject *myText = new GameObject( "BouncingText" );

And here's "BouncingText.json" - all the behavior code lives in that BouncingBallBhv component at the bottom (in this case it randomizes color & size, and bounces around the screen):
Code:
{
    "Components": [
        {
            "Type": "Pos2dComponent",
            "Pos": { "X": 0.66, "Y": 0.33 },
            "Rotation": 0.25
        },
        {
            "Type": "TextComponent",
            "AlignmentX": "Center",
            "AlignmentY": "Middle",
            "Font": "Title",
            "FontSize": 0.3,
            "Text": "The quick brown fox jumped over the lazy dog.",
            "BoxSize": { "X": 3.0, "Y": 0.0 },
            "Tint": { "A": 1.0, "R": 0.33, "G": 0.66, "B": 1.0 },
            "LineSpacing": 1.0,
            "Layer": "NewCoordinateTest"
        },
        {
            "Type": "BouncingBallBhv"
        }
    ],
    "AutoCreate": [
        // ...list of prefab names to automatically create as children...
    ]
}
Logged

Weapon Hacker - roguelite metroidvania;
Battleship Solitaire - mindless podcast companion
chris_b
Level 1
*


View Profile WWW
« Reply #3839 on: January 03, 2013, 03:16:18 PM »

Happy about fixing something after many hours of head scratching, but grumpy because I don't quite understand precisely why it's fixed Shrug

Converting an array bytes representing 16 bit audio data into an array of shorts in Java - this doesn't work:

Code:
samplebuf[i] = (short)( samplebufb[2*i] | (samplebufb[2*i + 1]<<8));

This works:

Code:
samplebuf[i] = (short)( (samplebufb[2*i] & 0xFF) | (samplebufb[2*i + 1]<<8));

I sort of get that it's something to do with signed vs. unsigned bytes but I don't really see what's happening... samplebufb is byte[] array, so why does masking with & 0xFF make a difference?
Logged
Pages: 1 ... 190 191 [192] 193 194 ... 295
Print
Jump to:  

Theme orange-lt created by panic